encoding/asn1: prepare for 64-bit ints

The code was assuming that int = 32 bits. Don't.

Update issue 2188.

R=agl
CC=golang-dev
http://codereview.appspot.com/6543063
reflect: fix mistake in error message

Pointed out by James Chalfant after submit of CL 6500065.

TBR=golang-dev
CC=golang-dev
http://codereview.appspot.com/6543067
cmd/dist, pkg/runtime: Plan 9, 64-bit: Get PID from TLS; remove use of `_tos'.

Using offsets from Tos is cumbersome and we've had problems
in the past. Since it's only being used to grab the PID, we'll just
get that from the default TLS instead.

R=rsc, rminnich, npe
CC=golang-dev
http://codereview.appspot.com/6543049

Committer: Russ Cox <rsc@golang.org>
cmd/gc: fix comment for caninl

Was describing an old implementation.

R=ken2
CC=golang-dev
http://codereview.appspot.com/6553066
A+C: Add Shivakumar GN (Individual CLA)

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6541062
lib9/fmt: do not put a main symbol into lib9.a

Fixes issue 4143.

R=golang-dev, bradfitz
CC=golang-dev
http://codereview.appspot.com/6541064
tag go1.0.3

R=rsc
CC=golang-dev
http://codereview.appspot.com/6543069
CONTRIBUTORS: add Jonathan Feinberg (Google CLA)

R=golang-dev, bradfitz
CC=golang-dev
http://codereview.appspot.com/6553067
cmd/[568]g: explain the purpose of various Reg fields.

R=golang-dev, rsc
CC=golang-dev, remy
http://codereview.appspot.com/6554062
runtime: prepare for 64-bit ints

This CL makes the runtime understand that the type of
the len or cap of a map, slice, or string is 'int', not 'int32',
and it is also careful to distinguish between function arguments
and results of type 'int' vs type 'int32'.

In the runtime, the new typedefs 'intgo' and 'uintgo' refer
to Go int and uint. The C types int and uint continue to be
unavailable (cause intentional compile errors).

This CL does not change the meaning of int, but it should make
the eventual change of the meaning of int on amd64 a bit
smoother.

Update issue 2188.

R=iant, r, dave, remyoudompheng
CC=golang-dev
http://codereview.appspot.com/6551067
misc/cgo: prepare for 64-bit ints

In a few places, the existing cgo tests assume that a
Go int is the same as a C int. Making int 64 bits wide
on 64-bit platforms violates this assumption.
Change that code to assume that Go int32 and C int
are the same instead. That's still not great, but it's better,
and I am unaware of any systems we run on where it is not true.

Update issue 2188.

R=iant, r
CC=golang-dev
http://codereview.appspot.com/6552064
cmd/cgo: prepare for 64-bit ints

This CL makes the size of an int controlled by a variable
in cgo instead of hard-coding 4 (or 32 bits) in various places.

Update issue 2188.

R=iant, r, dave
CC=golang-dev
http://codereview.appspot.com/6548061
cmd/ld: prepare for 64-bit ints

Use explicit IntSize constant instead of 4.

This CL does not change the meaning of int, but it should make
the eventual change of the meaning of int on amd64 a bit
smoother.

Update issue 2188.

R=ken, dave
CC=golang-dev
http://codereview.appspot.com/6554076
cmd/gc: prepare for 64-bit ints

This CL makes the compiler understand that the type of
the len or cap of a map, slice, or string is 'int', not 'int32'.
It does not change the meaning of int, but it should make
the eventual change of the meaning of int in 6g a bit smoother.

Update issue 2188.

R=ken, dave, remyoudompheng
CC=golang-dev
http://codereview.appspot.com/6542059
testing: add memory allocation stats to benchmark

R=rsc, nigeltao, dave, bradfitz, r, rogpeppe
CC=golang-dev
http://codereview.appspot.com/6497084

Committer: Russ Cox <rsc@golang.org>
cmd/8g: don't create redundant temporaries in bgen.

Comparisons used to create temporaries for arguments
even if they were already variables or addressable.
Removing the extra ones reduces pressure on regopt.

benchmark                 old ns/op    new ns/op    delta
BenchmarkGobDecode         50787620     49908980   -1.73%
BenchmarkGobEncode         19870190     19473030   -2.00%
BenchmarkGzip            3214321000   3067929000   -4.55%
BenchmarkGunzip           496792800    465828600   -6.23%
BenchmarkJSONEncode       232524800    263864400  +13.48%
BenchmarkJSONDecode       622038400    506600600  -18.56%
BenchmarkMandelbrot200     23937310     45913060  +91.81%
BenchmarkParse             14364450     13997010   -2.56%
BenchmarkRevcomp         6919028000   6480009000   -6.35%
BenchmarkTemplate         594458800    539528200   -9.24%

benchmark                  old MB/s     new MB/s  speedup
BenchmarkGobDecode            15.11        15.38    1.02x
BenchmarkGobEncode            38.63        39.42    1.02x
BenchmarkGzip                  6.04         6.33    1.05x
BenchmarkGunzip               39.06        41.66    1.07x
BenchmarkJSONEncode            8.35         7.35    0.88x
BenchmarkJSONDecode            3.12         3.83    1.23x
BenchmarkParse                 4.03         4.14    1.03x
BenchmarkRevcomp              36.73        39.22    1.07x
BenchmarkTemplate              3.26         3.60    1.10x

R=mtj, daniel.morsing, rsc
CC=golang-dev
http://codereview.appspot.com/6547064
regexp/syntax: define accepted syntax

Update issue 3953.

R=bradfitz, campoy
CC=golang-dev
http://codereview.appspot.com/6543068
cmd/gc: fix escape analysis bug

Was not handling &x.y[0] and &x.y.z correctly where
y is an array or struct-valued field (not a pointer).

R=ken2
CC=golang-dev
http://codereview.appspot.com/6551059
testing: document -test.bench flag

Fixes issue 4080.

R=rsc, adg
CC=golang-dev
http://codereview.appspot.com/6553068
crypto/tls: support session ticket resumption.

Session resumption saves a round trip and removes the need to perform
the public-key operations of a TLS handshake when both the client and
server support it (which is true of Firefox and Chrome, at least).

R=golang-dev, bradfitz, rsc
CC=golang-dev
http://codereview.appspot.com/6555051