The switch at the beginning of the function already ensures n > 1,
so testing for n < 2 is redundant.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6350051
Occasionally I see:
--- FAIL: TestAllocations-15 (0.00 seconds)
all_test.go:1575: 6 mallocs after 100 iterations
Tested:
$ go test -cpu=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 reflect
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/6354063
otherwise it fails spuriously with "newfunc allocated unexpectedly" message
when run with GOMAXPROCS>1 (other goroutine allocates).
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6347056
Generating env.bat using dist env -wp > env.bat failed silently
if case of an error, because the message was redirected to env.bat.
Verbose messages still go to stdout, causing problems, but that's
a seperate change.
Made errprintf() identical to xprintf(), except for the output handle.
Yes, it's duplicate code, but most of the function is unpacking
the argument list and preparing it for WriteFile(), which has to be
done anyway.
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/6343047
The previous code assumed the gofmt output referred to /tmp but
that's not true if TMPDIR points somewhere else (like on Macs).
Fixes#3782.
R=sameer
CC=golang-dev
https://golang.org/cl/6346050
- point out difference between selectors and qualified identifiers
- differentiate between illegal selectors and run-time panics
- use "indirect" as opposed to "dereference" consistently
- add extra links
Fixes#3779.
R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6326059
Number represents the actual JSON text,
preserving the precision and
formatting of the original input.
R=rsc, iant
CC=golang-dev
https://golang.org/cl/6202068
go/build section "Build Constraints", first paragraph said:
"... they must be appear near the top of the file ..."
fixed to:
"... they must appear near the top of the file ..."
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6329060
Removes an incorrect code comment and some superfluous variables.
The comment I removed says that struct fields which implement
Unmarshaler must be pointers, even if they're in an addressable
struct. That's not the case, and there's already a test in decode_test.go
that demonstrates as much.
Encoding/json has quite a few assignments of reflect.Values to extra
variables – things like "iv := v" when there's no need to make a copy. I
think these are left over from a previous version of the reflect API. If they
aren't wanted, I wouldn't mind going through the package and getting
rid of the rest of them.
R=rsc
CC=golang-dev
https://golang.org/cl/6318047
- receiving from a closed channel returns immediately
- in the ,ok form, the 2nd result is of type bool, not
just boolean (gc and ggcgo agree).
Per dsymonds' suggestion.
R=r, rsc, ken, iant, dsymonds
CC=golang-dev
https://golang.org/cl/6333057
This is a new, not yet committed API.
- Changed NewCommentMap to be independent of
*File nodes and more symmetric with the
Filter and Comments methods.
- Implemented Update method for use in
AST modifications.
- Implemented String method for debugging
R=rsc
CC=golang-dev
https://golang.org/cl/6303086
A few performance improvements, but without the stack sorting
change to avoid allocating, which is instead waiting on better
escape analysis.
R=rsc
CC=golang-dev
https://golang.org/cl/6265047