]>
Cypherpunks repositories - gostls13.git/log
Rob Pike [Wed, 20 Mar 2013 22:05:28 +0000 (15:05 -0700)]
spec: fix description of initialization
The analysis does not depend on the values of the items.
Fixes #4648.
R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/
7593050
Robert Griesemer [Wed, 20 Mar 2013 22:03:30 +0000 (15:03 -0700)]
go/parser: use method values
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7858045
Keith Randall [Wed, 20 Mar 2013 21:34:26 +0000 (14:34 -0700)]
runtime: Use aligned loads for AES key schedule.
R=rsc, minux.ma, khr
CC=golang-dev
https://golang.org/cl/
7763050
Russ Cox [Wed, 20 Mar 2013 21:20:32 +0000 (17:20 -0400)]
cmd/gc: add OCHECKNOTNIL to race walker (fix build)
TBR=dvyukov
CC=golang-dev
https://golang.org/cl/
7635046
Daniel Morsing [Wed, 20 Mar 2013 21:18:20 +0000 (22:18 +0100)]
cmd/gc: reject methods on non-locals, even if symbol exists
Fixes #5089.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7767044
Russ Cox [Wed, 20 Mar 2013 21:11:09 +0000 (17:11 -0400)]
cmd/gc: implement method values
R=ken2, ken
CC=golang-dev
https://golang.org/cl/
7546052
Russ Cox [Wed, 20 Mar 2013 20:54:07 +0000 (16:54 -0400)]
spec: define method values
Fixes #2280.
R=golang-dev, r, bradfitz, iant, andybalholm, gri
CC=golang-dev
https://golang.org/cl/
7816045
Keith Randall [Wed, 20 Mar 2013 20:51:29 +0000 (13:51 -0700)]
runtime: faster hashmap implementation.
Hashtable is arranged as an array of
8-entry buckets with chained overflow.
Each bucket has 8 extra hash bits
per key to provide quick lookup within
a bucket. Table is grown incrementally.
Update #3885
Go time drops from 0.51s to 0.34s.
R=r, rsc, m3b, dave, bradfitz, khr, ugorji, remyoudompheng
CC=golang-dev
https://golang.org/cl/
7504044
Jan Ziak [Wed, 20 Mar 2013 19:36:33 +0000 (20:36 +0100)]
runtime: prevent garbage collection during hashmap insertion (fix 2)
Fixes #5074 in multi-threaded scenarios.
R=golang-dev, daniel.morsing, dave, dvyukov, bradfitz, rsc
CC=golang-dev, remyoudompheng
https://golang.org/cl/
7916043
Brad Fitzpatrick [Wed, 20 Mar 2013 16:06:33 +0000 (09:06 -0700)]
net/http/fcgi: Request.Body should always be non-nil
Found this inconsistency from net/http's Server while
debugging Issue 4183
Unfortunately this package lacks testing around this,
or most of child.go. :/
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
7735046
Ian Lance Taylor [Wed, 20 Mar 2013 15:06:58 +0000 (08:06 -0700)]
misc/swig: remove old broken Makefile
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7786046
Dave Cheney [Wed, 20 Mar 2013 12:42:00 +0000 (23:42 +1100)]
cmd/6c, cmd/8c: fix stack allocated Biobuf leaking at exit
Fixes #5085.
{6,8}c/swt.c allocates a third Biobuf in automatic memory which is not terminated at the end of the function. This causes the buffer to be 'in use' when the batexit handler fires, confusing valgrind.
Huge thanks to DMorsing for the diagnosis.
R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/
7844044
Rémy Oudompheng [Wed, 20 Mar 2013 07:32:11 +0000 (08:32 +0100)]
cmd/ld: remove remaining occurrence of isobj.
Fixes cgo builds.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
7784044
Brad Fitzpatrick [Wed, 20 Mar 2013 06:32:28 +0000 (23:32 -0700)]
net/http: new benchmark to measure server without network
No net package involved. And with ReportAllocs we can see
how much garbage is created per request.
R=adg, dave
CC=golang-dev
https://golang.org/cl/
7913044
Dave Cheney [Wed, 20 Mar 2013 01:05:52 +0000 (12:05 +1100)]
cmd/5l: fix arm build
Fixes build. One part of ../misc/cgo/test appears to be unhappy but this does not cause the build to fail.
R=rsc, r
CC=golang-dev
https://golang.org/cl/
7769047
Rob Pike [Tue, 19 Mar 2013 23:40:19 +0000 (16:40 -0700)]
doc/go1.1.html: add links to the text, write some new sections
R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/
7914043
Rémy Oudompheng [Tue, 19 Mar 2013 23:19:11 +0000 (00:19 +0100)]
cmd/gc: implement revised rule for shifts in equality.
R=rsc, daniel.morsing
CC=golang-dev
https://golang.org/cl/
7613046
Rob Pike [Tue, 19 Mar 2013 22:04:18 +0000 (15:04 -0700)]
bytes,strings: remove user name from BUG in comment
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/
7856048
Jan Ziak [Tue, 19 Mar 2013 21:17:39 +0000 (22:17 +0100)]
runtime: prevent garbage collection during hashmap insertion
Inserting a key-value pair into a hashmap storing keys or values
indirectly can cause the garbage collector to find the hashmap in
an inconsistent state.
Fixes #5074.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/
7913043
Ian Lance Taylor [Tue, 19 Mar 2013 20:59:37 +0000 (13:59 -0700)]
debug/dwarf: support for DWARF 3
R=rsc
CC=golang-dev
https://golang.org/cl/
7662045
Russ Cox [Tue, 19 Mar 2013 20:53:07 +0000 (16:53 -0400)]
cmd/ld: fix typo
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
7552045
Russ Cox [Tue, 19 Mar 2013 20:31:52 +0000 (16:31 -0400)]
cmd/ld: generate relocated DWARF in hostobj mode
While we're here, downgrade DWARF to version 2.
We're not using any version 3 features, and OS X gdb
only supports version 2.
Fixes #3436.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
7891044
Robert Griesemer [Tue, 19 Mar 2013 19:49:46 +0000 (12:49 -0700)]
misc/dashboard: show correct dir name in README
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7909043
Russ Cox [Tue, 19 Mar 2013 19:45:42 +0000 (15:45 -0400)]
cmd/ld: replace -hostobj with -linkmode
Still disabled. Need to fix TLS.
R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/
7783044
Jan Ziak [Tue, 19 Mar 2013 18:57:15 +0000 (19:57 +0100)]
runtime: optimize calls to addroot()
R=golang-dev, rsc
CC=dvyukov, golang-dev
https://golang.org/cl/
7879043
Jan Ziak [Tue, 19 Mar 2013 18:51:03 +0000 (19:51 +0100)]
cmd/gc: support channel types in the garbage collector
R=golang-dev, dvyukov, rsc
CC=golang-dev
https://golang.org/cl/
7473044
Oling Cat [Tue, 19 Mar 2013 18:47:41 +0000 (14:47 -0400)]
unicode: modify a comment to the convention format.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/
7869043
Robert Griesemer [Tue, 19 Mar 2013 18:14:35 +0000 (11:14 -0700)]
go/doc, godoc: improved note reading
- A note doesn't have to be in the first
comment of a comment group anymore, and
several notes may appear in the same comment
group (e.g., it is fairly common to have a
TODO(uid) note immediately following another
comment).
- Define a doc.Note type which also contains
note uid and position info.
- Better formatting in godoc output. The position
information is not yet used, but could be used to
locate the note in the source text if desired.
Fixes #4843.
R=r, cnicolaou
CC=gobot, golang-dev
https://golang.org/cl/
7496048
Oling Cat [Tue, 19 Mar 2013 17:48:07 +0000 (13:48 -0400)]
unicode: remove an extra space
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7856044
Mikio Hara [Tue, 19 Mar 2013 17:40:29 +0000 (02:40 +0900)]
runtime: add missing copyright
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7884045
Mikio Hara [Tue, 19 Mar 2013 16:07:18 +0000 (01:07 +0900)]
net: make use of reflect.DeepEqual in IP manipulation tests
Also applies camel style to test case holders.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7884043
Mikio Hara [Tue, 19 Mar 2013 16:05:16 +0000 (01:05 +0900)]
cmd/fix: revert IPv6 scoped address zone support of IPNet
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7554051
Dominik Honnef [Tue, 19 Mar 2013 15:29:28 +0000 (11:29 -0400)]
misc/emacs: Add support for godef
godef[1][2] is a third party tool for printing information about
expressions, especially the location of their definition. This can be
used to implement a "jump to definition" function. Unlike
cross-language solutions like ctags, godef does not require an index,
operates on the Go AST instead of symbols and works across packages,
including the standard library.
This patch implements two new public functions: godef-describe (C-c
C-d) and godef-jump (C-d C-j). godef-describe describes the expression
at point, printing its type, and godef-jump jumps to its definition.
[1]: https://code.google.com/p/rog-go/source/browse/exp/cmd/godef/
[2]: go get code.google.com/p/rog-go/exp/cmd/godef
R=adonovan, cw, patrick.allen.higgins, sameer
CC=golang-dev
https://golang.org/cl/
7781043
Oling Cat [Tue, 19 Mar 2013 13:40:57 +0000 (09:40 -0400)]
lib/godoc: convert indentation to tabs.
R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/
7497048
Rémy Oudompheng [Tue, 19 Mar 2013 06:08:26 +0000 (07:08 +0100)]
runtime: fix erroneous overflow protection on netbsd/openbsd semasleep.
On NetBSD tv_sec is already an int64 so no need for a test.
On OpenBSD, semasleep expects a Unix time as argument,
and 1<<30 is in 2004.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
7810044
Rob Pike [Tue, 19 Mar 2013 05:50:32 +0000 (22:50 -0700)]
doc/go1.1.html: document the surrogate and BOM changes
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
7853048
Brad Fitzpatrick [Mon, 18 Mar 2013 22:54:22 +0000 (15:54 -0700)]
database/sql: doc cleanup on the DB type
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
7865044
Brad Fitzpatrick [Mon, 18 Mar 2013 22:33:04 +0000 (15:33 -0700)]
database/sql: add DB.SetMaxIdleConns
Update #4805
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7634045
Rob Pike [Mon, 18 Mar 2013 22:27:05 +0000 (15:27 -0700)]
doc/go1.1.html: document some of the library changes.
Still much to do, but this is a start.
R=golang-dev, adg, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/
7729046
Daniel Morsing [Mon, 18 Mar 2013 21:22:35 +0000 (22:22 +0100)]
cmd/gc: steal escape analysis info when inlining
Usually, there is no esc info when inlining, but there will be when generating inlined wrapper functions.
If we don't use this information, we get invalid addresses on the stack.
Fixes #5056.
R=golang-dev, rsc
CC=golang-dev, remyoudompheng
https://golang.org/cl/
7850045
Brad Fitzpatrick [Mon, 18 Mar 2013 20:44:20 +0000 (13:44 -0700)]
net/http: add StripPrefix example; simplify code
The example is the same as the FileServer one, but
it's relevant for both.
Also use strings.TrimPrefix while I'm here.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7598046
Brad Fitzpatrick [Mon, 18 Mar 2013 20:32:42 +0000 (13:32 -0700)]
net/http: shorten and clean up TestTransportConcurrency
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7817044
Rémy Oudompheng [Mon, 18 Mar 2013 19:11:11 +0000 (20:11 +0100)]
runtime: fix tv_sec 32-bit overflows in sleep routines.
Fixes #5063.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/
7876043
Shenghou Ma [Mon, 18 Mar 2013 18:47:04 +0000 (02:47 +0800)]
runtime: fix build for NetBSD/ARM
R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/
7597046
Brad Fitzpatrick [Mon, 18 Mar 2013 18:39:00 +0000 (11:39 -0700)]
database/sql: allow simultaneous queries, etc in a Tx
Now that revision
0c029965805f is in, it's easy
to guarantee that we never access a driver.Conn
concurrently, per the database/sql/driver contract,
so we can remove this overlarge mutex.
Fixes #3857
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
7707047
Brad Fitzpatrick [Mon, 18 Mar 2013 16:52:39 +0000 (09:52 -0700)]
os/exec: fix fd leak with Std*Pipe + LookPath
If LookPath in Command fails, sets a sticky error, and then
StdinPipe, StdoutPipe, or StderrPipe were called, those pipe
fds were never cleaned up.
Fixes #5071
R=golang-dev, rogpeppe
CC=golang-dev
https://golang.org/cl/
7799046
Joel Sing [Mon, 18 Mar 2013 01:18:49 +0000 (12:18 +1100)]
runtime: correct mmap return value checking on netbsd/openbsd
The current SysAlloc implementation suffers from a signed vs unsigned
comparision bug. Since the error code from mmap is negated, the
unsigned comparision of v < 4096 is always false on error. Fix this
by switching to the darwin/freebsd/linux mmap model and leave the mmap
return value unmodified.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7870044
Joe Poirier [Sun, 17 Mar 2013 21:56:38 +0000 (08:56 +1100)]
misc/dist: fix Windows breakage
The files could use some attention on the
Windows side but better to wait until after
the upcoming release.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
7621044
Mikio Hara [Sun, 17 Mar 2013 10:50:01 +0000 (19:50 +0900)]
net: revert Zone in IPNet temporally
Update #4501.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7853047
Rob Pike [Sat, 16 Mar 2013 21:53:12 +0000 (14:53 -0700)]
make.bash: delete vestigial TODO, now resolved
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
7789050
Rob Pike [Sat, 16 Mar 2013 00:08:07 +0000 (17:08 -0700)]
bytes,string: move the BUG to the comment of the function it's about
Avoids printing it every time we ask a question about the package from
the command line.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7789048
Brad Fitzpatrick [Fri, 15 Mar 2013 23:50:54 +0000 (16:50 -0700)]
net/http: don't test for goroutine leaks in short mode
Too annoying and flaky to debug for now. Later. This
tangent has taken enough time.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7863043
Rémy Oudompheng [Fri, 15 Mar 2013 23:37:28 +0000 (00:37 +0100)]
cmd/gc: missing type inference for untyped complex() calls.
Fixes #5014.
R=golang-dev, r, rsc, daniel.morsing
CC=golang-dev
https://golang.org/cl/
7664043
Brad Fitzpatrick [Fri, 15 Mar 2013 22:58:43 +0000 (15:58 -0700)]
net/http: fix test breakage on Windows
Treat the Windows net server as uninteresting for leak
purposes too.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7818048
Robert Griesemer [Fri, 15 Mar 2013 22:55:31 +0000 (15:55 -0700)]
go/doc: fix TODO
R=r
CC=golang-dev
https://golang.org/cl/
7716049
Brad Fitzpatrick [Fri, 15 Mar 2013 22:09:17 +0000 (15:09 -0700)]
net/http: less flaky leaking goroutine test
Fixes #5005
R=golang-dev, adg, fullung
CC=golang-dev
https://golang.org/cl/
7777043
Robert Griesemer [Fri, 15 Mar 2013 20:55:50 +0000 (13:55 -0700)]
spec: remove special int rule for shifts
The rule is not concistently followed by gc.
It appears that gccgo is ignoring it. go/types
does not implement this rule. However, both
gccgo and now go/types can compile/type-check
the entire std library (and thus all the shift
expressions occuring in it) w/o errors. For
more details see the discussion in issue 4883.
Fixes #4880.
Fixes #4881.
Fixes #4883.
R=rsc, r, iant, ken, ken, mtj, rogpeppe
CC=golang-dev
https://golang.org/cl/
7707043
Rob Pike [Fri, 15 Mar 2013 20:43:29 +0000 (13:43 -0700)]
A+C: Herbert Georg Fischer (individual CLA)
Generated by addca.
R=gobot
CC=golang-dev
https://golang.org/cl/
7861044
Herbert Georg Fischer [Fri, 15 Mar 2013 20:43:10 +0000 (13:43 -0700)]
doc: explain why cmd/go uses https for repositories and how to work around it
Fixes #3418.
R=golang-dev, r
CC=adg, golang-dev
https://golang.org/cl/
7712045
Russ Cox [Fri, 15 Mar 2013 20:33:04 +0000 (16:33 -0400)]
codereview: re-enable 15-second status prints
Also print all status changes when using hg -v.
The start_status_thread call was lost during the refactoring in
https://golang.org/cl/
5395044 /diff/6006/lib/codereview/codereview.py
Oops.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7834044
Jan Ziak [Fri, 15 Mar 2013 20:07:52 +0000 (16:07 -0400)]
runtime: scan the type of an interface value
R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/
7744047
Shenghou Ma [Fri, 15 Mar 2013 20:01:56 +0000 (04:01 +0800)]
net, runtime: enable runtime-integrated pollster on Linux/ARM.
Results from linux/arm on a Samsung Chromebook (from dfc):
localhost(~/go/src/pkg/net) % ~/go/misc/benchcmp {old,new}.txt
benchmark old ns/op new ns/op delta
BenchmarkTCP4OneShot 568840 350526 -38.38%
BenchmarkTCP4OneShot-2 359054 206708 -42.43%
BenchmarkTCP4OneShotTimeout 637464 363550 -42.97%
BenchmarkTCP4OneShotTimeout-2 374255 216695 -42.10%
BenchmarkTCP4Persistent 184974 64984 -64.87%
BenchmarkTCP4Persistent-2 109902 47195 -57.06%
BenchmarkTCP4PersistentTimeout 210039 64789 -69.15%
BenchmarkTCP4PersistentTimeout-2 124284 43374 -65.10%
BenchmarkTCP6OneShot 672278 362116 -46.14%
BenchmarkTCP6OneShot-2 383631 216400 -43.59%
BenchmarkTCP6OneShotTimeout 680740 378306 -44.43%
BenchmarkTCP6OneShotTimeout-2 397524 230152 -42.10%
BenchmarkTCP6Persistent 172346 65292 -62.12%
BenchmarkTCP6Persistent-2 106229 42096 -60.37%
BenchmarkTCP6PersistentTimeout 161149 65138 -59.58%
BenchmarkTCP6PersistentTimeout-2 152276 44548 -70.75%
R=golang-dev, dave, bradfitz, dvyukov, rsc
CC=golang-dev
https://golang.org/cl/
7820045
Russ Cox [Fri, 15 Mar 2013 19:24:13 +0000 (15:24 -0400)]
cmd/gc: ensure unique parameter and result names in function types
In addition to fixing the bug, the check is now linear instead of quadratic.
Fixes #4469.
R=ken2
CC=golang-dev
https://golang.org/cl/
7773047
Rob Pike [Fri, 15 Mar 2013 18:38:50 +0000 (11:38 -0700)]
doc/go_faq.html: add entry about pointer to interface
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7546050
Dmitriy Vyukov [Fri, 15 Mar 2013 18:23:35 +0000 (22:23 +0400)]
net: fix build with CGO_ENABLED=0
R=golang-dev, rsc, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/
7857044
Keith Randall [Fri, 15 Mar 2013 17:46:34 +0000 (10:46 -0700)]
runtime: use AES hash for compound objects.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7716047
Russ Cox [Fri, 15 Mar 2013 16:39:14 +0000 (12:39 -0400)]
build: skip benchmarks on OpenBSD
They are making the build die. I want to be able to see that everything else is okay.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7546049
Jan Ziak [Fri, 15 Mar 2013 16:37:40 +0000 (12:37 -0400)]
runtime: remove struct BitTarget
R=golang-dev
CC=dvyukov, golang-dev, rsc
https://golang.org/cl/
7845043
Russ Cox [Fri, 15 Mar 2013 16:30:14 +0000 (12:30 -0400)]
build: fix for 32-bit windows builds on 64-bit windows system
Thanks to jon.forums@ for the fix.
Fixes #5051.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
7813045
Joel Sing [Fri, 15 Mar 2013 15:43:43 +0000 (11:43 -0400)]
runtime: unbreak netbsd builds
Fix signal handling so that Go builds on NetBSD.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7759048
Rémy Oudompheng [Fri, 15 Mar 2013 08:03:45 +0000 (09:03 +0100)]
cmd/gc: fix escape analysis bug.
It used to not mark parameters as escaping if only one of the
fields it points to leaks out of the function. This causes
problems when importing from another package.
Fixes #4964.
R=rsc, lvd, dvyukov, daniel.morsing
CC=golang-dev
https://golang.org/cl/
7648045
Jan Ziak [Fri, 15 Mar 2013 08:02:36 +0000 (09:02 +0100)]
runtime: replace lock() with casp() in the GC
Note: BitTarget will be removed by a forthcoming changeset.
R=golang-dev, dvyukov
CC=golang-dev, rsc
https://golang.org/cl/
7837044
Jan Ziak [Fri, 15 Mar 2013 05:57:50 +0000 (06:57 +0100)]
cmd/gc: unroll small array types
R=golang-dev, rsc
CC=golang-dev, nigeltao
https://golang.org/cl/
7812044
Russ Cox [Fri, 15 Mar 2013 05:11:03 +0000 (01:11 -0400)]
runtime: accept GOTRACEBACK=crash to mean 'crash after panic'
This provides a way to generate core dumps when people need them.
The settings are:
GOTRACEBACK=0 no traceback on panic, just exit
GOTRACEBACK=1 default - traceback on panic, then exit
GOTRACEBACK=2 traceback including runtime frames on panic, then exit
GOTRACEBACK=crash traceback including runtime frames on panic, then crash
Fixes #3257.
R=golang-dev, devon.odell, r, daniel.morsing, ality
CC=golang-dev
https://golang.org/cl/
7666044
Tyler Bunnell [Fri, 15 Mar 2013 04:35:09 +0000 (00:35 -0400)]
cmd/gc: disallow fallthrough in final case of switch
Small change to cmd/gc to catch a "fallthrough" in the final case of a switch.
R=golang-dev, rsc, mtj
CC=golang-dev
https://golang.org/cl/
7841043
Anthony Martin [Fri, 15 Mar 2013 04:04:19 +0000 (05:04 +0100)]
cmd/dist: instruct the user to bind $GOBIN on Plan 9
R=seed, rminnich, bradfitz, r
CC=golang-dev
https://golang.org/cl/
7395059
Russ Cox [Fri, 15 Mar 2013 04:00:02 +0000 (00:00 -0400)]
os/signal: add Stop, be careful about SIGHUP
Fixes #4268.
Fixes #4491.
R=golang-dev, nightlyone, fullung, r
CC=golang-dev
https://golang.org/cl/
7546048
Jonathan Nieder [Fri, 15 Mar 2013 03:59:49 +0000 (23:59 -0400)]
go/build: allow ~ in middle of path, just not at beginning
CL
7799045 relaxed the restriction in cmd/go on ~ in GOPATH
to allow paths with ~ in the middle while continuing to
protect against the common mistake of using GOPATH='~/home'
instead of GOPATH=~/home. Unfortunately go/build still
filters these paths out:
$ GOPATH=/tmp/test~ing go build
test.go:22:2: cannot find package "test" in any of:
/usr/lib/go/test (from $GOROOT)
($GOPATH not set)
So relax the requirement in go/build, too.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
7826043
Russ Cox [Fri, 15 Mar 2013 03:59:41 +0000 (23:59 -0400)]
CONTRIBUTORS: add Jonathan Nieder (Google CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7842043
David Symonds [Fri, 15 Mar 2013 03:45:00 +0000 (14:45 +1100)]
misc/dashboard/codereview: better debugging when some fetches fail.
R=rsc
CC=golang-dev
https://golang.org/cl/
7836045
Russ Cox [Fri, 15 Mar 2013 03:42:11 +0000 (23:42 -0400)]
runtime: use 64-bit negative error code on 64-bit machines
NEGL does a negation of the bottom 32 bits and then zero-extends to 64 bits,
resulting in a negative 32-bit number but a positive 64-bit number.
NEGQ does a full 64-bit negation, so that the result is negative both as
a 32-bit and as a 64-bit number.
This doesn't matter for the functions that are declared to return int32.
It only matters for the ones that return int64 or void* [sic].
This will fix the current incorrect error in the OpenBSD/amd64 build.
The build will still be broken, but it won't report a bogus error.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7536046
David Symonds [Fri, 15 Mar 2013 03:33:00 +0000 (14:33 +1100)]
misc/dashboard/codereview: add more people.
I picked everyone who has committed a CL on behalf of someone else in recent times.
R=r, rsc
CC=golang-dev
https://golang.org/cl/
7836044
Brad Fitzpatrick [Thu, 14 Mar 2013 22:01:45 +0000 (15:01 -0700)]
database/sql: associate a mutex with each driver interface
The database/sql/driver docs make this promise:
"Conn is a connection to a database. It is not used
concurrently by multiple goroutines."
That promises exists as part of database/sql's overall
goal of making drivers relatively easy to write.
So far this promise has been kept without the use of locks by
being careful in the database/sql package, but sometimes too
careful. (cf. golang.org/issue/3857)
The CL associates a Mutex with each driver.Conn, and with the
interface value progeny thereof. (e.g. each driver.Tx,
driver.Stmt, driver.Rows, driver.Result, etc) Then whenever
those interface values are used, the Locker is locked.
This CL should be a no-op (aside from some new Lock/Unlock
pairs) and doesn't attempt to fix Issue 3857 or Issue 4459,
but should make it much easier in a subsequent CL.
Update #3857
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
7803043
Russ Cox [Thu, 14 Mar 2013 21:59:45 +0000 (17:59 -0400)]
runtime: fix netbsd after reorg (again)
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7719046
Russ Cox [Thu, 14 Mar 2013 21:53:01 +0000 (17:53 -0400)]
runtime: fix netbsd again after reorg
This time for sure.
That C file sure looked like a header file to me. :-)
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7830043
Russ Cox [Thu, 14 Mar 2013 21:50:07 +0000 (17:50 -0400)]
runtime: fix build for freebsd/arm after reorg
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7701046
Russ Cox [Thu, 14 Mar 2013 21:45:44 +0000 (17:45 -0400)]
runtime: fix freebsd arm for hash change
Was missing definitions of open, read, close.
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7828043
Russ Cox [Thu, 14 Mar 2013 21:39:39 +0000 (17:39 -0400)]
runtime: freebsd, netbsd build fixes after reorg
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7826044
Brad Fitzpatrick [Thu, 14 Mar 2013 21:06:46 +0000 (14:06 -0700)]
database/sql: document non-open of Open; add Ping
Fixes #4804
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7819043
Russ Cox [Thu, 14 Mar 2013 19:42:25 +0000 (19:42 +0000)]
runtime, net: fix arm build
Bring net/fd_linux.go back (it was deleted this morning)
because it is still needed for ARM.
Fix a few typos in the runtime reorg.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7759046
Russ Cox [Thu, 14 Mar 2013 18:35:47 +0000 (14:35 -0400)]
cmd/ld: another use-after-free
This only shows up in the duplicate symbol error message.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7486053
Russ Cox [Thu, 14 Mar 2013 18:35:13 +0000 (11:35 -0700)]
runtime: refactor os-specific code
thread_GOOS.c becomes os_GOOS.c.
signal_GOOS_GOARCH.c becomes os_GOOS_GOARCH.c,
but with non-GOARCH-specific code moved into os_GOOS.c.
The actual arch-specific signal handler moves into signal_GOARCH.c
to avoid per-GOOS duplication.
New files signal_GOOS_GOARCH.h provide macros for
accessing fields of the very system-specific signal info structs.
Lots moving, but nothing changing.
This is a preliminarly cleanup so I can work on the signal
handling code to fix some open issues without having to
make each change 13 times.
Tested on Linux and OS X, 386 and amd64.
Will fix Plan 9, Windows, and ARM after the fact if necessary.
(Plan 9 and Windows should be fine; ARM will probably have some typos.)
Net effect: -1081 lines of code.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7565048
Albert Strasheim [Thu, 14 Mar 2013 16:42:29 +0000 (09:42 -0700)]
net: deflake TestDialTimeout
Fixes #3867.
Fixes #3307.
R=bradfitz, dvyukov
CC=golang-dev
https://golang.org/cl/
7735044
Dmitriy Vyukov [Thu, 14 Mar 2013 15:11:29 +0000 (19:11 +0400)]
runtime: do not memprofile settype_flush
Fixes #4850.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
7745044
Dmitriy Vyukov [Thu, 14 Mar 2013 15:06:35 +0000 (19:06 +0400)]
runtime: integrated network poller for linux
vs tip:
BenchmarkTCP4OneShot 172994 40485 -76.60%
BenchmarkTCP4OneShot-2 96581 30028 -68.91%
BenchmarkTCP4OneShot-4 52615 18454 -64.93%
BenchmarkTCP4OneShot-8 26351 12289 -53.36%
BenchmarkTCP4OneShot-16 12258 16093 +31.29%
BenchmarkTCP4OneShot-32 13200 17045 +29.13%
BenchmarkTCP4OneShotTimeout 124814 42932 -65.60%
BenchmarkTCP4OneShotTimeout-2 99090 29040 -70.69%
BenchmarkTCP4OneShotTimeout-4 51860 18455 -64.41%
BenchmarkTCP4OneShotTimeout-8 26100 12073 -53.74%
BenchmarkTCP4OneShotTimeout-16 12198 16654 +36.53%
BenchmarkTCP4OneShotTimeout-32 13438 17143 +27.57%
BenchmarkTCP4Persistent 115647 7782 -93.27%
BenchmarkTCP4Persistent-2 58024 4808 -91.71%
BenchmarkTCP4Persistent-4 24715 3674 -85.13%
BenchmarkTCP4Persistent-8 16431 2407 -85.35%
BenchmarkTCP4Persistent-16 2336 1875 -19.73%
BenchmarkTCP4Persistent-32 1689 1637 -3.08%
BenchmarkTCP4PersistentTimeout 79754 7859 -90.15%
BenchmarkTCP4PersistentTimeout-2 57708 5952 -89.69%
BenchmarkTCP4PersistentTimeout-4 26907 3823 -85.79%
BenchmarkTCP4PersistentTimeout-8 15036 2567 -82.93%
BenchmarkTCP4PersistentTimeout-16 2507 1903 -24.09%
BenchmarkTCP4PersistentTimeout-32 1717 1627 -5.24%
vs old scheduler:
benchmark old ns/op new ns/op delta
BenchmarkTCPOneShot 192244 40485 -78.94%
BenchmarkTCPOneShot-2 63835 30028 -52.96%
BenchmarkTCPOneShot-4 35443 18454 -47.93%
BenchmarkTCPOneShot-8 22140 12289 -44.49%
BenchmarkTCPOneShot-16 16930 16093 -4.94%
BenchmarkTCPOneShot-32 16719 17045 +1.95%
BenchmarkTCPOneShotTimeout 190495 42932 -77.46%
BenchmarkTCPOneShotTimeout-2 64828 29040 -55.20%
BenchmarkTCPOneShotTimeout-4 34591 18455 -46.65%
BenchmarkTCPOneShotTimeout-8 21989 12073 -45.10%
BenchmarkTCPOneShotTimeout-16 16848 16654 -1.15%
BenchmarkTCPOneShotTimeout-32 16796 17143 +2.07%
BenchmarkTCPPersistent 81670 7782 -90.47%
BenchmarkTCPPersistent-2 26598 4808 -81.92%
BenchmarkTCPPersistent-4 15633 3674 -76.50%
BenchmarkTCPPersistent-8 18093 2407 -86.70%
BenchmarkTCPPersistent-16 17472 1875 -89.27%
BenchmarkTCPPersistent-32 7679 1637 -78.68%
BenchmarkTCPPersistentTimeout 83186 7859 -90.55%
BenchmarkTCPPersistentTimeout-2 26883 5952 -77.86%
BenchmarkTCPPersistentTimeout-4 15776 3823 -75.77%
BenchmarkTCPPersistentTimeout-8 18180 2567 -85.88%
BenchmarkTCPPersistentTimeout-16 17454 1903 -89.10%
BenchmarkTCPPersistentTimeout-32 7798 1627 -79.14%
R=golang-dev, iant, bradfitz, dave, rsc
CC=golang-dev
https://golang.org/cl/
7579044
Dmitriy Vyukov [Thu, 14 Mar 2013 15:04:47 +0000 (19:04 +0400)]
cmd/dist: support goos,goarch build tags
This is necessary to submit netpoll for linux,386 linux,amd64
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/
7470050
Russ Cox [Thu, 14 Mar 2013 14:10:12 +0000 (10:10 -0400)]
runtime: make panic possible before malloc is ready
Otherwise startup problems can be difficult to debug.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
7522046
Dmitriy Vyukov [Thu, 14 Mar 2013 09:48:19 +0000 (13:48 +0400)]
runtime: revert UseSpanType back to 1
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7812043
Dmitriy Vyukov [Thu, 14 Mar 2013 06:59:55 +0000 (10:59 +0400)]
runtime: fix build
R=golang-dev
CC=golang-dev
https://golang.org/cl/
7529049
Dmitriy Vyukov [Thu, 14 Mar 2013 06:38:37 +0000 (10:38 +0400)]
runtime: integrated network poller for darwin
vs tip:
benchmark old ns/op new ns/op delta
BenchmarkTCP4Persistent 67786 33175 -51.06%
BenchmarkTCP4Persistent-2 49085 31227 -36.38%
BenchmarkTCP4PersistentTimeout 69265 32565 -52.98%
BenchmarkTCP4PersistentTimeout-2 49217 32588 -33.79%
vs old scheduler:
benchmark old ns/op new ns/op delta
BenchmarkTCP4Persistent 63517 33175 -47.77%
BenchmarkTCP4Persistent-2 54760 31227 -42.97%
BenchmarkTCP4PersistentTimeout 63234 32565 -48.50%
BenchmarkTCP4PersistentTimeout-2 56956 32588 -42.78%
R=golang-dev, bradfitz, devon.odell, mikioh.mikioh, iant, rsc
CC=golang-dev, pabuhr
https://golang.org/cl/
7569043