syscall/freebsd: remove Sendfile from unimplemented list

R=golang-dev, dave
CC=golang-dev
http://codereview.appspot.com/6343084

Committer: Brad Fitzpatrick <bradfitz@golang.org>
strconv: extend Grisu3 algorithm to float32.

Also improve extfloat.Normalize to obtain a modest performance
gain in parsing, and add a shortcut path for exact integers.

benchmark                              old ns/op    new ns/op    delta
BenchmarkAtof64Decimal                        73           73   -0.54%
BenchmarkAtof64Float                          91           91   -0.54%
BenchmarkAtof64FloatExp                      198          180   -9.09%
BenchmarkAtof64Big                           307          308   +0.33%

BenchmarkAtof32Decimal                        72           72   +0.42%
BenchmarkAtof32Float                          83           83   -0.72%
BenchmarkAtof32FloatExp                      212          186  -12.26%
BenchmarkAtof32Random                        262          250   -4.58%

BenchmarkAppendFloatDecimal                  474          305  -35.65%
BenchmarkAppendFloat                         497          489   -1.61%
BenchmarkAppendFloatExp                      493          483   -2.03%
BenchmarkAppendFloatNegExp                   481          481   +0.00%
BenchmarkAppendFloatBig                      667          652   -2.25%

BenchmarkAppendFloat32Integer                338          307   -9.17%
BenchmarkAppendFloat32ExactFraction          364          439  +20.60%
BenchmarkAppendFloat32Point                 1299          490  -62.28%
BenchmarkAppendFloat32Exp                   2593          489  -81.14%
BenchmarkAppendFloat32NegExp                5116          481  -90.60%

R=rsc, r
CC=golang-dev, remy
http://codereview.appspot.com/6303087
crypto/x509: exempt broken Entrust certificate from checks.

Entrust have issued a root certificate that's not marked as valid for
signing certificates.

This results in Go programs failing to validate certificates that
chain up to this root (i.e. gateway.push.apple.com:2195).

Although this is clearly a mistake on Entrust's part, it seems that we
will have to bodge around it.

R=golang-dev, dave, r
CC=golang-dev
http://codereview.appspot.com/6346064
encoding/asn1: promote untyped strings to UTF8 as needed.

Previously, strings that didn't have an explicit ASN.1 string type
were taken to be ASN.1 PrintableStrings. This resulted in an error if
a unrepresentable charactor was included.

For compatibility reasons, I'm too afraid to switch the default string
type to UTF8String, but this patch causes untyped strings to become
UTF8Strings if they contain a charactor that's not valid in a
PrintableString.

Fixes issue 3791.

R=golang-dev, bradfitz, r, r
CC=golang-dev
http://codereview.appspot.com/6348074
website: various html fixes

Fixes issue 3424.

R=fullung, adg
CC=golang-dev
http://codereview.appspot.com/6343088

Committer: Andrew Gerrand <adg@golang.org>
crypto/rsa: left-pad PKCS#1 v1.5 outputs.

OpenSSL requires that RSA signatures be exactly the same byte-length
as the modulus. Currently it'll reject ~1/256 of our signatures: those
that end up a byte shorter.

Fixes issue 3796.

R=golang-dev, edsrzf, r
CC=golang-dev
http://codereview.appspot.com/6352093
spec: correct typo in string conversion examples.

R=golang-dev, dave, r
CC=golang-dev, remy
http://codereview.appspot.com/6378046
net/http: fix Transport race(s) with high GOMAXPROCS

Also adds a new test for GOMAXPROCS=16 explicitly, which now passes
reliably in a stress loop like:

$ go test -c
$ (while ./http.test -test.v -test.run=Concurrency; do echo pass; done ) 2>&1 | tee foo; less foo

(It used to fail very quickly and reliably on at least Linux/amd64)

Fixes issue 3793

R=golang-dev, adg, r
CC=golang-dev
http://codereview.appspot.com/6347061
cmd/pack: remove unused paging logic

This is the remainder of http://codereview.appspot.com/4601051.

Partially addresses issue 2705.

R=golang-dev, r, bradfitz, minux.ma
CC=golang-dev
http://codereview.appspot.com/6354066
math/big: correct quadratic space complexity in Mul.

The previous implementation used to have a O(n) recursion
depth for unbalanced inputs. A test is added to check that a
reasonable amount of bytes is allocated in this case.

Fixes issue 3807.

R=golang-dev, dsymonds, gri
CC=golang-dev, remy
http://codereview.appspot.com/6345075

Committer: Robert Griesemer <gri@golang.org>
encoding/gob: fix check for short input in slice decode

R=golang-dev, dsymonds, r, nigeltao
CC=golang-dev
http://codereview.appspot.com/6374059
math/big: minor performance tuning

Reuse temporary slice to avoid extra allocations
(originally done correctly by remyoudompheng@gmail.com
in http://codereview.appspot.com/6345075/).

benchmark           old ns/op    new ns/op    delta
BenchmarkHilbert      6252790      6262304   +0.15%
BenchmarkMul         45827438     45301002   -1.15%

R=r
CC=golang-dev
http://codereview.appspot.com/6346097
mat/big: more optimal Karatsuba threshold

benchmark           old ns/op    new ns/op    delta
BenchmarkHilbert      6253043      6267289   +0.23%
BenchmarkMul         45355940     39490633  -12.93%

R=r
CC=golang-dev
http://codereview.appspot.com/6355104
cmd/gc: fix error message for type errors involving conversions.

Fixes issue 3818.

R=golang-dev, rsc, r
CC=golang-dev, remy
http://codereview.appspot.com/6352106
cmd/gc: avoid an internal error on invalid type switch.

The error was caused by a call to implements() even when
the type switch variable was not an interface.

Fixes issue 3786.

R=golang-dev, r
CC=golang-dev, remy
http://codereview.appspot.com/6354102
bytes.Buffer: export the Grow method
Allows a client to pre-allocate buffer space that is known to be necessary,
avoiding expensive reallocations.

R=gri, gri, adg
CC=golang-dev
http://codereview.appspot.com/6392061
encoding/gob: reduce decoder memory
Gob decoding reads a whole message into memory and then
copies it into a bytes.Buffer. For large messages this wastes
an entire copy of the message. In this CL, we use a staging
buffer to avoid the large temporary.

Update issue 2539
RSS drops to 775MB from 1GB.
Active memory drops to 858317048 from 1027878136,
essentially the size of one copy of the input file.

R=dsymonds, nigeltao
CC=golang-dev
http://codereview.appspot.com/6392057
cmd/gc: reject use of ... with multiple-valued expressions.

Fixes issue 3334.

R=golang-dev, r
CC=golang-dev, remy
http://codereview.appspot.com/6350103
exp/locale/collate: adjusted contraction trie to support Myanmar (Burmese),
which has a rather large contraction table. The value of the next state
offset now starts after the current block, instead of before.  This is
slightly less efficient (on extra addition per state change), but gives
some extra range for the offsets.
Also introduced constants for final (0) and noIndex (0xFF).
tables.go is updated in a separate CL.

R=r
CC=golang-dev
http://codereview.appspot.com/6346092
exp/locale/collate: This CL includes the following changes:
- Changed the representation of colElem to support a few cases
  for some languages not supported by the current format.
- Changed offsets for implicit primary values. This makes the
  values both easier to read and debug (last 4 nibbles are identical to
  implicit primary value) and also results in better packing.
- Fixed bug in weight conversion code that did not pop up yet by
  sheer luck.
Note that tables.go also includes changes to the contraction trie
from CL 6346092.

R=r, mpvl
CC=golang-dev
http://codereview.appspot.com/6392060