text/tabwriter: improve panic backtraces

Fixes issue 7117.

LGTM=gri
R=golang-codereviews, gobot, gri
CC=golang-codereviews
https://codereview.appspot.com/53310044

Committer: Robert Griesemer <gri@golang.org>
cmd/go, doc/go1.3.txt: misc/benchcmp has been replaced by go tool benchcmp

Fixes issue 7016.

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

Committer: Rob Pike <r@golang.org>
encoding/json: mention escaping of '&'
Fixes issue 7034.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/57140043
A+C: Denis Brandolini (individual CLA)

Generated by addca.

TBR=iant
R=gobot
CC=golang-codereviews
https://codereview.appspot.com/52350044
cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled

Introduce two new environment variables, CC_FOR_TARGET and CXX_FOR_TARGET.
CC_FOR_TARGET defaults to CC and is used when compiling for GOARCH, while
CC remains for compiling for GOHOSTARCH.
CXX_FOR_TARGET defaults to CXX and is used when compiling C++ code for
GOARCH.

CGO_ENABLED defaults to disabled when cross compiling and has to be
explicitly enabled.

Update issue 4714

LGTM=minux.ma, iant
R=golang-codereviews, minux.ma, iant, rsc, dominik.honnef
CC=golang-codereviews
https://codereview.appspot.com/57100043

Committer: Ian Lance Taylor <iant@golang.org>
doc/install.html: get rid of explicit version number in docs.
So that we don't need to update the file each time a new version is released.

LGTM=dave, r, adg
R=golang-codereviews, dave, josharian, gobot, adg, r
CC=golang-codereviews
https://codereview.appspot.com/48730043
math/big: replace goto with for loop
I just added support for goto statements to my GopherJS project and now I am trying to get rid of my patches. These occurrences of goto however are a bit problematic:
GopherJS has to emulate gotos, so there is some performance drawback when doing so. In this case the drawback is major, since this is a core function of math/big which is called quite often. Additionally I can't see any reason here why the implementation with gotos should be preferred over my proposal.
That's why I would kindly ask to include this patch, even though it is functional equivalent to the existing code.

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

Committer: Brad Fitzpatrick <bradfitz@golang.org>
cmd/go: do not create world-writable files.
Fixes issue 7240.

LGTM=tommi.virtanen, bradfitz
R=golang-codereviews, tommi.virtanen, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/60480045
net/mail: correctly handle whitespaces when formatting an email address

Whitespace characters are allowed in quoted-string according to RFC 5322 without
being "Q"-encoding. Address.String() already always formats the name portion in
quoted string, so whitespace characters should be allowed in there.

Fixes issue 6641.

LGTM=dave, dsymonds
R=golang-codereviews, gobot, dsymonds, dave
CC=golang-codereviews
https://codereview.appspot.com/55770043

Committer: David Symonds <dsymonds@golang.org>
runtime: fix build on freebsd/arm

This CL is in preparation to make cgo work on freebsd/arm.

How to generate defs-files on freebsd/arm in the bootstrapping phase:
1. run freebsd on appropriate arm-eabi platforms
2. both syscall z-files and runtime def-files in the current tree are
   broken about EABI padding, fix them by hand
3. run make.bash again to build $GOTOOLDIR/cgo
4. use $GOTOOLDIR/cgo directly

LGTM=minux.ma, iant
R=iant, minux.ma, dave
CC=golang-codereviews
https://codereview.appspot.com/59580045
runtime/cgo: fix build on freebsd/arm

This CL is in preparation to make cgo work on freebsd/arm.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/60500044
syscall: fix build on freebsd/arm

This CL is in preparation to make cgo work on freebsd/arm.

It's just for fixing build fails on freebsd/arm, we still need to
update z-files later for fixing several package test fails.

How to generate z-files on freebsd/arm in the bootstrapping phase:
1. run freebsd on appropriate arm-eabi platforms
2. both syscall z-files and runtime def-files in the current tree are
   broken about EABI padding, fix them by hand
3. run make.bash again to build $GOTOOLDIR/cgo
4. use $GOTOOLDIR/cgo directly

LGTM=iant
R=iant, dave
CC=golang-codereviews
https://codereview.appspot.com/59490052
syscall: regenerate EABI call convention compliant syscalls for freebsd/arm

This CL is in preparation to make cgo work on freebsd/arm.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/59490051
syscall: make use of signed char explicit in generating z-files on freebsd/arm

This CL is in preparation to make cgo work on freebsd/arm.

The signedness of C char might be a problem when we make bare syscall
APIs, Go structures, using built-in bootstrap scripts with cgo because
they do translate C stuff to Go stuff internally. For now almost all
the C compilers assume that the type of char will be unsigned on arm
by default but it makes a different view from amd64, 386.

This CL just passes -fsigned-char, let the type of char be signed,
option which is supported on both gcc and clang to the underlying C
compilers through cgo for avoiding such inconsistency on syscall API.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/59740051
os/exec: use filepath.Base in Command

filepath.Base covers all scenarios
(for example paths like d:hello.txt)
on windows

LGTM=iant, bradfitz
R=golang-codereviews, iant, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/59740050
runtime: faster memclr on x86.

Use explicit SSE writes instead of REP STOSQ.

benchmark               old ns/op    new ns/op    delta
BenchmarkMemclr5               22            5  -73.62%
BenchmarkMemclr16              27            5  -78.49%
BenchmarkMemclr64              28            6  -76.43%
BenchmarkMemclr256             34            8  -74.94%
BenchmarkMemclr4096           112           84  -24.73%
BenchmarkMemclr65536         1902         1920   +0.95%

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/60090044
net: remove superfluous type conversion

LGTM=minux.ma, dvyukov
R=golang-codereviews, minux.ma, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/60900043
cmd/gc: fix nil pointer dereference

LGTM=iant
R=golang-codereviews, dave, iant
CC=golang-codereviews
https://codereview.appspot.com/60740044
cmd/gc: revert CL 60740044

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/60590047
cmd/6g: faster memmove/memset-like code using unaligned load/stores.

This changes makes sgen and clearfat use unaligned instructions for
the trailing bytes, like the runtime memmove does, resulting in faster
code when manipulating types whose size is not a multiple of 8.

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