spec: reject top-level init names

Fixes issue 4586.

R=golang-dev, remyoudompheng, r
CC=golang-dev
https://codereview.appspot.com/7307082
spec: document fp rounding during explicit constant conversion

The gc compilers already behave this way. It was an explicit
decision during the very long constant design discussions,
but it appears not to have made it into the spec.

Fixes issue 4398.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7313069
spec: only require parens around ambiguous conversions

This is documenting the status quo. The previous cleanup
added this language as an implementation restriction, but
at least for now it is really part of the language proper.

Fixes issue 4605.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7305071
sync: add caution about where to call (*WaitGroup).Add

Fixes issue 4762.

R=daniel.morsing, adg
CC=golang-dev
https://codereview.appspot.com/7308045
api: Update readme.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://codereview.appspot.com/7303065

Committer: Brad Fitzpatrick <bradfitz@golang.org>
vet: improve flag handling
Simplify the internal logic for flags controlling what to vet,
by introducing a map of flags that gathers them all together.
This change should simplify the process of adding further flags.

Add a test for untagged struct literals.
Delete a redundant test that was also in the wrong file.
Clean up some ERROR patterns that weren't working.

"make test" passes again.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7305075
test: a number of fixes.

Details:
- reorder.go: delete p8.
  (Once expectation is changed per b/4627 it is identical to p1.)
- switch.go: added some more (degenerate) switches.
- range.go: improved error messages in a few cases.
- method.go: added tests of calls to promoted methods.

R=iant
CC=golang-dev
https://codereview.appspot.com/7306087
exp/ssa: special-case 'range' loops based on type of range expression.

The lowering of ast.RangeStmt now has three distinct cases:

1) rangeIter for maps and strings; approximately:
    it = range x
    for {
      k, v, ok = next it
      if !ok { break }
      ...
    }
   The Range instruction and the interpreter's "iter"
   datatype are now restricted to these types.

2) rangeChan for channels; approximately:
    for {
      k, ok = <-x
      if !ok { break }
      ...
    }

3) rangeIndexed for slices, arrays, and *array; approximately:
    for k, l = 0, len(x); k < l; k++ {
      v = x[k]
      ...
    }

In all cases we now evaluate the side effects of the range expression
exactly once, per comments on http://code.google.com/p/go/issues/detail?id=4644.

However the exact spec wording is still being discussed in
https://codereview.appspot.com/7307083/.  Further (small)
changes may be required once the dust settles.

R=iant
CC=golang-dev
https://codereview.appspot.com/7303074
go/types: len(((*T)(nil)).X) is const if X is an array

Fixes issue 4744.

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7305080