cmd/6g, cmd/8g: switch to DX for indirect call block
runtime: add context argument to gogocall

Too many other things use AX, and at least one
(stack zeroing) cannot be moved onto a different
register. Use the less special DX instead.

Preparation for step 2 of http://golang.org/s/go11func.
Nothing interesting here, just split out so that we can
see it's correct before moving on.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7395050
runtime: avoid closure in parfor test

R=golang-dev, dvyukov
CC=golang-dev
https://codereview.appspot.com/7395051
exp/ssa: fixed bug (typo) in findPromotedField.

By appending to the wrong (always empty) list, only the last
anonymous field was being considered for promotion.

Also:
- eliminated "function-local NamedTypes" TODO; nothing to do.
- fixed Function.DumpTo: printing of anon receivers was "( T)",
  now "(T)"; extracted writeSignature into own function.
- eliminated blockNames function;
  thanks to BasicBlock.String, "%s" of []*BasicBlock is fine.
- extracted buildReferrers into own function.

exp/ssa can now build its own transitive closure.

R=gri
CC=golang-dev
https://codereview.appspot.com/7384054
runtime: preserve DX during racefuncenter

R=golang-dev, dvyukov
CC=golang-dev
https://codereview.appspot.com/7382049
mime/multipart: allow unescaped newlines through in quoted-printable

This makes Go's quoted-printable decoder more like other
popular ones, allowing through a bare \r or \n, and also
passes through \r\n which looked like a real bug before.

Fixes issue 4771

R=minux.ma
CC=golang-dev
https://codereview.appspot.com/7300092
cmd/5l, cmd/6l, cmd/8l: accept CALL reg, reg

The new src argument is ignored during linking
(that is, CALL r1, r2 is identical to CALL r2 for linking),
but it serves as a hint to the 5g/6g/8g optimizer
that the src register is live on entry to the called
function and must be preserved.

It is possible to avoid exposing this fact to the rest of
the toolchain, keeping it entirely within 5g/6g/8g,
but I think it will help to be able to look in object files
and assembly listings and linker -a / -W output to
see CALL instructions are "Go func value" calls and
which are "C function pointer" calls.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7364045
cmd/gc: avoid runtime code generation for closures

Change ARM context register to R7, to get out of the way
of the register allocator during the compilation of the
prologue statements (it wants to use R0 as a temporary).

Step 2 of http://golang.org/s/go11func.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7369048
exp/ssa: support variadic synthetic methods.

We wrap the final '...' argument's type in types.Slice.
Added tests.

Also:
- Function.writeSignature: suppress slice '[]' when printing
  variadic arg '...'.
- Eliminate Package.ImportPath field; redundant
  w.r.t. Package.Types.Path.
- Use "TODO: (opt|fix)" notation more widely.
- Eliminate many redundant/stale TODOs.

R=gri
CC=golang-dev
https://codereview.appspot.com/7378057
reflect: stop using run-time code generation

Step 3 of http://golang.org/s/go11func.

Fixes issue 3736.
Fixes issue 3738.
Fixes issue 4081.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7393050
runtime: delete old closure code

Step 4 of http://golang.org/s/go11func.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7393049
exp/ssa: silence go vet

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7386052
runtime: add cgocallback_gofunc that can call Go func value

For now, all the callbacks from C use top-level Go functions,
so they use the equivalent C function pointer, and will continue
to do so. But perhaps some day this will be useful for calling
a Go func value (at least if the type is already known).

More importantly, the Windows callback code needs to be able
to use cgocallback_gofunc to call a Go func value.
Should fix the Windows build.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7388049
cmd/vet: restructure to be package-driven
This is a simple refactoring of main.go that will enable the type checker
to be used during vetting.
The change has an unimportant effect on the arguments: it now assumes
that all files named explicitly on the command line belong to the same
package. When run by the go command, this was true already.

Also restore a missing parenthesis from an error message.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://codereview.appspot.com/7393052
runtime: fix arm build

R=ken2
CC=golang-dev
https://codereview.appspot.com/7399050
os: Plan 9: avoid doing zero-length writes.

Plan 9 I/O preserves message boundaries, while Go
library code is written for UNIX-like operating
systems which do not. Avoid doing zero-length
writes in package os.

R=rsc, rminnich, ality, rminnich, r
CC=golang-dev
https://codereview.appspot.com/7406046

Committer: Ron Minnich <rminnich@gmail.com>
all.rc: make sure the Go tools end up in /bin

At least one test (in package runtime) depends
on `go' being in $path. We simply bind GOROOT/bin
before /bin to make sure the latest copy of the
binary is accessible there.

R=rsc, rminnich, ality
CC=golang-dev
https://codereview.appspot.com/7391047

Committer: Ron Minnich <rminnich@gmail.com>
cmd/gc: mark LOCALS argument as a constant to print correctly

Fixes issue 4875.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7376049
syscall: add netlink constants for linux

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7403049
testing: move Skip into *common

Move Skip and friends into *common so benchmarks can also be skipped.

R=golang-dev, gustav.paul, rsc
CC=golang-dev
https://codereview.appspot.com/7379046
cmd/vet: use types to test Error methods correctly.
We need go/types to discriminate the Error method from
the error interface and the Error method of the testing package.
Fixes issue 4753.

R=golang-dev, bradfitz, gri
CC=golang-dev
https://codereview.appspot.com/7396054