Before and after:
BenchmarkTrimSpace 20000000 81.3 ns/op
BenchmarkTrimSpace 50000000 58.0 ns/op
(most whitespace trimming is ASCII whitespace)
Same optimization appeared a handful of other places
in this file, but not here.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7305063
This is necessary for systems that use select as the pollster,
such as Solaris (supported by gccgo). It corresponds to the
bool returned by AddFD. In general it's not clearly defined
what happens when a descriptor used in a select is closed, and
different systems behave differently. Waking up the select
will cause the right thing to happen: the closed descriptor
will be dropped from the next iteration.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7303056
deferred block. This makes hangs in the waiting code less likely
if a goroutine exits abnormally.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7306052
This CL is the first of a handful of CLs which will provide
the implementation of cookiejar. It contains several helper
functions and the skeleton of Cookies and SetCookies.
Proper host name handling requires the ToASCII transformation
from package idna which currently lives in the go.net
subrepo. This CL thus contains just a TODO for this issue.
R=nigeltao, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7287046
Removes limit on maximum number of goroutines ever existed.
code.google.com/p/goexecutor tests now pass successfully.
Also slightly improves performance.
Before: $ time ./flate.test -test.short
real 0m9.314s
After: $ time ./flate.test -test.short
real 0m8.958s
Fixes#4286.
The runtime is built from llvm rev 174312.
R=rsc
CC=golang-dev
https://golang.org/cl/7218044
Closing the inotify file descriptor can take over a second
when running on Ubuntu Precise in an NFS directory, leading to
the test error in issue 3132. Closing the event channel first
lets a client that does not care about the error channel move
on.
Fixes#3132.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/7300045
Plan 9 compilers insist this but as we don't have Plan 9
builders, we'd better let gcc check the prototypes.
Inspired by CL 7289050.
R=golang-dev, seed, dave, rsc, lucio.dere
CC=akumar, golang-dev
https://golang.org/cl/7288056
This updates a bad reference to a method name in the example priority queue test.
The error was introduced in the example refactoring in rev. 2ea8f07b2ffe.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7279045
A new comment directive //go:noescape instructs the compiler
that the following external (no body) func declaration should be
treated as if none of its arguments escape to the heap.
Fixes#4099.
R=golang-dev, dave, minux.ma, daniel.morsing, remyoudompheng, adg, agl, iant
CC=golang-dev
https://golang.org/cl/7289048
The dashboard is currently failing to store results of new builds for some keys, notable the go.codereview sub repository. This is causing the builders to mark the entire triggering commit as failed. With the help of David Symonds we think it is because the results value has breached the 1mb datastore limit on AppEngine.
R=dsymonds, adg
CC=golang-dev
https://golang.org/cl/6858094
If a Handle's Write to a ResponseWriter fails (e.g. via a
net.Conn WriteDeadline via WriteTimeout on the Server), the
Server was blocking forever waiting for reads on that
net.Conn, even after a Write failed.
Instead, once we see a Write fail, close the connection,
since it's then dead to us anyway.
Fixes#4741
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7301043
If the analysis reached a node twice, then the analysis was cut off.
However, if the second arrival is at a lower depth (closer to escaping)
then it is important to repeat the traversal.
The repeating must be cut off at some point to avoid the occasional
infinite recursion. This CL cuts it off as soon as possible while still
passing all tests.
Fixes#4751.
R=ken2
CC=golang-dev, lvd
https://golang.org/cl/7303043
This provides the mechanism to connect SPDY support to the http
package, without pulling SPDY into the standard library.
R=rsc, agl, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/7287045
This CL adds TCPInfo struct to linux/386,arm.
It's already added to linux/amd64.
Note that not sure the reason but cgo godefs w/ latest gcc
translates a flexible array member in structures correctly,
handles it as a non-incomplete, non-opaque type, on Go 1.
This CL reverts such changes by hand for the Go 1 contract.
R=minux.ma, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/7197046
Deadlines should be extended at the beginning of
a request, not at the beginning of a connection.
Fixes#4676
R=golang-dev, fullung, patrick.allen.higgins, adg
CC=golang-dev
https://golang.org/cl/7220076
Was not re-walking the new AND node, so that its ullman
count was wrong, so that the code generator attempted to
store values in registers across the call.
Fixes#4752.
R=ken2
CC=golang-dev
https://golang.org/cl/7288054
In cmd/go's 'go help testflag':
* Rewrite list of flags to drop test. prefix on every name.
* Sort list of flags.
* Add example of using -bench to match all benchmarks.
In testing:
* Remove mention of undefined 'CPU group' concept.
Fixes#4488.
Fixes#4508.
R=adg
CC=golang-dev
https://golang.org/cl/7288053
* Document Parse's zone interpretation.
* Add ParseInLocation (API change).
* Recognize "wrong" time zone names, like daylight savings time in winter.
* Disambiguate time zone names using offset (like winter EST vs summer EST in Sydney).
The final two are backwards-incompatible changes, but I believe
they are both buggy behavior in the Go 1.0 versions; the old results
were more wrong than the new ones.
Fixes#3604.
Fixes#3653.
Fixes#4001.
R=adg
CC=golang-dev
https://golang.org/cl/7288052
This only affects code (with exception of lookupProtocol)
that is only executed on older versions of Windows.
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7293043
* Avoid treating CALL fn(SB) as justification for introducing
and tracking a registerized variable for fn(SB).
* Remove USED(n) after declaration and zeroing of n.
It was left over from when the compiler emitted more
aggressive set and not used errors, and it was keeping
the optimizer from removing a redundant zeroing of n
when n was a pointer or integer variable.
Update #597.
R=ken2
CC=golang-dev
https://golang.org/cl/7277048