]>
Cypherpunks repositories - gostls13.git/log
William Josephson [Wed, 18 Nov 2009 17:19:29 +0000 (09:19 -0800)]
Remove unnecessary execute bits.
R=rsc
https://golang.org/cl/156077
William Josephson [Wed, 18 Nov 2009 17:18:51 +0000 (09:18 -0800)]
Missing flags for FreeBSD shared link as used by cgo in default build.
R=rsc
https://golang.org/cl/157065
William Josephson [Wed, 18 Nov 2009 17:17:47 +0000 (09:17 -0800)]
Update legal.
R=rsc
https://golang.org/cl/156075
Devon H. O'Dell [Wed, 18 Nov 2009 17:11:39 +0000 (09:11 -0800)]
Add an intptr type to runtime; needed in FreeBSD
In thread.c, we need to cast to whatever the native
size of intptr is on the system, but we only have
uintptr available. They're the same size, but can't
do signed casts without this one :).
R=rsc
CC=golang-dev
https://golang.org/cl/156073
Russ Cox [Wed, 18 Nov 2009 17:11:17 +0000 (09:11 -0800)]
make all.bash finish on FreeBSD
R=dho
CC=golang-dev
https://golang.org/cl/156067
Devon H. O'Dell [Wed, 18 Nov 2009 07:58:51 +0000 (23:58 -0800)]
FreeBSD/i386 work
This patchset gets Go to pretty much the same state that
FreeBSD/amd64 is in.
R=rsc
https://golang.org/cl/157055
Eden Li [Wed, 18 Nov 2009 07:42:21 +0000 (23:42 -0800)]
cgo no longer translates function args that are void* into
unsafe.Pointer.
Fixes #254.
R=rsc
https://golang.org/cl/157060
Eden Li [Wed, 18 Nov 2009 07:42:15 +0000 (23:42 -0800)]
Updated AUTHORS/CONTRIBUTORS files according to
http://golang.org/doc/contribute.html#copyright
R=rsc
https://golang.org/cl/156066
Evan Shaw [Wed, 18 Nov 2009 07:34:08 +0000 (23:34 -0800)]
Added Kate syntax highlighting file.
R=rsc
https://golang.org/cl/155075
Evan Shaw [Wed, 18 Nov 2009 07:34:00 +0000 (23:34 -0800)]
Adding my name to authors/contributors.
R=rsc
https://golang.org/cl/154169
Russ Cox [Wed, 18 Nov 2009 07:23:18 +0000 (23:23 -0800)]
codereview: more attempts at robustness in the face of unexpected exceptions
R=r
https://golang.org/cl/156062
Trevor Strohman [Wed, 18 Nov 2009 07:22:41 +0000 (23:22 -0800)]
Adds Trevor Strohman to CONTRIBUTORS.
Google is my employer so no AUTHORS change is needed.
R=rsc
https://golang.org/cl/154174
Russ Cox [Wed, 18 Nov 2009 06:54:20 +0000 (22:54 -0800)]
runtime: add ARM memmove
R=ken2
https://golang.org/cl/156063
Russ Cox [Wed, 18 Nov 2009 06:16:55 +0000 (22:16 -0800)]
copy tweaks
* move memmove to arch-specific subdirectories
* add memmove for arm
* add copyright notices marking them as copied from Inferno
R=ken2
https://golang.org/cl/156061
Rob Pike [Wed, 18 Nov 2009 06:14:34 +0000 (22:14 -0800)]
add a test for %+v in nested structures.
threw in an embedded one for good measure.
R=rsc
CC=golang-dev
https://golang.org/cl/157058
Ken Thompson [Wed, 18 Nov 2009 06:00:59 +0000 (22:00 -0800)]
allow copy to be used without a return value
R=rsc
https://golang.org/cl/156060
Russ Cox [Wed, 18 Nov 2009 06:00:30 +0000 (22:00 -0800)]
runtime: two trivial but important bug fixes
R=r
https://golang.org/cl/156059
Russ Cox [Wed, 18 Nov 2009 06:00:17 +0000 (22:00 -0800)]
release.2009-11-17: tag as of earlier this evening
R=r
https://golang.org/cl/156058
Ken Thompson [Wed, 18 Nov 2009 04:44:35 +0000 (20:44 -0800)]
bug in copy
R=rsc
https://golang.org/cl/156056
Ken Thompson [Wed, 18 Nov 2009 04:41:44 +0000 (20:41 -0800)]
install copy predefined
did not test 386, but should work
shouldnt matter if copy is not used
R=rsc
https://golang.org/cl/156055
Adam Langley [Wed, 18 Nov 2009 02:21:47 +0000 (18:21 -0800)]
crypto/rsa: add PKCS#1 v1.5 signature support.
R=rsc
CC=golang-dev
https://golang.org/cl/156051
Adam Langley [Wed, 18 Nov 2009 02:09:41 +0000 (18:09 -0800)]
asn1:
* add Marshal
* add BitString.RightAlign
* change to using a *time.Time (from time.Time) since that's what
the time package uses.
* return the unparsed data from Unmarshal.
R=rsc
CC=golang-dev
https://golang.org/cl/156047
Russ Cox [Wed, 18 Nov 2009 00:52:36 +0000 (16:52 -0800)]
codereview: handle spaces and other unexpected chars in nicknames
R=r
https://golang.org/cl/157053
Josh Goebel [Wed, 18 Nov 2009 00:46:58 +0000 (16:46 -0800)]
Let us have side by side git if we want
R=r, rsc
https://golang.org/cl/156046
Josh Goebel [Wed, 18 Nov 2009 00:22:29 +0000 (16:22 -0800)]
Add myself to authors and contributors
R=r
https://golang.org/cl/156045
Russ Cox [Wed, 18 Nov 2009 00:03:14 +0000 (16:03 -0800)]
reflect: document that PkgPath and Name return
empty string for unnamed types.
Fixes #249.
R=r
https://golang.org/cl/156052
Russ Cox [Tue, 17 Nov 2009 22:45:10 +0000 (14:45 -0800)]
http: do not crash accessing r.Form if ParseForm fails
Fixes #233.
R=dsymonds1
https://golang.org/cl/154179
Russ Cox [Tue, 17 Nov 2009 22:42:08 +0000 (14:42 -0800)]
runtime: do not create new threads during malloc.
the signal handling stack is a different size than
the normal stack, so it cannot be allocated using
the backup stack allocator.
Fixes #250.
R=agl1
CC=golang-dev
https://golang.org/cl/157044
Rob Pike [Tue, 17 Nov 2009 22:40:07 +0000 (14:40 -0800)]
explain the situation with unicode and identifiers
R=rsc
CC=golang-dev
https://golang.org/cl/156044
Ken Thompson [Tue, 17 Nov 2009 22:11:50 +0000 (14:11 -0800)]
fix botch
R=rsc
https://golang.org/cl/157046
Ken Thompson [Tue, 17 Nov 2009 21:59:38 +0000 (13:59 -0800)]
change a n^2 algorithm in
data initialization to n*log(n)
R=rsc
https://golang.org/cl/158041
Rob Pike [Tue, 17 Nov 2009 19:44:15 +0000 (11:44 -0800)]
improve documentation of runtime. there was no mention of types.
R=rsc
CC=golang-dev
https://golang.org/cl/157042
Rob Pike [Tue, 17 Nov 2009 19:40:25 +0000 (11:40 -0800)]
case insensitive matching in CONTRIBUTORS file
R=rsc
https://golang.org/cl/157043
Aron Nopanen [Tue, 17 Nov 2009 19:29:02 +0000 (11:29 -0800)]
Make non-errored RPC calls return 'nil' error to caller.
Error information is carried from RPC server to client in the string
'Error' field of rpc.Response. An empty string is sent in the success
case. This empty string was being returned to the caller (of Client.Call
or Client.Go), resulting in a non-nil error response.
This change detects an empty-string Response.Error at the client, and
translates it into a nil value in Call.Error.
Tests updated to check error return in success cases.
R=r, rsc
https://golang.org/cl/154159
Aron Nopanen [Tue, 17 Nov 2009 19:28:54 +0000 (11:28 -0800)]
Add myself to 'AUTHORS' and 'CONTRIBUTORS'
R=rsc, r
https://golang.org/cl/154175
Russ Cox [Tue, 17 Nov 2009 17:08:54 +0000 (09:08 -0800)]
codereview: discard \r characters (sigh)
R=r
https://golang.org/cl/157041
Sergio Luis O. B. Correia [Tue, 17 Nov 2009 17:02:47 +0000 (09:02 -0800)]
cmd/cc: Fix -I switch to handle a path with blankspaces correctly
Currently, -I switch can't deal with a path containing spaces.
This commit simplify setinclude(), by removing the special case
of a string that had spaces. After this change, setinclude() will
merely add the given directories to the include path, if it does
not yet exist, and this approach works.
Will be needed for solving issue 115.
R=agl1, rsc, iant2, r
https://golang.org/cl/155059
Sergio Luis O. B. Correia [Tue, 17 Nov 2009 17:02:41 +0000 (09:02 -0800)]
Add myself to list of AUTHORS/CONTRIBUTORS for Go.
R=rsc
https://golang.org/cl/154180
Russ Cox [Tue, 17 Nov 2009 16:47:48 +0000 (08:47 -0800)]
codereview: add clpatch --ignore_hgpatch_errors.
of limited utility but good for creating the metadata
for an AUTHORS/CONTRIBUTORS change even if
the patch doesn't apply cleanly.
R=r
https://golang.org/cl/154140
Russ Cox [Tue, 17 Nov 2009 16:39:56 +0000 (08:39 -0800)]
math: fix argument names in Atan2
(error introduced converting from arg1, arg2)
Fixes #220.
R=r
https://golang.org/cl/156041
Russ Cox [Tue, 17 Nov 2009 16:39:26 +0000 (08:39 -0800)]
Make.pkg: have "make coverage" invoke 6cov with correct binary
Fixes #239.
R=r
https://golang.org/cl/154176
Russ Cox [Tue, 17 Nov 2009 16:39:17 +0000 (08:39 -0800)]
net: enforce timeouts for ReadFrom/WriteTo
Fixes #153.
R=r
https://golang.org/cl/154177
Russ Cox [Tue, 17 Nov 2009 16:39:04 +0000 (08:39 -0800)]
syscall: use correct pointer in recvfrom/sendto.
linux/386 stack trace: use 32-bit hex.
Fixes #159.
R=r
https://golang.org/cl/154178
Devon H. O'Dell [Tue, 17 Nov 2009 16:32:23 +0000 (08:32 -0800)]
Pass ui into PostMessage to avoid nasty/confusing exception
R=rsc
https://golang.org/cl/155079
Devon H. O'Dell [Tue, 17 Nov 2009 16:20:58 +0000 (08:20 -0800)]
FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)
R=rsc, VenkateshSrinivas
https://golang.org/cl/152142
Rob Pike [Tue, 17 Nov 2009 07:32:30 +0000 (23:32 -0800)]
Rework gobs to fix bad bug related to sharing of id's between encoder and decoder side.
Fix is to move all decoder state into the decoder object.
Fixes #215.
R=rsc
CC=golang-dev
https://golang.org/cl/155077
Rob Pike [Tue, 17 Nov 2009 07:32:16 +0000 (23:32 -0800)]
fix bug causing empty strings to be become non-nil errors on client side of rpc connection.
R=rsc
CC=golang-dev
https://golang.org/cl/155078
Rob Pike [Tue, 17 Nov 2009 05:56:38 +0000 (21:56 -0800)]
fix typo in Append return type
R=rsc
https://golang.org/cl/155058
Robert Griesemer [Tue, 17 Nov 2009 01:53:39 +0000 (17:53 -0800)]
bug218.go: testcase for issue 238
R=rsc
https://golang.org/cl/154172
Russ Cox [Tue, 17 Nov 2009 01:51:47 +0000 (17:51 -0800)]
runtime: make signal handler work on 386
R=r
https://golang.org/cl/154171
Russ Cox [Tue, 17 Nov 2009 01:40:47 +0000 (17:40 -0800)]
gc: change "can we const evaluate this" from blacklist to whitelist
R=ken2
https://golang.org/cl/155074
Russ Cox [Tue, 17 Nov 2009 01:40:03 +0000 (17:40 -0800)]
6l: fix divide by zero in glibc linker.
repeats 8l change http://code.google.com/p/go/source/detail?r=
7594e16b5cf9
Fixes #179.
R=iant
https://golang.org/cl/154145
Adam Langley [Mon, 16 Nov 2009 23:39:04 +0000 (15:39 -0800)]
unsafe: documentation typo.
Fixes #236.
R=r
CC=golang-dev
https://golang.org/cl/155072
Robert Griesemer [Mon, 16 Nov 2009 23:25:16 +0000 (15:25 -0800)]
Add id attribute to h2 and h3 tags so that they exist when referring
to generated pages even if Javascript has not introduced them yet.
R=rsc
https://golang.org/cl/154167
Robert Griesemer [Mon, 16 Nov 2009 22:26:29 +0000 (14:26 -0800)]
Don't emit line tags when source code is printed as part of
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.
This fixes an an issue where some headers lost their ability
to link to the respective source code.
R=rsc
https://golang.org/cl/154166
David Symonds [Mon, 16 Nov 2009 21:39:59 +0000 (13:39 -0800)]
Add some primitive type aliases to exp/iterable and define Iter on them.
R=rsc
https://golang.org/cl/155065
David G. Andersen [Mon, 16 Nov 2009 20:40:01 +0000 (12:40 -0800)]
An asked-for-in #go-nuts extension to quickly create a repeated
copy of a string or a byte array.
strings.Repeat("-", 50)
bytes.Repeat(b, 99)
R=rsc
https://golang.org/cl/155063
David G. Andersen [Mon, 16 Nov 2009 20:39:37 +0000 (12:39 -0800)]
Adding my name to authors/contributors. I'm waiting to hear
back from Carnegie Mellon about whether they're interested in
signing the agreement (do you know if they have already?).
In the meantime, I'm submitting these changes on my own time.
If CMU has already signed the corporate contributor agreement,
please remove my name from the AUTHORS list.
R=rsc
https://golang.org/cl/154161
Kai Backman [Mon, 16 Nov 2009 19:58:28 +0000 (11:58 -0800)]
s/AJMP/AB/ to fix build breakage.
R=rsc
https://golang.org/cl/155069
Adam Langley [Mon, 16 Nov 2009 19:56:18 +0000 (11:56 -0800)]
doc: fix typo.
Fixes #218
R=r
CC=golang-dev
https://golang.org/cl/155067
Robert Griesemer [Mon, 16 Nov 2009 16:58:55 +0000 (08:58 -0800)]
- Clarify that struct composite literal keys are field names not selectors.
- Slight re-phrasing of struct type section since "field name" was not
properly introduced.
Fixes #164.
R=r, rsc, iant
https://golang.org/cl/155061
Robert Griesemer [Mon, 16 Nov 2009 01:42:27 +0000 (17:42 -0800)]
Use ElementType consistently.
Fixes #173.
R=r, rsc, r1
https://golang.org/cl/154156
Russ Cox [Mon, 16 Nov 2009 01:24:14 +0000 (17:24 -0800)]
gc: fix up floating point NaN comparisons
Fixes #167.
R=ken2
https://golang.org/cl/155062
Adam Langley [Sun, 15 Nov 2009 22:00:46 +0000 (14:00 -0800)]
crypto/md5: fix comment typo.
Fixes #210.
R=rsc
CC=golang-dev
https://golang.org/cl/155057
Rob Pike [Sun, 15 Nov 2009 21:09:43 +0000 (13:09 -0800)]
add a paragraph about GOMAXPROCS
R=rsc
CC=golang-dev
https://golang.org/cl/154153
Russ Cox [Sun, 15 Nov 2009 20:57:39 +0000 (12:57 -0800)]
godefs: avoid gcc 4'isms in command line.
Fixes #97.
R=r
https://golang.org/cl/155054
Russ Cox [Sun, 15 Nov 2009 20:57:33 +0000 (12:57 -0800)]
godocs.js: fix bad variable name
Thanks to anno.langen.
Fixes #103.
R=r
https://golang.org/cl/155050
Russ Cox [Sun, 15 Nov 2009 20:57:28 +0000 (12:57 -0800)]
makefiles: use correct gcc order in case --as-needed is in use.
Suggested by eostapets.
Fixes #141.
R=r
https://golang.org/cl/155049
Russ Cox [Sun, 15 Nov 2009 20:57:21 +0000 (12:57 -0800)]
cgo: arrange for English error messages
Fixes #21.
R=r
https://golang.org/cl/155048
Russ Cox [Sun, 15 Nov 2009 20:57:15 +0000 (12:57 -0800)]
runtime: avoid crash in Caller
Fixes #176.
R=r
https://golang.org/cl/154146
Russ Cox [Sun, 15 Nov 2009 20:57:09 +0000 (12:57 -0800)]
gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.
* add context to error about implicit assignment.
Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.
R=ken2
https://golang.org/cl/154144
Russ Cox [Sun, 15 Nov 2009 20:56:50 +0000 (12:56 -0800)]
http.URLEscape: escape all bytes required by RFC 2396
Fixes #125.
R=r
https://golang.org/cl/154143
Russ Cox [Sun, 15 Nov 2009 20:56:39 +0000 (12:56 -0800)]
gotest: show the test file pattern in "no test files" error
Fixes #190.
R=r
https://golang.org/cl/154142
Rob Pike [Sun, 15 Nov 2009 20:09:59 +0000 (12:09 -0800)]
fix some typos in the documentation
Fixes #196.
R=rsc
https://golang.org/cl/154152
Rob Pike [Sun, 15 Nov 2009 20:07:27 +0000 (12:07 -0800)]
fix bug in bytes.Map and add test cases for Map in both strings and bytes packages.
thanks to ulrik.sverdrup for the test case.
Fixes #191.
R=rsc
CC=golang-dev
https://golang.org/cl/155056
Robert Griesemer [Sun, 15 Nov 2009 19:33:20 +0000 (11:33 -0800)]
Use // to start comment instead of #.
Fixes #189.
R=r
CC=rsc
https://golang.org/cl/155055
Russ Cox [Sun, 15 Nov 2009 08:00:05 +0000 (00:00 -0800)]
cc: drop redundant strcpy
Fixes #192.
R=ken2
https://golang.org/cl/155047
Russ Cox [Sun, 15 Nov 2009 07:25:55 +0000 (23:25 -0800)]
cc: eliminate two fixed-size buffers
Fixes bug 168.
Alternative to https://golang.org/cl/152143.
R=ken2
https://golang.org/cl/155042
Kai Backman [Sun, 15 Nov 2009 07:08:22 +0000 (23:08 -0800)]
complain if GOARCH != arm. fix build break caused by gomake
introduction.
R=rsc
https://golang.org/cl/152109
Adam Langley [Sun, 15 Nov 2009 04:38:00 +0000 (20:38 -0800)]
crypto/rsa: handle the case of non-coprime blinds.
We are dealing with the multiplicative group ℤ/pqℤ. Multiples of
either p or q are not members of the group since they cannot have an
inverse. (Such numbers are 0 in the subgroup ℤ/pℤ.)
With p and q of typical size (> 512 bits), the probability of a random
blind [1..pq-1] being a multiple of p or q is negligible. However, in
the unit tests, much smaller sizes are used and the event could occur.
This change checks the result of the ext GCD and deals with this case.
It also increases the size of p and q in the unit test as a large
number of the keys selected were p, q = 227,169.
R=rsc
CC=golang-dev
https://golang.org/cl/154141
Kai Backman [Sun, 15 Nov 2009 04:08:22 +0000 (20:08 -0800)]
make arm pass match what's working on real hardware
R=rsc
https://golang.org/cl/154097
Russ Cox [Sun, 15 Nov 2009 03:28:13 +0000 (19:28 -0800)]
test/interface/receiver.go: expand to do dynamic
versions of static checks in receiver1.go
R=r
https://golang.org/cl/155045
Devon H. O'Dell [Sat, 14 Nov 2009 23:29:09 +0000 (15:29 -0800)]
Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.
R=rsc
https://golang.org/cl/152138
Devon H. O'Dell [Sat, 14 Nov 2009 23:28:47 +0000 (15:28 -0800)]
Adding myself to AUTHORS/CONTRIBUTORS for Go.
R=rsc
https://golang.org/cl/155041
Môshe van der Sterre [Sat, 14 Nov 2009 22:42:22 +0000 (14:42 -0800)]
encoding/binary: implemented the Write function
The ByteOrder.Put* methods are already available, this change uses
them to implement the Write function.
R=golang-dev, agl1, rsc, r
https://golang.org/cl/152141
Môshe van der Sterre [Sat, 14 Nov 2009 22:42:15 +0000 (14:42 -0800)]
Adding my name to CONTRIBUTORS and AUTHORS
As Adam Langley mentioned, this should go in with
https://golang.org/cl/152141
R=rsc
CC=agl1
https://golang.org/cl/154138
Russ Cox [Sat, 14 Nov 2009 22:14:27 +0000 (14:14 -0800)]
gc: do not try to constant-evaluate (interface{})("bar")
Fixes #183.
R=ken
https://golang.org/cl/154139
Rob Pike [Sat, 14 Nov 2009 20:23:24 +0000 (12:23 -0800)]
move evaluation of null-matching instructions one iteration earlier.
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.
Fixes #110.
R=rsc
CC=golang-dev
https://golang.org/cl/152131
Abhinav Gupta [Sat, 14 Nov 2009 19:46:09 +0000 (11:46 -0800)]
xml: Fixed CDATA parsing.
Fixes #128.
R=r, rsc
https://golang.org/cl/154126
Abhinav Gupta [Sat, 14 Nov 2009 19:45:32 +0000 (11:45 -0800)]
Added self to AUTHORS and CONTRIBUTORS.
R=rsc
https://golang.org/cl/154128
Russ Cox [Sat, 14 Nov 2009 18:28:53 +0000 (10:28 -0800)]
typos
Fixes #171.
Fixes #172.
R=agl1
https://golang.org/cl/154136
David Titarenco [Sat, 14 Nov 2009 02:06:47 +0000 (18:06 -0800)]
Created new Conn.Flush() public method so the fd pipeline can be drained arbitrarily by the user.
Commented both flush methods so people know what they are looking at.
This is a necessary fix for streaming and long polling HTTP services.
Fixes #93.
R=r, rsc, david.titarenco
https://golang.org/cl/154099
David Titarenco [Sat, 14 Nov 2009 02:06:27 +0000 (18:06 -0800)]
Added self to AUTHORS and CONTRIBUTORS prior to first submission.
R=rsc
https://golang.org/cl/153057
Nigel Tao [Sat, 14 Nov 2009 01:40:20 +0000 (17:40 -0800)]
Remove unnecessary int(h) casts in image.go.
R=rsc
https://golang.org/cl/154125
Rob Pike [Sat, 14 Nov 2009 00:00:55 +0000 (16:00 -0800)]
fix typo
R=rsc
https://golang.org/cl/152128
James Aguilar [Fri, 13 Nov 2009 23:52:30 +0000 (15:52 -0800)]
Correct indentation for go-mode where a close brace following a semi-
colon-less statement would be indented one stop too many.
R=rsc, aclements
CC=aclements
https://golang.org/cl/154096
James Aguilar [Fri, 13 Nov 2009 23:52:24 +0000 (15:52 -0800)]
Add myself to the contributors file.
R=rsc
https://golang.org/cl/152101
Adam Langley [Fri, 13 Nov 2009 22:59:04 +0000 (14:59 -0800)]
json: minor comment fix.
I screwed up and didn't write one of the code review changes to disk
before submitting.
TBR=rsc
R=rsc
https://golang.org/cl/154122
Rob Pike [Fri, 13 Nov 2009 21:15:18 +0000 (13:15 -0800)]
Explain why
-flag true
does not work although
-flag=true
does.
Fixes #139.
R=iant
CC=golang-dev
https://golang.org/cl/154118
Russ Cox [Fri, 13 Nov 2009 21:10:53 +0000 (13:10 -0800)]
test/run: use bash, not sh.
use bash builtin time instead of
assuming /usr/bin/time exists.
R=r
https://golang.org/cl/152124