encoding/xml: Marshal ",any" fields

Fixes issue 3559.

This makes Marshal handle fields marked ",any" instead of ignoring
them. That makes Marshal more symmetrical with Unmarshal, which seems
to have been a design goal.

Note some test cases were changed, because this patch changes
marshalling behavior. I think the previous behavior was buggy, but
there's still a backward-compatibility question to consider.

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

Committer: Russ Cox <rsc@golang.org>
cmd/gc: fix error line in switch expr eval

Fixes issue 4562.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7008044
encoding/gob: document that structs only encode/decode exported fields

Fixes issue 4579.

R=golang-dev, minux.ma
CC=golang-dev
https://codereview.appspot.com/7000051
crypto/des: add an example to demonstrate EDE2 operation.

EDE2 is a rare DES mode that can be implemented with crypto/des, but
it's somewhat non-obvious so this CL adds an example of doing so.

Fixes issue 3537.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/6721056
A+C: Erik St. Martin (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7007051
      regexp: fix index panic in Replace

When using subexpressions ($1) as replacements, when they either don't exist or values weren't found causes a panic.
This patch ensures that the match location isn't -1, to prevent out of bounds errors.
Fixes issue 3816.

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

Committer: Russ Cox <rsc@golang.org>
undo CL 6938073 / 1542912cf09d

remove zerostack compiler experiment; will do at link time instead

««« original CL description
cmd/gc: add GOEXPERIMENT=zerostack to clear stack on function entry

This is expensive but it might be useful in cases where
people are suffering from false positives during garbage
collection and are willing to trade the CPU time for getting
rid of the false positives.

On the other hand it only eliminates false positives caused
by other function calls, not false positives caused by dead
temporaries stored in the current function call.

The 5g/6g/8g changes were pulled out of the history, from
the last time we needed to do this (to work around a goto bug).
The code in go.h, lex.c, pgen.c is new but tiny.

R=ken2
CC=golang-dev
https://codereview.appspot.com/6938073
»»»

R=ken2
CC=golang-dev
https://codereview.appspot.com/7002051
cmd/6l, cmd/8l: add -Z flag to zero stack frame on entry

Replacement for GOEXPERIMENT=zerostack, easier to use.
Does not require a separate toolchain.

R=ken2
CC=golang-dev
https://codereview.appspot.com/6996051
cmd/gc: Reject parenthesised .(type) expressions.

Fixes issue 4470.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/6949073
cmd/gc: do not accept (**T).Method expressions.

The typechecking code was doing an extra, unnecessary
indirection.

Fixes issue 4458.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://codereview.appspot.com/6998051
cmd/gc: fix wrong interaction between inlining and embedded builtins.

The patch makes the compile user an ordinary package-local
symbol for the name of embedded fields of builtin type.

This is incompatible with the fix delivered for issue 2687
(revision 3c060add43fb) but fixes it in a different way, because
the explicit symbol on the field makes the typechecker able to
find it in lookdot.

Fixes issue 3552.

R=lvd, rsc, daniel.morsing
CC=golang-dev
https://codereview.appspot.com/6866047
flag: add implicit boolFlag interface

Any flag.Value that has an IsBoolFlag method that returns true
will be treated as a bool flag type during parsing.

Fixes issue 4262.

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

Committer: Russ Cox <rsc@golang.org>
fmt: document width and flags a bit more

Fixes issue 4581.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7000052
encoding/json: A JSON tag can be any valid JSON string.

Fixes issue 3887.

R=golang-dev, daniel.morsing, remyoudompheng, rsc
CC=golang-dev
https://codereview.appspot.com/6997045

Committer: Russ Cox <rsc@golang.org>
testing: fix example test fd leak

Close the read side of the pipe.
Fixes issue 4551.

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

Committer: Russ Cox <rsc@golang.org>
misc/benchcmp: show byte allocation statistics

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

Committer: Russ Cox <rsc@golang.org>
runtime: aggregate defer allocations

benchmark             old ns/op    new ns/op    delta
BenchmarkDefer              165          113  -31.52%
BenchmarkDefer10            155          103  -33.55%
BenchmarkDeferMany          216          158  -26.85%

benchmark            old allocs   new allocs    delta
BenchmarkDefer                1            0  -100.00%
BenchmarkDefer10              1            0  -100.00%
BenchmarkDeferMany            1            0  -100.00%

benchmark             old bytes    new bytes    delta
BenchmarkDefer               64            0  -100.00%
BenchmarkDefer10             64            0  -100.00%
BenchmarkDeferMany           64           66    3.12%

Fixes issue 2364.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7001051
runtime: ignore failure from madvise

When we release memory to the OS, if the OS doesn't want us
to release it (for example, because the program executed
mlockall(MCL_FUTURE)), madvise will fail. Ignore the failure
instead of crashing.

Fixes issue 3435.

R=ken2
CC=golang-dev
https://codereview.appspot.com/6998052
runtime: coalesce 0-size allocations

Fixes issue 3996.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7001052
cmd/yacc: fix debug print of token name

The array skips the first TOKSTART entries.

Fixes issue 4410.

R=golang-dev, ken2, ken
CC=golang-dev
https://codereview.appspot.com/6999054