doc/install-source.html: document that GO386 will be auto-detected when building on both 386 and amd64.
Fixes issue 8152.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/102150046
doc: fix happens-before rules for buffered channels
The current wording is reversed in 2 places.
Not sure how it got 4 LGTMs (mine was there as well).
Update issue 6242.

LGTM=dan.kortschak, r, rsc
R=golang-codereviews, 0xjnml, dan.kortschak, r, rsc
CC=golang-codereviews
https://codereview.appspot.com/101980047
cmd/cgo: for typedef of untagged struct, use typedef name in C code

Fixes issue 8148.

LGTM=cookieo9, rsc
R=rsc, cookieo9
CC=golang-codereviews
https://codereview.appspot.com/103080043
codereview: do not add defaultcc for private CLs

LGTM=r
R=r, 0xjnml, bradfitz, iant
CC=golang-codereviews
https://codereview.appspot.com/103070046
cmd/6g: fix stack zeroing on native client

I am not sure what the rounding here was
trying to do, but it was skipping the first
pointer on native client.

The code above the rounding already checks
that xoffset is widthptr-aligned, so the rnd
was a no-op everywhere but on Native Client.
And on Native Client it was wrong.

Perhaps it was supposed to be rounding down,
not up, but zerorange handles the extra 32 bits
correctly, so the rnd does not seem to be necessary
at all.

This wouldn't be worth doing for Go 1.3 except
that it can affect code on the playground.

Fixes issue 8155.

LGTM=r, iant
R=golang-codereviews, r, iant
CC=dvyukov, golang-codereviews, khr
https://codereview.appspot.com/108740047
runtime: fix panic stack during runtime.Goexit during panic

A runtime.Goexit during a panic-invoked deferred call
left the panic stack intact even though all the stack frames
are gone when the goroutine is torn down.
The next goroutine to reuse that struct will have a
bogus panic stack and can cause the traceback routines
to walk into garbage.

Most likely to happen during tests, because t.Fatal might
be called during a deferred func and uses runtime.Goexit.

This "not enough cleared in Goexit" failure mode has
happened to us multiple times now. Clear all the pointers
that don't make sense to keep, not just gp->panic.

Fixes issue 8158.

LGTM=iant, dvyukov
R=iant, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/102220043
doc/install.html: fix erroneous HTML annotation
align=middle is invalid; use align=center

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/106910044
docs: link to the assembler document from the Documents tab

Fixes issue 8156.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/108840045
cmd/ld: fix PC deltas in DWARF line number table

The putpclcdelta function set the DWARF line number PC to
s->value + pcline->pc, which is correct, but the code then set
the local variable pc to epc, which can be a different value.
This caused the next delta in the DWARF table to be wrong.

Fixes issue 8098.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/104950045
net/http: fix double Content-Length in response

Fixes Issue 8180

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/105040043
nacltest.bash, misc/nacl/README: update NaCl docs.

LGTM=rsc
R=dave, rsc
CC=golang-codereviews
https://codereview.appspot.com/105030043
cmd/gc: fix escape analysis for &x inside switch x := v.(type)

The analysis for &x was using the loop depth on x set
during x's declaration. A type switch creates a list of
implicit declarations that were not getting initialized
with loop depths.

Fixes issue 8176.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/108860043
math: implement Nextafter32

Provide Nextafter64 as alias to Nextafter.
For submission after the 1.3 release.

Fixes issue 8117.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://codereview.appspot.com/101750048
math/big: implement Rat.Float32

Pending CL 101750048.
For submission after the 1.3 release.

Fixes issue 8065.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://codereview.appspot.com/93550043
cmd/gc: fix &result escaping into result

There is a hierarchy of location defined by loop depth:

        -1 = the heap
        0 = function results
        1 = local variables (and parameters)
        2 = local variable declared inside a loop
        3 = local variable declared inside a loop inside a loop
        etc

In general if an address from loopdepth n is assigned to
something in loop depth m < n, that indicates an extended
lifetime of some form that requires a heap allocation.

Function results can be local variables too, though, and so
they don't actually fit into the hierarchy very well.
Treat the address of a function result as level 1 so that
if it is written back into a result, the address is treated
as escaping.

Fixes issue 8185.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/108870044
encoding/base64, encoding/base32: make DecodeString faster

Previously, an input string was stripped of newline
characters at the beginning of DecodeString and then passed
to Decode. Decode again tried to strip newline characters.
That's waste of time.

benchmark                 old MB/s     new MB/s  speedup
BenchmarkDecodeString        38.37        65.20    1.70x

LGTM=dave, bradfitz
R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/91770051

Committer: Brad Fitzpatrick <bradfitz@golang.org>
math: remove Nextafter64 alias in favor of existing Nextafter

LGTM=adonovan
R=rsc, adonovan
CC=golang-codereviews
https://codereview.appspot.com/104050045
runtime: add test for issue 8047.

Make sure stack copier doesn't barf on a nil defer.
Bug was fixed in https://codereview.appspot.com/101800043
This change just adds a test.

Fixes issue 8047

LGTM=dvyukov, rsc
R=dvyukov, rsc
CC=golang-codereviews
https://codereview.appspot.com/108840043

Committer: Russ Cox <rsc@golang.org>
mime/multipart: fix format

Remove unnecessary blank line.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/105040045

Committer: Ian Lance Taylor <iant@golang.org>
bytes, strings: optimize Repeat

Call copy with as large buffer as possible to reduce the
number of function calls.

benchmark                 old ns/op    new ns/op    delta
BenchmarkBytesRepeat            540          162  -70.00%
BenchmarkStringsRepeat          563          177  -68.56%

LGTM=josharian
R=golang-codereviews, josharian, dave, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/90550043

Committer: Josh Bleecher Snyder <josharian@gmail.com>