test/run: handle compiledir and errorcheckdir with multi-file packages

Multiple files with the same package all get compiled together.

R=golang-dev, iant, dave
CC=golang-dev
https://codereview.appspot.com/7005053
cmd/gc: make redeclaration between import and func less confusing

Fixes issue 4510.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7001054
cmd/gc: mark wrapper methods for unnamed types as DUPOK.

Unnamed types like structs with embedded fields can have methods.
These methods are generated on-the-fly by the compiler and
it may happen for identical types in different packages.
The linker must accept these multiple definitions.

Fixes issue 4590.

R=golang-dev, rsc
CC=golang-dev, remy
https://codereview.appspot.com/7030051
sync/atomic: document that users must deal with 64-bit alignment

Update issue 599.

R=dvyukov, iant, minux.ma
CC=golang-dev
https://codereview.appspot.com/7001056
cmd/dist, cmd/8g: implement GO386=387/sse to choose FPU flavour.

A new environment variable GO386 is introduced to choose between
code generation targeting 387 or SSE2. No auto-detection is
performed and the setting defaults to 387 to preserve previous
behaviour.

The patch is a reorganization of CL6549052 by rsc.

Fixes issue 3912.

R=minux.ma, rsc
CC=golang-dev
https://codereview.appspot.com/6962043
cmd/8g: fix possibly uninitialized variable in foptoas.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7045043
net/http: document Request.URL

Request.URL had no documentation before and some people were expecting all fields to be populated.

Fixes issue 3805.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7008046

Committer: Russ Cox <rsc@golang.org>
A+C: Thomas Kappler (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7038049
encoding/json: don't panic marshaling anonymous non-struct field

Add a check for this case and don't try to follow the anonymous
type's non-existent fields.

Fixes issue 4474.

R=rsc
CC=golang-dev
https://codereview.appspot.com/6945065

Committer: Russ Cox <rsc@golang.org>
net/http: make NewRequest pick a ContentLength from a *bytes.Reader too

It already did so for its sibling, *strings.Reader, as well as *bytes.Buffer.

R=edsrzf, dave, adg, kevlar, remyoudompheng, adg, rsc
CC=golang-dev
https://codereview.appspot.com/7031045
cmd/dist: use separate args for separate compiler flags

This makes dist safe for CL 7035043 (but keeps working now too).

R=golang-dev, remyoudompheng
CC=golang-dev
https://codereview.appspot.com/7029047
cmd/8g: extend elimination of temporaries to SSE2 code.

Before:
(erf.go:188)    TEXT     Erf+0(SB),$220
(erf.go:265)    TEXT     Erfc+0(SB),$204
(lgamma.go:174) TEXT     Lgamma+0(SB),$948

After:
(erf.go:188)    TEXT     Erf+0(SB),$84
(erf.go:265)    TEXT     Erfc+0(SB),$84
(lgamma.go:174) TEXT     Lgamma+0(SB),$44

SSE before vs. SSE after:

benchmark             old ns/op    new ns/op    delta
BenchmarkAcosh               81           49  -39.14%
BenchmarkAsinh              109          109   +0.00%
BenchmarkAtanh               73           74   +0.68%
BenchmarkLgamma             138           42  -69.20%
BenchmarkModf                24           15  -36.95%
BenchmarkSqrtGo             565          556   -1.59%

R=rsc
CC=golang-dev
https://codereview.appspot.com/7028048
spec: clarify language about unary operator &

A composite literal may be parenthesized when
used as operand for the unary operator &.

R=rsc, iant, r, ken
CC=golang-dev
https://codereview.appspot.com/6996053
net: fix docs for type IP: s/array/slice/.

R=rsc
CC=golang-dev
https://codereview.appspot.com/6930047
go/types: add more logging to gc import test

* Extended deadline to 30 seconds
* Added logging of the duration of each package import
* Fail the test immediately if directories cannot be read

R=gri, minux.ma
CC=golang-dev
https://codereview.appspot.com/7030055
CONTRIBUTORS: add Matthew Dempsky (Google CLA)

R=golang-dev, agl
CC=golang-dev
https://codereview.appspot.com/7049043
net/http: Sync TimeoutHandler godoc with code.

TimeoutHandler was changed from "ns int64" to "dt time.Duration" on
Nov 30, 2011, but the godoc still refers to "ns".

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

Committer: Ian Lance Taylor <iant@golang.org>
runtime: introduce typedefs and delete struct keywords in mgc0.c

R=rsc
CC=golang-dev
https://codereview.appspot.com/7029055

Committer: Russ Cox <rsc@golang.org>
log/syslog: remove RFC5424 version number for greater compatibility

RFC5424 specifies a version number (currently 1) after the facility and
severity in a syslog message (e.g. <7>1 TIMESTAMP ...).  This causes
rsyslog to fail to parse syslog message because the rest of the message
is not fully compliant with RFC5424.

For the widest compatibility, drop the version (messages are in the
RFC3164 BSD syslog format (e.g. <7>TIMESTAMP ...). Have tested this with
syslog-ng, rsyslog and syslogd.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7036050

Committer: Russ Cox <rsc@golang.org>
runtime: always incorporate hash seed at start of hash computation

Otherwise we can get predictable collisions.

R=golang-dev, dave, patrick, rsc
CC=golang-dev
https://codereview.appspot.com/7051043