cmd/8l: fix data corruption for MULB SI,

The 8l linker automatically inserts XCHG instructions
to support otherwise impossible byte registers
(only available on AX, BX, CX, DX).

Sometimes AX or DX is needed (for MUL and DIV) so
we need to avoid clobbering them.

R=golang-dev, dave, iant, iant, rsc
CC=golang-dev
http://codereview.appspot.com/6846057
spec: add () to method calls in examples

Since p.M is rejected (must call methods), use p.M(),
to keep the examples compiling.

Fixes issue 4441.

R=gri
CC=golang-dev
http://codereview.appspot.com/6854096
exp/types: fixed field/method lookup

also:

- composite literal checking close to complete
- cleaned up parameter, method, field checking
- don't let panics escape type checker
- more TODOs eliminated

R=rsc
CC=golang-dev
http://codereview.appspot.com/6816083
cmd/6l, cmd/8l: emit no-ops to separate zero-stack funcs from nosplits.

The stack overflow checker in the linker uses the spadj field
to determine whether stack space will be large enough or not.
When spadj=0, the checker treats the function as a nosplit
and emits an error although the program is correct.

Also enable the stack checker in 8l.

Fixes issue 4316.

R=rsc, golang-dev
CC=golang-dev
http://codereview.appspot.com/6855088
doc/play: don't use println in examples

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6849105
go/printer: Permit declaration and statement lists as input.

Also: Can set base indentation in printer.Config: all code
is going to be indented by at least that amount (except for
raw string literals spanning multiple lines, since their
values must not change).

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6847086
go/printer: some internal cleanups

Cleanups introduced originally by now abandoned
https://codereview.appspot.com/6846078/ .

Includes additional test cases for 'if' and 'for'
statements.

No formatting changes.

R=rsc
CC=golang-dev
http://codereview.appspot.com/6855096
cmd/gc: Make sure bools lose idealness when used with logical operators.

Bools from comparisons can be assigned to all bool types, but this idealness would propagate through logical operators when the result should have been lowered to a non-ideal form.

Fixes issue 3924.

R=golang-dev, remyoudompheng, r, rsc, mtj
CC=golang-dev
http://codereview.appspot.com/6855061
net/http: fix Transport races & deadlocks

Thanks to Dustin Sallings for exposing the most frustrating
bug ever, and for providing repro cases (which formed the
basis of the new tests in this CL), and to Dave Cheney and
Dmitry Vyukov for help debugging and fixing.

This CL depends on submited pollster CLs ffd1e075c260 (Unix)
and 14b544194509 (Windows), as well as unsubmitted 6852085.
Some operating systems (OpenBSD, NetBSD, ?) may still require
more pollster work, fixing races (Issue 4434 and
http://goo.gl/JXB6W).

Tested on linux-amd64 and darwin-amd64, both with GOMAXPROCS 1
and 4 (all combinations of which previously failed differently)

Fixes Issue 4191
Update Issue 4434 (related fallout from this bug)

R=dave, bradfitz, dsallings, rsc, fullung
CC=golang-dev
http://codereview.appspot.com/6851061
go/printer: don't use 'infinity' value when it might lead to int32 overflow

Fixes 386 build breakage.

R=rsc
CC=golang-dev
http://codereview.appspot.com/6844091
cmd/gc: add division rewrite to walk pass.

This allows 5g and 8g to benefit from the rewrite as shifts
or magic multiplies. The 64-bit arithmetic is not handled there,
and left in 6g.

Update issue 2230.

R=golang-dev, dave, mtj, iant, rsc
CC=golang-dev
http://codereview.appspot.com/6819123
os: move Plan 9 directory marshaling code to syscall

The API additions to syscall are in dir_plan9.go.

R=seed, rsc, rminnich, mirtchovski, dave
CC=golang-dev, lucio.dere
http://codereview.appspot.com/6157045
os/user: update stub documentation

R=golang-dev, minux.ma, bradfitz
CC=golang-dev
http://codereview.appspot.com/6844088
go/ast: minor cleanup

It's better to use IsValid() then checking a (possibly
partially set up) position against NoPos directly.

R=dsymonds
CC=golang-dev
http://codereview.appspot.com/6855099
CONTRIBUTORS: Add Jonathan Hseu (Google CLA)

Part of merging goprotobuf's A+C into Go's.

R=golang-dev, dsymonds
CC=golang-dev
http://codereview.appspot.com/6844096
exp/cookiejar: new package.

This CL defines the API. Implementation will come in follow-up CLs.

Update issue 1960.

R=bradfitz, dr.volker.dobler, rsc
CC=golang-dev
http://codereview.appspot.com/6849092
net: fix flaky test
The test failed on one of the builders with:
timeout_test.go:594: 	ln.Accept: accept tcp 127.0.0.1:19373: use of closed network connection
http://build.golang.org/log/e83f4a152b37071b9d079096e15913811ad296b5

R=golang-dev, bradfitz, dave, mikioh.mikioh, remyoudompheng, rsc
CC=golang-dev
http://codereview.appspot.com/6859043
runtime/race: add unit tests for race detector

R=golang-dev, remyoudompheng, rsc
CC=golang-dev
http://codereview.appspot.com/6525052
log/syslog: correct message format

The syslog implementation was not correctly implementing the
traditional syslog format because it had a confused notion of
'priority'.  syslog priority is not a single number but is, in
fact, the combination of a facility number and a severity. The
previous Go syslog implementation had a single Priority that
appeared to be the syslog severity and no way of setting the
facility.  That meant that all syslog messages from Go
programs appeared to have a facility of 0 (LOG_KERN) which
meant they all appeared to come from the kernel.

Also, the 'prefix' was in fact the syslog tag (changed the
internal name for clarity as the term tag is more widely used)
and the timestamp and hostname values were missing from
messages.

With this change syslog messages are generated in the correct
format with facility and severity combined into a priority,
the timestamp in RFC3339 format, the hostname, the tag (with
the PID in [] appened) and the message.

The format is now:

   <PRI>1 TIMESTAMP HOSTNAME TAG[PID]: MSG

The TIMESTAMP, HOSTNAME and PID fields are filled in
automatically by the package. The TAG and the MSG are supplied
by the user. This is what rsyslogd calls TraditionalFormat and
should be compatible with multiple systems.

R=rsc, jgc, 0xjnml, mikioh.mikioh, bradfitz
CC=golang-dev
http://codereview.appspot.com/6782118

Committer: Russ Cox <rsc@golang.org>
regexp: add examples

Update issue 4125

R=minux.ma, rsc
CC=golang-dev
http://codereview.appspot.com/6847107

Committer: Russ Cox <rsc@golang.org>