encoding/json: speed up decoding

Don't make copies of keys while decoding, and don't use the
expensive strings.EqualFold when it's not necessary. Instead,
note in the existing field cache what algorithm to use to
check fold equality... most keys are just ASCII letters.

benchmark               old ns/op    new ns/op    delta
BenchmarkCodeDecoder    137074314    103974418  -24.15%

benchmark                old MB/s     new MB/s  speedup
BenchmarkCodeDecoder        14.16        18.66    1.32x

Update Issue 6496

R=golang-dev, rsc, adg, r, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/13894045
crypto/x509: add non-cgo darwin system anchor certs

The set of certs fetched via exec'ing `security` is not quite identical
to the certs fetched via the cgo call. The cgo fetch includes
any trusted root certs that the user may have added; exec does not.
The exec fetch includes an Apple-specific root cert; the cgo fetch
does not. Other than that, they appear to be the same.

Unfortunately, os/exec depends on crypto/x509, via net/http. Break the
circular dependency by moving the exec tests to their own package.

This will not work in iOS; we'll cross that bridge when we get to it.

R=golang-dev, minux.ma, agl
CC=golang-dev
https://codereview.appspot.com/22020045

Committer: Adam Langley <agl@golang.org>
crypto/x509: set default signature hash to SHA256 and allow override.

Previously the hash used when signing an X.509 certificate was fixed
and, for RSA, it was fixed to SHA1. Since Microsoft have announced the
deprecation of SHA1 in X.509 certificates, this change switches the
default to SHA256.

It also allows the hash function to be controlled by the caller by
setting the SignatureAlgorithm field of the template.

[1] http://blogs.technet.com/b/pki/archive/2013/11/12/sha1-deprecation-policy.aspx

Fixes issue 5302.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/40720047
net: test dnsconfig_unix with sample resolv.conf

R=golang-dev, adg, bradfitz, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/21580043

Committer: Brad Fitzpatrick <bradfitz@golang.org>
encoding/ascii85: add empty string case for Encode test

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

Committer: Brad Fitzpatrick <bradfitz@golang.org>
go/ast: added example illustrating CommentMap use.

R=bradfitz
CC=golang-dev
https://codereview.appspot.com/43930043
misc/notepadplus: Fix Function List in Notepad++ 6.5

Since version 6.5, npp change the Function List syntax for User Defined Languages.
We need use userDefinedLangName syntax in association tag in Notepad++ 6.5.

Fix issue 6735.

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

Committer: Brad Fitzpatrick <bradfitz@golang.org>
encoding/json: add test for HTMLEscape

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

Committer: Brad Fitzpatrick <bradfitz@golang.org>
encoding/asn1: add more test cases for BitString.At and TestUTCTime, add test for ObjectIdentifier.Equal

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

Committer: Brad Fitzpatrick <bradfitz@golang.org>
html: add tests for UnescapeString edge cases

R=golang-dev, gobot, bradfitz
CC=golang-dev
https://codereview.appspot.com/40810044

Committer: Brad Fitzpatrick <bradfitz@golang.org>
encoding/csv: remove unused unreadRune function

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

Committer: Russ Cox <rsc@golang.org>
cmd/nm: minor cleanup from previous CL

I forgot to apply Ian's suggestions before submitting CL 40600043.

R=iant
CC=golang-dev
https://codereview.appspot.com/43560045
liblink: don't search for an import file with an absolute path

This restores the old behaviour, and makes it possible to
continue to use 6g and 6l directly, rather than the go tool,
with dot imports.

R=rsc
CC=golang-dev
https://codereview.appspot.com/43710043
api: update next.txt

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/43490048
sync: add Pool type

Adds the Pool type and docs, and use it in fmt.
This is a temporary implementation, until Dmitry
makes it fast.

Uses the API proposal from Russ in http://goo.gl/cCKeb2 but
adds an optional New field, as used in fmt and elsewhere.
Almost all callers want that.

Update Issue 4720

R=golang-dev, rsc, cshapiro, iant, r, dvyukov, khr
CC=golang-dev
https://codereview.appspot.com/41860043
fmt: use sync.Pool

Update Issue 4720

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/43990043
liblink: fix Plan 9 warnings

warning: src/liblink/asm5.c:485 non-interruptable temporary
warning: src/liblink/asm5.c:565 set and not used: c
warning: src/liblink/asm5.c:622 format mismatch ux VLONG, arg 2
warning: src/liblink/asm5.c:1218 overspecified class: asmout GLOBL STATIC
warning: src/liblink/asm5.c:2088 overspecified class: oprrr GLOBL STATIC
warning: src/liblink/asm5.c:2202 overspecified class: opbra GLOBL STATIC
warning: src/liblink/asm5.c:2237 overspecified class: olr GLOBL STATIC
warning: src/liblink/asm5.c:2266 overspecified class: olhr GLOBL STATIC
warning: src/liblink/asm5.c:2291 overspecified class: osr GLOBL STATIC
warning: src/liblink/asm5.c:2302 overspecified class: oshr GLOBL STATIC
warning: src/liblink/asm5.c:2312 overspecified class: osrr GLOBL STATIC
warning: src/liblink/asm5.c:2319 overspecified class: oshrr GLOBL STATIC
warning: src/liblink/asm5.c:2325 overspecified class: olrr GLOBL STATIC
warning: src/liblink/asm5.c:2332 overspecified class: olhrr GLOBL STATIC
warning: src/liblink/asm5.c:2338 overspecified class: ofsr GLOBL STATIC
warning: src/liblink/asm5.c:2375 overspecified class: omvl GLOBL STATIC
warning: src/liblink/asm8.c:1261 format mismatch d VLONG, arg 3
warning: src/liblink/asm8.c:1274 format mismatch +d VLONG, arg 5
warning: src/liblink/list5.c:153 format mismatch d VLONG, arg 3
warning: src/liblink/list5.c:310 format mismatch d VLONG, arg 3
warning: src/liblink/obj6.c:665 set and not used: q
warning: src/liblink/pcln.c:32 set and not used: p

R=golang-dev, jas, gobot, rsc
CC=golang-dev
https://codereview.appspot.com/40370043
libmach, cmd/8l: fix Plan 9 warnings

warning: src/libmach/sym.c:1861 non-interruptable temporary
warning: src/cmd/8l/../ld/pcln.c:29 set and not used: p

R=golang-dev, gobot, rsc
CC=golang-dev
https://codereview.appspot.com/40500043
cmd/6g, cmd/gc, cmd/ld: fix Plan 9 amd64 warnings

warning: src/cmd/6g/reg.c:671 format mismatch d VLONG, arg 4
warning: src/cmd/gc/pgen.c:230 set and not used: oldstksize
warning: src/cmd/gc/plive.c:877 format mismatch lx UVLONG, arg 2
warning: src/cmd/gc/walk.c:2878 set and not used: cbv
warning: src/cmd/gc/walk.c:2885 set and not used: hbv
warning: src/cmd/ld/data.c:198 format mismatch s IND FUNC(IND CHAR) INT, arg 2
warning: src/cmd/ld/data.c:230 format mismatch s IND FUNC(IND CHAR) INT, arg 2
warning: src/cmd/ld/dwarf.c:1517 set and not used: pc
warning: src/cmd/ld/elf.c:1507 format mismatch d VLONG, arg 2
warning: src/cmd/ld/ldmacho.c:509 set and not used: dsymtab

R=golang-dev, gobot, rsc
CC=golang-dev
https://codereview.appspot.com/36740045
image/gif: respect local color table transparency.

Fixes issue 6441.

R=r
CC=andybons, golang-dev
https://codereview.appspot.com/13829043

Committer: Russ Cox <rsc@golang.org>