Pieter Droogendijk [Mon, 25 Jun 2012 21:20:48 +0000 (17:20 -0400)]
go/build: fix doc typo
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 ..."
Amir Mohammad Saied [Mon, 25 Jun 2012 21:19:08 +0000 (17:19 -0400)]
misc/chrome/gophertool: Support for manifest version 1 is being phased out.
Manifest version 1 was deprecated in Chrome 18, and support will be phased
out according to the schedule available at:
http://code.google.com/chrome/extensions/manifestVersion.html
Micah Stetson [Mon, 25 Jun 2012 20:03:18 +0000 (16:03 -0400)]
encoding/json: simplify (*decodeState).indirect
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.
Dave Cheney [Mon, 25 Jun 2012 13:01:34 +0000 (23:01 +1000)]
runtime: remove memset/memclr shim
This CL resolves https://golang.org/cl/6300043/#msg3
by renaming memset_arm.s to memclr_arm.s and merging the function
of the same name from asm_arm.s.
Dmitriy Vyukov [Mon, 25 Jun 2012 07:08:09 +0000 (11:08 +0400)]
runtime: fix potential GC deadlock
The issue seems to not be triggered right now,
but I've seen the deadlock after some other legal
modifications to runtime.
So I think we are safer this way.
R=rsc, r
CC=golang-dev
https://golang.org/cl/6339051
Russ Cox [Sun, 24 Jun 2012 23:47:50 +0000 (19:47 -0400)]
runtime: detect hash map collision problems
This can only happen if the hash function we're using is getting
far more than it's fair share of collisions, but that has happened
to us repeatedly as we've expanded the allowed use cases for
hash tables (issue 1544, issue 2609, issue 2630, issue 2883, issue 3695).
Maybe this will help the next time we try something new.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6306083
Charles L. Dorian [Sun, 24 Jun 2012 23:39:07 +0000 (19:39 -0400)]
math: improve Atan, Asin and Acos accuracy
pkg/math/all_test.go tests Atan (and therefore Asin and Acos) to a
relative accuracy of 4e-16, but the test vector misses values where
the old algorithm was in error by more than that. For example:
David G. Andersen [Fri, 22 Jun 2012 22:07:22 +0000 (15:07 -0700)]
net/rpc: fix typo in documentation, clarify semantics of error return
Several of my students were confused by trying to use both the error
return and a reply return, so I figured it was worth explicitly clarifying
that returning an error overrides the reply.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6327051
Adam Langley [Wed, 20 Jun 2012 20:18:56 +0000 (16:18 -0400)]
crypto/x509: add extended key usage support.
Flame motivated me to get around to adding extended key usage support
so that code signing certificates can't be used for TLS server
authentication and vice versa.
Shenghou Ma [Tue, 19 Jun 2012 17:17:03 +0000 (01:17 +0800)]
runtime: fix struct Sigaction for Linux/ARM
if we were to use sizeof(sa.sa_mask) instead of 8 as the last argument
to rt_sigaction, we would have already fixed this bug, so also updated
Linux/386 and Linux/amd64 files to use that; also test the return value
of rt_sigaction.
Brad Fitzpatrick [Tue, 19 Jun 2012 16:20:41 +0000 (09:20 -0700)]
net/http: make client await response concurrently with writing request
If the server replies with an HTTP response before we're done
writing our body (for instance "401 Unauthorized" response), we
were previously ignoring that, since we returned our write
error ("broken pipe", etc) before ever reading the response.
Now we read and write at the same time.
Brad Fitzpatrick [Tue, 19 Jun 2012 16:10:14 +0000 (09:10 -0700)]
net/http: clarify client return values in docs
Also, fixes one violation found during testing where both
response and error could be non-nil when a CheckRedirect test
failed. This is arguably a minor API (behavior, not
signature) change, but it wasn't documented either way and was
inconsistent & non-Go like. Any code depending on the old
behavior was wrong anyway.
I'm not entirely sure why the JSON* numbers have changed, but
eyeballing the profile suggests that it could be spending less
and more time in runtime.{new,old}stack, so it could simply be
stack-split boundary noise.
Rob Pike [Wed, 13 Jun 2012 22:55:43 +0000 (15:55 -0700)]
encoding/gob: don't cache broken encoding engines.
Fixes a situation where a nested bad type would still
permit the outer type to install a working engine, leading
to inconsistent behavior.
Russ Cox [Fri, 8 Jun 2012 17:05:01 +0000 (13:05 -0400)]
regexp/syntax: unexport ErrUnexpectedParen
This new error is the only API change in the current draft of
Go 1.0.2 CLs. I'd like to include the CL that introduced it,
because it replaces a mysterious 'internal error' with a
useful error message, but I don't want any API changes,
so unexport the error constant for now. It can be
re-exported for Go 1.1.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6294055
Shenghou Ma [Thu, 7 Jun 2012 18:56:23 +0000 (02:56 +0800)]
test/bench/shoutout: fix compliation
-lm must come after the source file, versions of gcc insist this strict order.
On standard compliant systems, we no longer need malloc.h for malloc.
Use pkg-config(1) to get correct glib cflags and libs.
Fix compiler warning in threadring.c and k-nucleotide.c.
Russ Cox [Thu, 7 Jun 2012 16:37:50 +0000 (12:37 -0400)]
cmd/cgo: make Go code order deterministic
The type declarations were being generated using
a range over a map, which meant that successive
runs produced different orders. This will make sure
successive runs produce the same files.
Russ Cox [Thu, 7 Jun 2012 07:15:09 +0000 (03:15 -0400)]
cmd/gc: run escape analysis in call graph dependency order
If there are mutually recursive functions, there is a cycle in
the dependency graph, so the order is actually dependency order
among the strongly connected components: mutually recursive
functions get put into the same batch and analyzed together.
(Until now the entire package was put in one batch.)
The non-recursive case (single function, maybe with some
closures inside) will be able to be more precise about inputs
that escape only back to outputs, but that is not implemented yet.
Nigel Tao [Thu, 7 Jun 2012 03:05:35 +0000 (13:05 +1000)]
exp/html: make the tokenizer return atoms for tag tokens.
This is part 1 of a 2 part changelist. Part 2 contains the mechanical
change to parse.go to compare atoms (ints) instead of strings.
The overall effect of the two changes are:
benchmark old ns/op new ns/op delta
BenchmarkParser 44622744058254 -9.05%
BenchmarkRawLevelTokenizer 913202 912917 -0.03%
BenchmarkLowLevelTokenizer 12686261267836 -0.06%
BenchmarkHighLevelTokenizer 19473051968944 +1.11%
R=rsc
CC=andybalholm, golang-dev, r
https://golang.org/cl/6305053
Here is a static copy of the go/parser benchmark. I ended up using
fancy encodings because the original parser.go had a number of `s
scattered throughout which made it hard to embed the source directly.
Curiously on my laptop this benchmark always scores roughly 10% higher
than the standalone benchmark. This may be down to the generation of
the fasta data set triggering the cpu governor to raise the cpu speed.
However the benchmark is consistent with itself across multiple runs.
The datastore.Query methods once mutated the Query value, but now they return
a derivative query, so the Hash= and ParentHash= filters were not being
applied.