]> Cypherpunks repositories - gostls13.git/log
gostls13.git
11 years agocompress/flate: small documentation fix
Dominik Honnef [Sun, 8 Sep 2013 23:37:05 +0000 (09:37 +1000)]
compress/flate: small documentation fix

R=golang-dev, adg
CC=bradfitz, golang-dev, remyoudompheng
https://golang.org/cl/13568045

11 years agomisc/dist: Specify a version for the darwin package.
Emil Hessman [Sun, 8 Sep 2013 23:36:39 +0000 (09:36 +1000)]
misc/dist: Specify a version for the darwin package.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13383045

11 years agosort: fix up example expected output formatting
Robert Daniel Kortschak [Sun, 8 Sep 2013 03:21:03 +0000 (13:21 +1000)]
sort: fix up example expected output formatting

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13426046

11 years agosort: add a simpler sort.Interface example
Andriy Lytvynov [Sun, 8 Sep 2013 01:17:23 +0000 (11:17 +1000)]
sort: add a simpler sort.Interface example

Existing example renamed to Example_sortWrapper.
Fixes #6335.

R=golang-dev, rsc, taj.khattra, r
CC=golang-dev
https://golang.org/cl/13586043

11 years agoruntime: Smhasher tests of our map hash function.
Keith Randall [Fri, 6 Sep 2013 23:23:46 +0000 (16:23 -0700)]
runtime: Smhasher tests of our map hash function.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13436045

11 years agonet: don't error when marshalling nil IP addresses
Brad Fitzpatrick [Fri, 6 Sep 2013 22:29:09 +0000 (15:29 -0700)]
net: don't error when marshalling nil IP addresses

See https://code.google.com/p/go/issues/detail?id=6339#c3

Fixes #6339

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13553044

11 years agocompress/flate: prevent panic when reinitializing huffmanDecoder with bad input
Ehren Kret [Fri, 6 Sep 2013 22:09:42 +0000 (15:09 -0700)]
compress/flate: prevent panic when reinitializing huffmanDecoder with bad input

The huffmanDecoder struct appears to be intented for reuse by calling init a
second time with a second sequence of code lengths. Unfortunately, it can
currently panic if the second sequence of code lengths has a minimum value
greater than 10 due to failure to reinitialize the links table.

This change prevents the panic by resetting the huffmanDecoder struct back to
the struct's zero value at the beginning of the init method if the
huffmanDecoder is being reused (determined by checking if min has been set to a
non-zero value).

Fixes #6255.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13230043

11 years agoA+C: Ehren Kret (individual CLA)
Brad Fitzpatrick [Fri, 6 Sep 2013 22:03:14 +0000 (15:03 -0700)]
A+C: Ehren Kret (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/13234049

11 years agoruntime: account for all sys memory in MemStats
Dmitriy Vyukov [Fri, 6 Sep 2013 20:55:40 +0000 (16:55 -0400)]
runtime: account for all sys memory in MemStats
Currently lots of sys allocations are not accounted in any of XxxSys,
including GC bitmap, spans table, GC roots blocks, GC finalizer blocks,
iface table, netpoll descriptors and more. Up to ~20% can unaccounted.
This change introduces 2 new stats: GCSys and OtherSys for GC metadata
and all other misc allocations, respectively.
Also ensures that all XxxSys indeed sum up to Sys. All sys memory allocation
functions require the stat for accounting, so that it's impossible to miss something.
Also fix updating of mcache_sys/inuse, they were not updated after deallocation.

test/bench/garbage/parser before:
Sys 670064344
HeapSys 610271232
StackSys 65536
MSpanSys 14204928
MCacheSys 16384
BuckHashSys 1439992

after:
Sys 670064344
HeapSys 610271232
StackSys 65536
MSpanSys 14188544
MCacheSys 16384
BuckHashSys 3194304
GCSys 39198688
OtherSys 3129656

Fixes #5799.

R=rsc, dave, alex.brainman
CC=golang-dev
https://golang.org/cl/12946043

11 years agocmd/go: rename go.exe if cannot delete it during clean
Alex Brainman [Fri, 6 Sep 2013 20:55:35 +0000 (16:55 -0400)]
cmd/go: rename go.exe if cannot delete it during clean

Fixes #6179

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12916047

11 years agocmd/gc: add missing typecheck for walk-generated constants.
Rémy Oudompheng [Fri, 6 Sep 2013 20:55:30 +0000 (16:55 -0400)]
cmd/gc: add missing typecheck for walk-generated constants.

Fixes #6131.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/12800045

11 years agoarchive/tar: fix a case where USTAR-split is not working correctly.
Marco Hennings [Fri, 6 Sep 2013 20:49:38 +0000 (16:49 -0400)]
archive/tar: fix a case where USTAR-split is not working correctly.

For some long filenames the USTAR-split code does not work
correctly. It is wrongly assumed that the path would not be too long,
but it is.

The user visible result was that a filename was split, but it still
caused an error.

The cause was a wrongly calculated nlen. In addition I noticed that
at this place it is also seems necessary to check if the prefix will
fit in the 155 chars available for the prefix.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/13300046

11 years agosort: fix Example_sortMultiKeys
Andriy Lytvynov [Fri, 6 Sep 2013 20:49:34 +0000 (16:49 -0400)]
sort: fix Example_sortMultiKeys

Old example referenced global var from multiSorter.Sort and ignored it's argument.
Changed one of example calls to actually pass slice to sort.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13551044

11 years agocmd/5g, cmd/6g, cmd/8g: simplify for loop in bitmap generation
Russ Cox [Fri, 6 Sep 2013 20:49:11 +0000 (16:49 -0400)]
cmd/5g, cmd/6g, cmd/8g: simplify for loop in bitmap generation

Lucio De Re reports that the more complex
loop miscompiles on Plan 9.

R=ken2
CC=golang-dev
https://golang.org/cl/13602043

11 years agocmd/gofmt: sort more, remove some duplicate imports
Josh Bleecher Snyder [Fri, 6 Sep 2013 20:25:15 +0000 (16:25 -0400)]
cmd/gofmt: sort more, remove some duplicate imports

* Sort imports by import path, then import name, then comment. Currently, gofmt sorts only by import path.
* If two imports have the same import path and import name, and one of them has no comment, remove the import with no comment. (See the discussion at issue 4414.)

Based on @rsc's https://golang.org/cl/7231070/

Fixes #4414.

R=gri, rsc
CC=golang-dev
https://golang.org/cl/12837044

11 years agotest: fix build (update for new error message)
Russ Cox [Fri, 6 Sep 2013 20:15:30 +0000 (16:15 -0400)]
test: fix build (update for new error message)

R=golang-dev
CC=golang-dev
https://golang.org/cl/13521044

11 years agomisc/emacs: use built-in buffer-base-buffer instead of own variable
Dominik Honnef [Fri, 6 Sep 2013 20:08:11 +0000 (16:08 -0400)]
misc/emacs: use built-in buffer-base-buffer instead of own variable

R=adonovan
CC=golang-dev
https://golang.org/cl/13476043

11 years agocodereview: update use of promptchoice for Mercurial 2.7
Anthony Martin [Fri, 6 Sep 2013 19:48:21 +0000 (15:48 -0400)]
codereview: update use of promptchoice for Mercurial 2.7

Fixes #6186.

R=golang-dev, bradfitz, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/13112043

11 years agocmd/gc: remove "send used as value" hint
Russ Cox [Fri, 6 Sep 2013 19:47:52 +0000 (15:47 -0400)]
cmd/gc: remove "send used as value" hint

This message was helpful for pre-Go 1 users updating to Go 1.
That time is past. Now the message is confusing because it
depends on knowing what pre-Go 1 looked like.

Update #4697.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13335051

11 years agoruntime: handle timer overflow in tsleep
Anthony Martin [Fri, 6 Sep 2013 19:47:39 +0000 (15:47 -0400)]
runtime: handle timer overflow in tsleep

Make sure we never pass a timer into timerproc with
a negative duration since it will cause other timers
to never expire.

Fixes #5321.

R=golang-dev, minux.ma, remyoudompheng, mikioh.mikioh, r, bradfitz, rsc, dvyukov
CC=golang-dev
https://golang.org/cl/9035047

11 years agoapi: update go1.1, except and next.txt with constant values
Brad Fitzpatrick [Fri, 6 Sep 2013 19:01:18 +0000 (12:01 -0700)]
api: update go1.1, except and next.txt with constant values

O_SYNC changes only on linux-arm (and linux-arm-cgo), but
changes to match O_SYNC on linux-{386,amd64} and what Linux
upstream now uses.  See discussion and links on
https://golang.org/cl/13261050/

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13575045

11 years agocmd/api: include constant values
Brad Fitzpatrick [Fri, 6 Sep 2013 19:01:01 +0000 (12:01 -0700)]
cmd/api: include constant values

Update #5935

R=golang-dev, rsc, iant, dave
CC=golang-dev
https://golang.org/cl/13261050

11 years agoreflect: unexport BUCKETSIZE, MAXKEYSIZE, MAXVALSIZE
Brad Fitzpatrick [Fri, 6 Sep 2013 19:00:42 +0000 (12:00 -0700)]
reflect: unexport BUCKETSIZE, MAXKEYSIZE, MAXVALSIZE

But keep their case for ease of searching.

They were added recently. We don't want them part of go1.2's API.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13569044

11 years agocrypto/rand: make Read use io.ReadFull
Brad Fitzpatrick [Fri, 6 Sep 2013 19:00:27 +0000 (12:00 -0700)]
crypto/rand: make Read use io.ReadFull

Fixes #6084

R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/13523044

11 years agonet: Fix inaccurate docs for AcceptTCP and AcceptUnix.
Kamil Kisiel [Fri, 6 Sep 2013 19:00:03 +0000 (12:00 -0700)]
net: Fix inaccurate docs for AcceptTCP and AcceptUnix.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13592043

11 years agomisc/notepadplus: add interface to function list and use clang color in comments
ChaiShushan [Fri, 6 Sep 2013 18:59:53 +0000 (11:59 -0700)]
misc/notepadplus: add interface to function list and use clang color in comments

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13587043

11 years agocmd/dist: Plan 9 build needs an additional include path
Lucio De Re [Fri, 6 Sep 2013 06:15:44 +0000 (16:15 +1000)]
cmd/dist: Plan 9 build needs an additional include path
cmd/cc: bv.c imports libc.h twice

When using the Plan 9 compiler, the invocation

        #include <../ld/textflag.h>

works for the toolchain, but not for the MACH library.

Module cmd/cc/bv.c includes libc.h and "cc.h", which in
turn also includes libc.h.  In the Plan 9 context, this
causes a number of duplicate definitions.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/13303047

11 years agocmd/go: don't leave test binary around for coverage
Rob Pike [Fri, 6 Sep 2013 05:54:26 +0000 (15:54 +1000)]
cmd/go: don't leave test binary around for coverage
It's not needed to analyze coverage data.
Fixes #6120

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13343050

11 years agotest/nilptr: add more tests
Russ Cox [Fri, 6 Sep 2013 03:06:34 +0000 (23:06 -0400)]
test/nilptr: add more tests

These tests were suggested in golang.org/issue/6080.
They were fixed as part of the new nil pointer checks
that I added a few weeks ago.

Recording the tests as part of marking the issue closed.

Fixes #6080.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/13255049

11 years agoundo CL 13004046 / 5db14b33d6ef
Rob Pike [Thu, 5 Sep 2013 21:54:43 +0000 (07:54 +1000)]
undo CL 13004046 / 5db14b33d6ef

Flushing after every token negates the point of buffering. A different approach is required.

««« original CL description
encoding/xml: flush buffer after encoding token

R=rsc, bradfitz, adg
CC=golang-dev
https://golang.org/cl/13004046

»»»

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/13515043

11 years agocmd/ld: emit relocations for .debug_frame in external link mode
Ian Lance Taylor [Thu, 5 Sep 2013 19:55:21 +0000 (12:55 -0700)]
cmd/ld: emit relocations for .debug_frame in external link mode

This should have been part of revision 16731:cdedb129e020, but
I missed it.  This fixes printing local variables when doing
an external link.

No test because we aren't doing any debug info testing yet.

Fixes #5719.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13464046

11 years agocompress/zlib: add Reset method to Writer.
Rémy Oudompheng [Thu, 5 Sep 2013 19:50:47 +0000 (21:50 +0200)]
compress/zlib: add Reset method to Writer.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13171046

11 years agoreflect: do not cache trivial values in DeepEqual.
Rémy Oudompheng [Thu, 5 Sep 2013 19:37:07 +0000 (21:37 +0200)]
reflect: do not cache trivial values in DeepEqual.

DeepEqual caches addresses of compared values
each time it visits addressable values. This is
more expensive than actually comparing them in
the common case of large slices of bytes or integers.

Also add a fast path for slices with identical
underlying array.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13000044

11 years agocmd/dist: don't print misleading warning when using GOROOT_FINAL
Ian Lance Taylor [Thu, 5 Sep 2013 00:02:08 +0000 (17:02 -0700)]
cmd/dist: don't print misleading warning when using GOROOT_FINAL

Fixes #5240.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13546044

11 years agocompress/flate: use bytes.NewReader instead of NewBuffer in test
Brad Fitzpatrick [Wed, 4 Sep 2013 22:31:46 +0000 (15:31 -0700)]
compress/flate: use bytes.NewReader instead of NewBuffer in test

Also, report allocations in benchmark.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13410044

11 years agohtml/template: export the parse.Tree for the escaped template
Rob Pike [Wed, 4 Sep 2013 22:23:11 +0000 (08:23 +1000)]
html/template: export the parse.Tree for the escaped template
The underlying parse tree is visible in text/template, so it should be visible here.
Done by copying the underlying *parse.Tree up to the top level of the struct, and then making sure it's kept up to date.
Fixes #6318.

R=mikesamuel
CC=golang-dev
https://golang.org/cl/13479044

11 years agocgo: enable cgo on dragonfly
Aulus Egnatius Varialus [Wed, 4 Sep 2013 22:19:21 +0000 (15:19 -0700)]
cgo: enable cgo on dragonfly

Enable cgo for dragonfly/386 and dragonfly/amd64.

R=golang-dev, jsing, iant, bradfitz
CC=golang-dev
https://golang.org/cl/13247046

11 years agoA+C: Aulus Egnatius Varialus (individual CLA)
Ian Lance Taylor [Wed, 4 Sep 2013 22:17:42 +0000 (15:17 -0700)]
A+C: Aulus Egnatius Varialus (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/13336045

11 years agocmd/ld: don't allocate unused garbage space in pclntab file table
Ian Lance Taylor [Wed, 4 Sep 2013 20:26:49 +0000 (13:26 -0700)]
cmd/ld: don't allocate unused garbage space in pclntab file table

Fixes #6319.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13539043

11 years agocmd/cgo: document command line options
Ian Lance Taylor [Wed, 4 Sep 2013 04:23:52 +0000 (21:23 -0700)]
cmd/cgo: document command line options

Also remove incorrect statement that cgo does not support
gccgo.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13511043

11 years agocmd/cgo: don't let #cgo directives mess up line numbering
Ian Lance Taylor [Wed, 4 Sep 2013 04:15:15 +0000 (21:15 -0700)]
cmd/cgo: don't let #cgo directives mess up line numbering

Fixes #5272.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13498046

11 years agotext/template: allow eq to take more than two arguments
Rob Pike [Wed, 4 Sep 2013 03:42:22 +0000 (13:42 +1000)]
text/template: allow eq to take more than two arguments
Based on an old suggestion by rsc, it compares the second
and following arguments to the first.

Unfortunately the code cannot be as pretty as rsc's original
because it doesn't require identical types.

R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/13509046

11 years agonet/http: remove dreg of obsoleted network poller
Mikio Hara [Wed, 4 Sep 2013 01:04:12 +0000 (10:04 +0900)]
net/http: remove dreg of obsoleted network poller

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13261049

11 years agodoc/go1.2.txt: crypto/{x509,tls} changes
Adam Langley [Tue, 3 Sep 2013 20:19:41 +0000 (16:19 -0400)]
doc/go1.2.txt: crypto/{x509,tls} changes

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13335050

11 years agonet/http: sniff less
Brad Fitzpatrick [Tue, 3 Sep 2013 16:11:25 +0000 (09:11 -0700)]
net/http: sniff less

We were reading 1024 bytes but only using 512.

Fixes #6311

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13289047

11 years agonet: fix TestFirstFavoriteAddr failure on single IP stack kernel
Mikio Hara [Mon, 2 Sep 2013 07:44:51 +0000 (16:44 +0900)]
net: fix TestFirstFavoriteAddr failure on single IP stack kernel

Update #3610
Update #5267
Update #5707

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/13465043

11 years agoruntime: clean up map code. Remove hashmap.h.
Keith Randall [Sat, 31 Aug 2013 21:09:34 +0000 (14:09 -0700)]
runtime: clean up map code.  Remove hashmap.h.
Use cnew/cnewarray instead of mallocgc.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/13396045

11 years agocmd/8l: add support for dragonfly/386
Joel Sing [Sat, 31 Aug 2013 16:33:38 +0000 (09:33 -0700)]
cmd/8l: add support for dragonfly/386

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13328045

11 years agoruntime, syscall: add support for dragonfly/386
Joel Sing [Sat, 31 Aug 2013 16:32:07 +0000 (09:32 -0700)]
runtime, syscall: add support for dragonfly/386

Add runtime and syscall support for dragonfly/386.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13237051

11 years agosyscall: z* files for dragonfly/386
Joel Sing [Sat, 31 Aug 2013 16:29:38 +0000 (09:29 -0700)]
syscall: z* files for dragonfly/386

Add generated z* files for dragonfly/386.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13303046

11 years agoruntime: record type information for hashtable internal structures.
Keith Randall [Sat, 31 Aug 2013 16:09:50 +0000 (09:09 -0700)]
runtime: record type information for hashtable internal structures.
Remove all hashtable-specific GC code.

Fixes bug 6119.

R=cshapiro, dvyukov, khr
CC=golang-dev
https://golang.org/cl/13078044

11 years agocmd/5l,cmd/6l,cmd/8l: fix dragonflydynld path
Joel Sing [Sat, 31 Aug 2013 12:02:21 +0000 (22:02 +1000)]
cmd/5l,cmd/6l,cmd/8l: fix dragonflydynld path

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/13225043

11 years agonet: keep lookup IP stuff close
Mikio Hara [Sat, 31 Aug 2013 07:29:50 +0000 (16:29 +0900)]
net: keep lookup IP stuff close

Also flattens import declaration.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/13373046

11 years agonet: make resolveInternetAddr return a list of addresses
Mikio Hara [Sat, 31 Aug 2013 01:28:49 +0000 (10:28 +0900)]
net: make resolveInternetAddr return a list of addresses

This CL makes resolveInternetAddr return a list of addresses that
contain a pair of different address family IP addresses if possible,
but doesn't contain any API behavioral changes yet. A simple IP
address selection mechanism for Resolve{TCP,UDP,IP}Addr and Dial API
still prefers IPv4.

This is in preparation for TCP connection setup with fast failover on
dual IP stack node as described in RFC 6555.

Update #3610
Update #5267

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13374043

11 years agodoc/go1.2.txt: add compress/gzip and database/sql lines
Brad Fitzpatrick [Sat, 31 Aug 2013 00:39:58 +0000 (17:39 -0700)]
doc/go1.2.txt: add compress/gzip and database/sql lines

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13316044

11 years agocompress/gzip: add Writer.Reset
Brad Fitzpatrick [Fri, 30 Aug 2013 18:41:12 +0000 (11:41 -0700)]
compress/gzip: add Writer.Reset

compress/flate is https://golang.org/cl/12953048
compress/zlib is https://golang.org/cl/13171046

Update #6138

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13435043

11 years agodatabase/sql: add SetMaxOpenConns
Tad Glines [Fri, 30 Aug 2013 16:27:33 +0000 (09:27 -0700)]
database/sql: add SetMaxOpenConns

Update #4805

Add the ability to set an open connection limit.
Fixed case where the Conn finalCloser was being called with db.mu locked.
Added separate benchmarks for each path for Exec and Query.
Replaced slice based idle pool with list based idle pool.

R=bradfitz
CC=golang-dev
https://golang.org/cl/10726044

11 years agocrypto/x509: expose arbitary X.509 extensions.
Adam Langley [Fri, 30 Aug 2013 14:14:45 +0000 (10:14 -0400)]
crypto/x509: expose arbitary X.509 extensions.

This change allows people who want to parse or set odd X.509 extensions
to do so without having to add support for them all to the package.

I tried to make it so that only a single member: Extensions would be
needed. However, that would mean detecting when the caller had altered
the contents of it so that parsing and marshaling a certificate
wouldn't ignore all changes to the other members. This ended up being
messy, thus the current design where there are two members: one for
reading and another for writing.

As crypto/x509 adds support for more extensions in the future, the raw
extensions will still be in Extensions for older code that expects it
there. Also, future extensions will be overridden by any raw extensions
added to ExtraExtensions by code that was written before support was
added.

R=golang-dev, r
CC=golang-dev, jpsugar
https://golang.org/cl/12056043

11 years agolibbio, all cmd: consistently use BGETC/BPUTC instead of Bgetc/Bputc
Dmitriy Vyukov [Fri, 30 Aug 2013 11:46:12 +0000 (15:46 +0400)]
libbio, all cmd: consistently use BGETC/BPUTC instead of Bgetc/Bputc
Also introduce BGET2/4, BPUT2/4 as they are widely used.
Slightly improve BGETC/BPUTC implementation.
This gives ~5% CPU time improvement on go install -a -p1 std.
Before:
real user sys
0m23.561s 0m16.625s 0m5.848s
0m23.766s 0m16.624s 0m5.846s
0m23.742s 0m16.621s 0m5.868s
after:
0m22.999s 0m15.841s 0m5.889s
0m22.845s 0m15.808s 0m5.850s
0m22.889s 0m15.832s 0m5.848s

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12745047

11 years agogo/build: fix deps_test for Plan 9's os/user dependencies and to
Nigel Tao [Fri, 30 Aug 2013 07:12:42 +0000 (17:12 +1000)]
go/build: fix deps_test for Plan 9's os/user dependencies and to
include the new image/color/palette package.

R=r
CC=golang-dev
https://golang.org/cl/13314044

11 years agoimage/color/palette: move Plan9Palette and WebSafePalette out of the
Nigel Tao [Fri, 30 Aug 2013 06:03:16 +0000 (16:03 +1000)]
image/color/palette: move Plan9Palette and WebSafePalette out of the
image/color package into their own package. They require some non-
trivial init-time code (interface conversions, currently 40KiB of text)
that would otherwise burden any Go program that imported image/color.

R=r
CC=golang-dev
https://golang.org/cl/13256046

11 years agodoc/go1.2.txt: compress/flate changes
Rob Pike [Fri, 30 Aug 2013 05:32:51 +0000 (15:32 +1000)]
doc/go1.2.txt: compress/flate changes

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13324046

11 years agonet: add addrList
Mikio Hara [Fri, 30 Aug 2013 00:28:26 +0000 (09:28 +0900)]
net: add addrList

This CL adds a new type addrList that will carry a short list of IP
addresses to dial helper functions in the upcoming CLs.

This is in preparation for TCP connection setup with fast failover on
dual IP stack node as described in RFC 6555.

Update #3610
Update #5267

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13241046

11 years agoundo CL 10726044 / c9bea548fb6f
Brad Fitzpatrick [Fri, 30 Aug 2013 00:26:00 +0000 (17:26 -0700)]
undo CL 10726044 / c9bea548fb6f

Breaks build, and has a race.

««« original CL description
database/sql: add SetMaxOpenConns

Update #4805

Add the ability to set an open connection limit.
Fixed case where the Conn finalCloser was being called with db.mu locked.
Added seperate benchmarks for each path for Exec and Query.
Replaced slice based idle pool with list based idle pool.

R=bradfitz
CC=golang-dev
https://golang.org/cl/10726044

»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/13252046

11 years agodatabase/sql: add SetMaxOpenConns
Tad Glines [Fri, 30 Aug 2013 00:20:39 +0000 (17:20 -0700)]
database/sql: add SetMaxOpenConns

Update #4805

Add the ability to set an open connection limit.
Fixed case where the Conn finalCloser was being called with db.mu locked.
Added seperate benchmarks for each path for Exec and Query.
Replaced slice based idle pool with list based idle pool.

R=bradfitz
CC=golang-dev
https://golang.org/cl/10726044

11 years agoA+C: Tad Glines (individual CLA)
Brad Fitzpatrick [Fri, 30 Aug 2013 00:19:51 +0000 (17:19 -0700)]
A+C: Tad Glines (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/13416043

11 years agomisc/dist: remove Xcode files from the darwin binary distribution
Emil Hessman [Fri, 30 Aug 2013 00:11:18 +0000 (10:11 +1000)]
misc/dist: remove Xcode files from the darwin binary distribution

Fixes #6132.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12858049

11 years agonet: add netaddr interface
Mikio Hara [Fri, 30 Aug 2013 00:09:45 +0000 (09:09 +0900)]
net: add netaddr interface

This CL adds the netaddr interface that will carry a single network
endpoint address or a short list of IP addresses to dial helper
functions in the upcoming CLs.

This is in preparation for TCP connection setup with fast failover on
dual IP stack node as described in RFC 6555.

Update #3610
Update #5267

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13368044

11 years agomisc/pprof: work with either LWP::UserAgent or curl
Brad Fitzpatrick [Thu, 29 Aug 2013 23:42:13 +0000 (16:42 -0700)]
misc/pprof: work with either LWP::UserAgent or curl

Use either LWP::UserAgent or curl to make HTTP requests so it
works on Windows (most Perl distros include LWP::UserAgent),
and also on OS X (whose Perl at least sometimes doesn't
include LWP::UserAgent).

Fixes #6273

R=golang-dev, alex.brainman, cldorian
CC=golang-dev
https://golang.org/cl/13330044

11 years agoruntime: jump to badmcall instead of calling it.
Keith Randall [Thu, 29 Aug 2013 22:53:34 +0000 (15:53 -0700)]
runtime: jump to badmcall instead of calling it.
This replaces the mcall frame with the badmcall frame instead of
leaving the mcall frame on the stack and adding the badmcall frame.
Because mcall is no longer on the stack, traceback will now report what
called mcall, which is what we would like to see in this situation.

R=golang-dev, cshapiro
CC=golang-dev
https://golang.org/cl/13012044

11 years agoregexp/syntax: optimize EmptyOpContext
Brad Fitzpatrick [Thu, 29 Aug 2013 21:31:10 +0000 (14:31 -0700)]
regexp/syntax: optimize EmptyOpContext

Minor. Saw this in a profile at few percent of CPU and was
curious what it was. Improves overall regexp benchmarks
anywhere from 0 to 3%, but they're a pain to run. You need to
run them in isolation for long runs to get stable numbers.

benchmark                  old ns/op    new ns/op    delta
BenchmarkEmptyOpContext          537          473  -11.92%

R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/13407043

11 years agocrypto/tls: support AES-GCM.
Adam Langley [Thu, 29 Aug 2013 21:18:59 +0000 (17:18 -0400)]
crypto/tls: support AES-GCM.

AES-GCM is the only current TLS ciphersuite that doesn't have
cryptographic weaknesses (RC4), nor major construction issues (CBC mode
ciphers) and has some deployment (i.e. not-CCM).

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13249044

11 years agoregexp: fix a benchmark case
Brad Fitzpatrick [Thu, 29 Aug 2013 20:55:30 +0000 (13:55 -0700)]
regexp: fix a benchmark case

I noticed that this one benchmark in particular was very
noisy.  Looking into it, I saw that the table was wrong
and inconsistent with the lines above and below.

R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/13393045

11 years agonet/http: redirect handlers from mux.Handler() shouldn't clear the query string
Shenghou Ma [Thu, 29 Aug 2013 20:55:12 +0000 (13:55 -0700)]
net/http: redirect handlers from mux.Handler() shouldn't clear the query string

R=bradfitz, alberto.garcia.hierro, rsc, adg
CC=golang-dev
https://golang.org/cl/7099045

11 years agoruntime: check bitmap word for allocated bit in markonly
Carl Shapiro [Thu, 29 Aug 2013 20:52:38 +0000 (13:52 -0700)]
runtime: check bitmap word for allocated bit in markonly

When searching for an allocated bit, flushptrbuf would search
backward in the bitmap word containing the bit of pointer
being looked-up before searching the span.  This extra check
was not replicated in markonly which, instead, after not
finding an allocated bit for a pointer would directly look in
the span.

Using statistics generated from godoc, before this change span
lookups were, on average, more common than word lookups.  It
was common for markonly to consult spans for one third of its
pointer lookups.  With this change in place, what were
previously span lookups are overwhelmingly become by the word
lookups making the total number of span lookups a relatively
small fraction of the whole.

This change also introduces some statistics gathering about
lookups guarded by the CollectStats enum.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/13311043

11 years agocmd/cc,runtime: change preprocessor to expand macros inside of
Keith Randall [Thu, 29 Aug 2013 19:36:59 +0000 (12:36 -0700)]
cmd/cc,runtime: change preprocessor to expand macros inside of
#pragma textflag and #pragma dataflag directives.
Update dataflag directives to use symbols instead of integer constants.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13310043

11 years agocompress/flate: implement Reset method on Writer.
Rémy Oudompheng [Thu, 29 Aug 2013 19:09:23 +0000 (21:09 +0200)]
compress/flate: implement Reset method on Writer.

Fixes #6138.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12953048

11 years agomisc: add linkcheck tool
Brad Fitzpatrick [Thu, 29 Aug 2013 19:08:11 +0000 (12:08 -0700)]
misc: add linkcheck tool

Fixes #5378

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13247044

11 years agocmd/gc: make method names for function scoped types unique
Daniel Morsing [Thu, 29 Aug 2013 14:48:44 +0000 (16:48 +0200)]
cmd/gc: make method names for function scoped types unique

Types in function scope can have methods on them if they embed another type, but we didn't make the name unique, meaning that 2 identically named types in different functions would conflict with eachother.

Fixes #6269.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13326045

11 years agocmd/8g: add descriptions for some missing instructions.
Lucio De Re [Thu, 29 Aug 2013 12:41:01 +0000 (14:41 +0200)]
cmd/8g: add descriptions for some missing instructions.

These instructions are emitted when GO386=387 or the target
i386 CPU does not have SSE2 capabilities.

Fixes #6215.

R=golang-dev, remyoudompheng
CC=golang-dev
https://golang.org/cl/12812045

11 years agocmd/gc: fix detection of initialization loop.
Rémy Oudompheng [Thu, 29 Aug 2013 08:16:09 +0000 (10:16 +0200)]
cmd/gc: fix detection of initialization loop.

The compiler computes initialization order by finding
a spanning tree between a package's global variables.
But it does so by walking both variables and functions
and stops detecting cycles between variables when they
mix with a cycle of mutually recursive functions.

Fixes #4847.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/9663047

11 years agocmd/gc: fix method values whose receiver is an unnamed interface.
Rémy Oudompheng [Thu, 29 Aug 2013 08:00:58 +0000 (10:00 +0200)]
cmd/gc: fix method values whose receiver is an unnamed interface.

Fixes #6140.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13083043

11 years agocmd/go: make it work for code.google.com cloned repositories
Rob Pike [Thu, 29 Aug 2013 07:15:35 +0000 (17:15 +1000)]
cmd/go: make it work for code.google.com cloned repositories

Thanks to beatgammit for the fix.

Fixes #5408.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13261048

11 years agonet: make channel-based semaphore depend on receive, not send
Robert Daniel Kortschak [Thu, 29 Aug 2013 07:14:57 +0000 (17:14 +1000)]
net: make channel-based semaphore depend on receive, not send

R=r, dvyukov
CC=golang-dev
https://golang.org/cl/13348045

11 years agoundo CL 13180043 / 318540e7857f
Andrew Gerrand [Thu, 29 Aug 2013 04:45:59 +0000 (14:45 +1000)]
undo CL 13180043 / 318540e7857f

Accidentally submitted.

««« original CL description
encoding/json: add "overflow" struct tag option

Fixes #6213.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/13180043
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/13234045

11 years agoos/exec: return idempotent Closer from StdinPipe
Andrew Gerrand [Thu, 29 Aug 2013 04:41:44 +0000 (14:41 +1000)]
os/exec: return idempotent Closer from StdinPipe

Before this fix, it was always an error to use the Close method on the
io.WriteCloser obtained from Cmd.StdinPipe, as it would race with the
Close performed by Cmd.Wait.

Fixes #6270.

R=golang-dev, r, remyoudompheng, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/13329043

11 years agoencoding/json: add "overflow" struct tag option
Andrew Gerrand [Thu, 29 Aug 2013 04:39:55 +0000 (14:39 +1000)]
encoding/json: add "overflow" struct tag option

Fixes #6213.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/13180043

11 years agosort: use a very fast random generator for benchmarks
Dave Cheney [Thu, 29 Aug 2013 03:21:21 +0000 (13:21 +1000)]
sort: use a very fast random generator for benchmarks

Adapted from https://golang.org/cl/11564044.

Fixes breakage of darwin-amd64-race builder.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13352045

11 years agoruntime: re-enable TestParForParallel
Rob Pike [Thu, 29 Aug 2013 01:42:18 +0000 (11:42 +1000)]
runtime: re-enable TestParForParallel

See how it flies. We'll disable it again if the underlying issue is not resolved.
See issue 4155 for details.

Fixes #4155.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13368045

11 years agonet: make protocol-specific Dial and Listen return consistent error value
Mikio Hara [Wed, 28 Aug 2013 10:51:02 +0000 (19:51 +0900)]
net: make protocol-specific Dial and Listen return consistent error value

Update #4856

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/12916046

11 years agonet: BUG section for ReadFrom, ReadFromIP methods of IPConn on "ip4" network
Mikio Hara [Wed, 28 Aug 2013 10:49:17 +0000 (19:49 +0900)]
net: BUG section for ReadFrom, ReadFromIP methods of IPConn on "ip4" network

Fixes #3944.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13263043

11 years agocmd/go: add -race flag to 'go list'
Rob Pike [Thu, 29 Aug 2013 01:16:53 +0000 (11:16 +1000)]
cmd/go: add -race flag to 'go list'

Causes the package dependencies to include those for race detection.
Fixes #5653.

R=golang-dev, dave, bradfitz
CC=golang-dev
https://golang.org/cl/13236045

11 years agodoc/go1.2.txt: text/template's if-else
Rob Pike [Thu, 29 Aug 2013 00:09:23 +0000 (10:09 +1000)]
doc/go1.2.txt: text/template's if-else

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/13334043

11 years agofmt: Remove some unnecessary conversions.
Robin Eklind [Wed, 28 Aug 2013 18:55:39 +0000 (11:55 -0700)]
fmt: Remove some unnecessary conversions.

R=golang-dev, remyoudompheng
CC=golang-dev
https://golang.org/cl/12795052

11 years agotime: add more docs on Sleep
Brad Fitzpatrick [Wed, 28 Aug 2013 18:16:55 +0000 (11:16 -0700)]
time: add more docs on Sleep

Merge the comment from runtime/time.goc ("at least")
and also note that negative is okay and won't crash.
I see people going out of their way to avoid passing
a negative value to Sleep.

R=golang-dev, adg, r, alex.brainman
CC=golang-dev
https://golang.org/cl/13271045

11 years agotext/template: allow {{else if ... }} to simplify if chains
Rob Pike [Wed, 28 Aug 2013 04:43:56 +0000 (14:43 +1000)]
text/template: allow {{else if ... }} to simplify if chains
The method is simple: the parser just parses

        {{if A}}a{{else if B}}b{{end}}

to the same tree that would be produced by

        {{if A}}a{{else}}{{if B}}b{{end}}{{end}}

Thus no changes are required in text/template itself
or in html/template, only in text/template/parse.

Fixes #6085

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13327043

11 years agosync: improve once.Do documentation readability
Josh Bleecher Snyder [Wed, 28 Aug 2013 02:53:59 +0000 (12:53 +1000)]
sync: improve once.Do documentation readability

The previous wording, though accurate, was hard to parse.
In particular, it was tempting to interpret "the method"
as referring to "the function f" instead of "Do", and
required effort to find the correct antecedent for
"this receiver".

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/13307043

11 years agoC: add Asim Shankar (Google CLA)
Andrew Gerrand [Tue, 27 Aug 2013 23:40:08 +0000 (09:40 +1000)]
C: add Asim Shankar (Google CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13313043

11 years agonet/http: document Request.Body more
Brad Fitzpatrick [Tue, 27 Aug 2013 23:13:21 +0000 (16:13 -0700)]
net/http: document Request.Body more

Fixes #6221

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13289043

11 years agonet/smtp: clarify that SendMail's auth param is optional
Brad Fitzpatrick [Tue, 27 Aug 2013 23:12:11 +0000 (16:12 -0700)]
net/smtp: clarify that SendMail's auth param is optional

It wasn't obvious that the Auth could be nil.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13060048