cmd/5g, cmd/5l, cmd/6l, cmd/8l, cmd/gc, cmd/ld, runtime: accurate args and locals information

Previously, the func structure contained an inaccurate value for
the args member and a 0 value for the locals member.

This change populates the func structure with args and locals
values computed by the compiler.  The number of args was
already available in the ATEXT instruction.  The number of
locals is now passed through in the new ALOCALS instruction.

This change also switches the unit of args and locals to be
bytes, just like the frame member, instead of 32-bit words.

R=golang-dev, bradfitz, cshapiro, dave, rsc
CC=golang-dev
https://codereview.appspot.com/7399045
archive/tar: make test pass on setgid dirs

Fixes issue 4867

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/7382045
cmd/gc, reflect, runtime: switch to indirect func value representation

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

R=golang-dev, r, daniel.morsing, remyoudompheng
CC=golang-dev
https://codereview.appspot.com/7393045
testing: fix output formatting

Revision 5e7fd762f356 has changed the output formatting in a way that
is no longer in line with the format described by the revision
ff0ade0b937b which has introduced this functionality.
When decorating the first line, instead of indenting the whole line,
the current implementation adds indentation right after the "decorate"
part and  before the "log" message.
The fix addresses this issue.

R=golang-dev, iant, minux.ma, r, rsc, remyoudompheng
CC=golang-dev
https://codereview.appspot.com/7304094

Committer: Rob Pike <r@golang.org>
net/url: fix URL Opaque notes on making client requests

Fixes issue 4860

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7375047
cmd/gc: fix FreeBSD build

R=jsing, mikioh.mikioh, bradfitz
CC=golang-dev
https://codereview.appspot.com/7390048
bufio: add examples for Scanner
Mention Scanner in docs for ReadLine etc.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7375045
runtime: windows callback code to match new func value representation

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7393048
testing: document that example output must use line comments

Fixes issue 4812.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7396051

Committer: Andrew Gerrand <adg@golang.org>
exp/ssa/interp: fix build for Plan 9

R=adonovan, minux.ma, alex.brainman, akumar, rminnich
CC=golang-dev, lucio.dere
https://codereview.appspot.com/7300078
cmd/go: don't call ImportDir unnecessarily

This significantly speeds up the go tool on
slow file systems (or those with cold caches).

The following numbers were obtained using
an encrypted ext4 file system running on
Linux 3.7.9.

# Before
$ sudo sysctl -w 'vm.drop_caches=3'
$ time go list code.google.com/p/go.net/... | wc -l
9

real	0m16.921s
user	0m0.637s
sys	0m0.317s

# After
$ sudo sysctl -w 'vm.drop_caches=3'
$ time go list code.google.com/p/go.net/... | wc -l
9

real	0m8.175s
user	0m0.220s
sys	0m0.177s

R=rsc, r
CC=golang-dev
https://codereview.appspot.com/7369044
exp/ssa: cross off a few remaining TODO issues.

- append: nothing to do (nonsemantic change).
- delete: now performs correct conversion (+ test).
- emitCompare: nothing to do.
- emitArith (shifts): nothing to do (+ test).
- "banish untyped types": give up on that.
- real, imag: now do correct conversions.
- added comment to interp.go re zero-size values.

R=gri
CC=golang-dev
https://codereview.appspot.com/7391046
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