]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agodoc: update contrib.html
Bobby Powers [Sun, 19 Feb 2012 21:33:28 +0000 (08:33 +1100)]
doc: update contrib.html

Fix all the local links, as contrib.html is served as
/project/

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

13 years agocmd/fix: add runtime renamings
Russ Cox [Sun, 19 Feb 2012 21:10:45 +0000 (16:10 -0500)]
cmd/fix: add runtime renamings

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

13 years agodoc/install.html: fix link
Rob Pike [Sun, 19 Feb 2012 21:08:30 +0000 (08:08 +1100)]
doc/install.html: fix link
Fixes #3072.

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

13 years agotest/initsyscall.go: delete
Rob Pike [Sun, 19 Feb 2012 20:44:41 +0000 (07:44 +1100)]
test/initsyscall.go: delete
It's testing an old property of the language and is no longer relevant.

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

13 years agotest/initcomma.go: restore what it's supposed to be testing
Rob Pike [Sun, 19 Feb 2012 20:44:24 +0000 (07:44 +1100)]
test/initcomma.go: restore what it's supposed to be testing
which is trailing commas in literals. They were gofmted away at some point.

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

13 years agotest/hashmap.go: delete
Rob Pike [Sun, 19 Feb 2012 20:43:16 +0000 (07:43 +1100)]
test/hashmap.go: delete
It's in an odd style and it's unclear what true purpose it serves as
a test other than to be another Go program.

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

13 years agocmd/cgo: bug fixes
Russ Cox [Sun, 19 Feb 2012 18:32:55 +0000 (13:32 -0500)]
cmd/cgo: bug fixes

* disallow embedding of C type (Fixes issue 2552)
* detect 0-length array (Fixes issue 2806)
* use typedefs when possible, to avoid attribute((unavailable)) (Fixes issue 2888)
* print Go types constructed from C types using original C types (Fixes issue 2612)

This fix changes _cgo_export.h to repeat the preamble from import "C".
Otherwise the fix to issue 2612 is impossible, since it cannot refer to
types that have not been defined.  If people are using //export and
putting non-header information in the preamble, they will need to
refactor their code.

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

13 years agodoc: Fixed type in documentation for FormatFloat.
Marcel van Lohuizen [Sun, 19 Feb 2012 18:26:05 +0000 (19:26 +0100)]
doc: Fixed type in documentation for FormatFloat.

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

13 years ago6l, 8l: fix build for ELF systems
Shenghou Ma [Sun, 19 Feb 2012 18:16:47 +0000 (13:16 -0500)]
6l, 8l: fix build for ELF systems

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

13 years agoruntime: fix another memory leak
Russ Cox [Sun, 19 Feb 2012 16:05:19 +0000 (11:05 -0500)]
runtime: fix another memory leak

morebuf holds a pc/sp from the last stack split or
reflect.call or panic/recover.  If the pc is a closure,
the reference will keep it from being collected.

moreargp holds a pointer to the arguments from the
last stack split or reflect.call or panic/recover.
Normally it is a stack pointer and thus not of interest,
but in the case of reflect.call it is an allocated argument
list and holds up the arguments to the call.

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

13 years agogc, ld: tag data as no-pointers and allocate in separate section
Russ Cox [Sun, 19 Feb 2012 08:19:52 +0000 (03:19 -0500)]
gc, ld: tag data as no-pointers and allocate in separate section

The garbage collector can avoid scanning this section, with
reduces collection time as well as the number of false positives.
Helps a little bit with issue 909, but certainly does not solve it.

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

13 years agolib/time/zoneinfo: delete
Russ Cox [Sun, 19 Feb 2012 08:19:05 +0000 (03:19 -0500)]
lib/time/zoneinfo: delete

Now in zoneinfo.zip.

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

13 years agotime: switch to using (uncompressed) zoneinfo zip file
Russ Cox [Sun, 19 Feb 2012 08:16:20 +0000 (03:16 -0500)]
time: switch to using (uncompressed) zoneinfo zip file

Removal of old zoneinfo files is a separate CL due to its size.

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

13 years agotest/chan: document tests
Rob Pike [Sun, 19 Feb 2012 06:44:02 +0000 (17:44 +1100)]
test/chan: document tests

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

13 years agotest/interface: document tests
Rob Pike [Sun, 19 Feb 2012 06:33:41 +0000 (17:33 +1100)]
test/interface: document tests
Most already had comments (yay); adjusted for consistency.

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

13 years agoencoding/json: disable anonymous fields
Russ Cox [Sun, 19 Feb 2012 05:27:05 +0000 (00:27 -0500)]
encoding/json: disable anonymous fields

We should, after Go 1, make them work the same as
package xml, that is, make them appear in the outer
struct.  For now turn them off so that people do not
depend on the old behavior.

Fixing them is issue 3069.

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

13 years agoruntime: fix tiny memory leak
Russ Cox [Sun, 19 Feb 2012 05:26:33 +0000 (00:26 -0500)]
runtime: fix tiny memory leak

The m->cret word holds the C return value when returning
across a stack split boundary.  It was not being cleared after
use, which means that the return value (if a C function)
or else the value of AX/R0 at the time of the last stack unsplit
was being kept alive longer than necessary.  Clear it.

I think the effect here should be very small, but worth fixing
anyway.

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

13 years agoos: remove Getenverror
Brad Fitzpatrick [Sun, 19 Feb 2012 05:18:13 +0000 (21:18 -0800)]
os: remove Getenverror

Fixes #3065

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

13 years agogc: fix error for floating-point constant %
Russ Cox [Sun, 19 Feb 2012 05:12:31 +0000 (00:12 -0500)]
gc: fix error for floating-point constant %

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

13 years agoruntime: API
Russ Cox [Sun, 19 Feb 2012 05:11:44 +0000 (00:11 -0500)]
runtime: API

Delete Alloc, Free, Lookup, Semacquire, Semrelease

Fixes #2955.

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

13 years agotest: explanatory comments [c-g]*
Rob Pike [Sun, 19 Feb 2012 03:28:53 +0000 (14:28 +1100)]
test: explanatory comments [c-g]*

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

13 years agogo 1: add a description of the os error changes.
Rob Pike [Sun, 19 Feb 2012 03:15:26 +0000 (14:15 +1100)]
go 1: add a description of the os error changes.
I'm sure I wrote these before but they've disappeared.

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

13 years agotest: [a-c]: add introductory comments to tests
Rob Pike [Sun, 19 Feb 2012 02:19:43 +0000 (13:19 +1100)]
test: [a-c]: add introductory comments to tests
Very few of the compiler regression tests include a comment
saying waht they do. Many are obvious, some are anything but.
I've started with a-c in the top directory. More will follow once
we agree on the approach, correctness, and thoroughness here.
zerodivide.go sneaked in too.

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

13 years agogc: drop ideal bool
Russ Cox [Sun, 19 Feb 2012 02:07:08 +0000 (21:07 -0500)]
gc: drop ideal bool

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

13 years agotime: use Go distribution zoneinfo if system copy not found
Russ Cox [Sun, 19 Feb 2012 02:02:41 +0000 (21:02 -0500)]
time: use Go distribution zoneinfo if system copy not found

Fixes #2964.

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

13 years agonet: make LocalAddr on multicast return group address
Mikio Hara [Sun, 19 Feb 2012 01:50:03 +0000 (10:50 +0900)]
net: make LocalAddr on multicast return group address

Fixes #3067.

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

13 years agotime: add zoneinfo files, mainly for non-Unix systems
Russ Cox [Sun, 19 Feb 2012 01:36:51 +0000 (20:36 -0500)]
time: add zoneinfo files, mainly for non-Unix systems

Generated by lib/time/update.bash.

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

13 years agolib/time: add README, update.bash script
Russ Cox [Sun, 19 Feb 2012 01:33:58 +0000 (20:33 -0500)]
lib/time: add README, update.bash script

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

13 years agocmd/api: s/ideal-bool/bool/
Russ Cox [Sun, 19 Feb 2012 01:31:19 +0000 (20:31 -0500)]
cmd/api: s/ideal-bool/bool/

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

13 years agoall: shorten some of the longer tests
Russ Cox [Sat, 18 Feb 2012 21:24:23 +0000 (16:24 -0500)]
all: shorten some of the longer tests

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

13 years agotest: use testlib (another bunch).
Rémy Oudompheng [Sat, 18 Feb 2012 21:15:42 +0000 (22:15 +0100)]
test: use testlib (another bunch).

Apply sed with:

1s,^// $G $D/$F.go && $L $F.$A && ./$A.out || echo.*,// run,
1s,^// $G $D/$F.go || echo.*,// compile,

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

13 years agotest/run: honor $TMPDIR
Shenghou Ma [Sat, 18 Feb 2012 21:15:12 +0000 (16:15 -0500)]
test/run: honor $TMPDIR

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

13 years agotemplates: minor edits to the documentation
Rob Pike [Sat, 18 Feb 2012 20:45:12 +0000 (07:45 +1100)]
templates: minor edits to the documentation

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

13 years agodoc: update gccgo_contribute.html
Ian Lance Taylor [Sat, 18 Feb 2012 19:15:52 +0000 (11:15 -0800)]
doc: update gccgo_contribute.html

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

13 years agoos: document the type of link errors
Brad Fitzpatrick [Sat, 18 Feb 2012 12:45:43 +0000 (04:45 -0800)]
os: document the type of link errors

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

13 years agobytes: document Compare/Equal semantics for nil arguments, and add tests.
David Symonds [Sat, 18 Feb 2012 06:39:40 +0000 (17:39 +1100)]
bytes: document Compare/Equal semantics for nil arguments, and add tests.

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

13 years agodoc: various updates to doc/code.html
Shenghou Ma [Sat, 18 Feb 2012 05:13:02 +0000 (16:13 +1100)]
doc: various updates to doc/code.html

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

13 years agohtml/template: replace obsolete reference to template.Set
Rob Pike [Sat, 18 Feb 2012 05:02:51 +0000 (16:02 +1100)]
html/template: replace obsolete reference to template.Set
Fixes #3053.

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

13 years agotest: change bug040 to use errorcheck
Ian Lance Taylor [Sat, 18 Feb 2012 04:35:40 +0000 (20:35 -0800)]
test: change bug040 to use errorcheck

Because bug040.go was ignoring all error messages, the fact
that it got an error about fuction main was being ignored.

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

13 years agotest: remove a couple of bad tests that duplicate declbad.go
Ian Lance Taylor [Sat, 18 Feb 2012 04:35:18 +0000 (20:35 -0800)]
test: remove a couple of bad tests that duplicate declbad.go

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

13 years agoimage: add Decode example.
Nigel Tao [Sat, 18 Feb 2012 04:09:01 +0000 (15:09 +1100)]
image: add Decode example.

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

13 years agoencoding/gob: cache engine for user type, not base type
Rob Pike [Sat, 18 Feb 2012 03:38:37 +0000 (14:38 +1100)]
encoding/gob: cache engine for user type, not base type
When we build the encode engine for a recursive type, we
mustn't disregard the indirections or we can try to reuse an
engine at the wrong indirection level.

Fixes #3026.

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

13 years agotest: add some tests that gccgo failed to handle correctly
Ian Lance Taylor [Sat, 18 Feb 2012 01:52:05 +0000 (17:52 -0800)]
test: add some tests that gccgo failed to handle correctly

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

13 years agoencoding/gob: fix mutually recursive slices of structs
Rob Pike [Sat, 18 Feb 2012 01:43:08 +0000 (12:43 +1100)]
encoding/gob: fix mutually recursive slices of structs

Fix by setting the element type if we discover it's zero while building.
We could have fixed this better with foresight by doing the id setting in a
different sequence, but doing that now would break binary compatibility.

Fixes #2995.

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

13 years agopkg: a slew of examples
Andrew Gerrand [Sat, 18 Feb 2012 00:48:33 +0000 (11:48 +1100)]
pkg: a slew of examples

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

13 years agocrypto/dsa: add missing period in package comment
Robert Griesemer [Fri, 17 Feb 2012 22:48:44 +0000 (14:48 -0800)]
crypto/dsa: add missing period in package comment

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

13 years agodoc: fix tables
Russ Cox [Fri, 17 Feb 2012 21:59:33 +0000 (16:59 -0500)]
doc: fix tables

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

13 years agomath/rand: Intn etc. should panic if their argument is <= 0.
Rob Pike [Fri, 17 Feb 2012 21:53:03 +0000 (08:53 +1100)]
math/rand: Intn etc. should panic if their argument is <= 0.

I am making a unilateral decision here. I could also settle for returning 0,
as long it's documented, but I argue that it's equivalent to an index
out of bounds.

Fixes #2892.

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

13 years agoos: fix existential typo
Anthony Martin [Fri, 17 Feb 2012 20:44:38 +0000 (07:44 +1100)]
os: fix existential typo

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

13 years agogo/doc: move Example code from go/ast to go/doc.
Robert Griesemer [Fri, 17 Feb 2012 20:00:12 +0000 (12:00 -0800)]
go/doc: move Example code from go/ast to go/doc.

Fixes #3048.

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

13 years agocmd/gc: fix comparison of struct with _ field
Russ Cox [Fri, 17 Feb 2012 19:45:29 +0000 (14:45 -0500)]
cmd/gc: fix comparison of struct with _ field

Fixes #2989.

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

13 years agoruntime: remove use of ?:
Gustavo Niemeyer [Fri, 17 Feb 2012 19:13:16 +0000 (17:13 -0200)]
runtime: remove use of ?:

Fixes #3061.

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

13 years agogodoc: don't print spurious suggestion when running "go doc foo"
Robert Griesemer [Fri, 17 Feb 2012 19:01:16 +0000 (11:01 -0800)]
godoc: don't print spurious suggestion when running "go doc foo"

Fixes #3041.

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

13 years agogo/parser: example for ParseFile use
Robert Griesemer [Fri, 17 Feb 2012 17:31:42 +0000 (09:31 -0800)]
go/parser: example for ParseFile use

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

13 years agogo/scanner: replace comment with example
Robert Griesemer [Fri, 17 Feb 2012 17:26:36 +0000 (09:26 -0800)]
go/scanner: replace comment with example

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

13 years agomisc/dist/windows: distro builder updates
Joe Poirier [Fri, 17 Feb 2012 17:07:34 +0000 (11:07 -0600)]
misc/dist/windows:  distro builder updates

files moved from misc/windows, bash packager file replaced with Windows batch file

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

13 years agocmd/dist: make dir check in defaulttarg() more robust
Shenghou Ma [Fri, 17 Feb 2012 16:29:34 +0000 (11:29 -0500)]
cmd/dist: make dir check in defaulttarg() more robust

1, strip last path separator from $GOROOT
   The user might define GOROOT=/path/to/go/, but then the dir
   check in defaulttarg() will always complain the current dir
   is not within $GOROOT/src/.
2, resolve symlinks in the default goroot
   Or if getcwd() returns a fully-resolved path, the check in
   defaulttarg() will always fail.

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

13 years ago8a, 8l: add EMMS instruction
Evan Shaw [Fri, 17 Feb 2012 16:21:46 +0000 (11:21 -0500)]
8a, 8l: add EMMS instruction

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

13 years ago.hgignore: add src/cmd/dist/dist.dSYM
Shenghou Ma [Fri, 17 Feb 2012 16:21:32 +0000 (11:21 -0500)]
.hgignore: add src/cmd/dist/dist.dSYM

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

13 years agodoc: clarify gccgo support for segmented stacks
Ian Lance Taylor [Fri, 17 Feb 2012 13:59:15 +0000 (05:59 -0800)]
doc: clarify gccgo support for segmented stacks

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

13 years agosync: say that Cond.Wait can not return spuriously
Dmitriy Vyukov [Fri, 17 Feb 2012 09:20:11 +0000 (13:20 +0400)]
sync: say that Cond.Wait can not return spuriously

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

13 years agonet/rpc: fix spurious panic in test
Dmitriy Vyukov [Fri, 17 Feb 2012 07:42:02 +0000 (11:42 +0400)]
net/rpc: fix spurious panic in test
The panic happens if -benchtime flag is specified:
go test -bench=EndToEndAsyncHTTP -benchtime=120

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

13 years agoruntime: silence warnings
Alex Brainman [Fri, 17 Feb 2012 06:05:41 +0000 (17:05 +1100)]
runtime: silence warnings

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

13 years agofaq: add entry about nil interfaces vs. nil pointers
Rob Pike [Fri, 17 Feb 2012 05:27:17 +0000 (16:27 +1100)]
faq: add entry about nil interfaces vs. nil pointers

Fixes #2778.

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

13 years agotest: use testlib (final 61)
Russ Cox [Fri, 17 Feb 2012 04:51:04 +0000 (23:51 -0500)]
test: use testlib (final 61)

X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

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

13 years agotest: use testlib (fourth 100)
Russ Cox [Fri, 17 Feb 2012 04:50:37 +0000 (23:50 -0500)]
test: use testlib (fourth 100)

X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

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

13 years agotest: use testlib (third 100)
Russ Cox [Fri, 17 Feb 2012 04:49:59 +0000 (23:49 -0500)]
test: use testlib (third 100)

X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

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

13 years agotest: use testlib (second 100)
Russ Cox [Fri, 17 Feb 2012 04:49:30 +0000 (23:49 -0500)]
test: use testlib (second 100)

X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

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

13 years agotest: use testlib (first 100)
Russ Cox [Fri, 17 Feb 2012 04:48:57 +0000 (23:48 -0500)]
test: use testlib (first 100)

X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

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

13 years agotest: add testlib
Russ Cox [Fri, 17 Feb 2012 04:48:24 +0000 (23:48 -0500)]
test: add testlib

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

13 years agonet/url: API
Russ Cox [Fri, 17 Feb 2012 04:46:28 +0000 (23:46 -0500)]
net/url: API

Convert cryptotype to general go1rename fix.
Add os.Exec -> syscall.Exec fix along with new
URL fixes.

Fixes #2946.

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

13 years agonet/url: spell the package name correctly.
David Symonds [Fri, 17 Feb 2012 04:31:07 +0000 (15:31 +1100)]
net/url: spell the package name correctly.

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

13 years agofix: walk ast.Ellipsis values.
Nigel Tao [Fri, 17 Feb 2012 03:39:50 +0000 (14:39 +1100)]
fix: walk ast.Ellipsis values.

Fixes #2583.

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

13 years agoruntime: Permit default behaviour of SIGTSTP, SIGTTIN, SIGTTOU.
David Symonds [Fri, 17 Feb 2012 03:36:40 +0000 (14:36 +1100)]
runtime: Permit default behaviour of SIGTSTP, SIGTTIN, SIGTTOU.

Fixes #3037.

R=rsc, minux.ma, r, rsc
CC=golang-dev
https://golang.org/cl/5674072

13 years agoos: add a simple example to the package doc.
Rob Pike [Fri, 17 Feb 2012 03:30:25 +0000 (14:30 +1100)]
os: add a simple example to the package doc.
Shows error handling and slices for Read and Write.

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

13 years agolog/syslog: disable on Windows
Russ Cox [Fri, 17 Feb 2012 03:04:13 +0000 (22:04 -0500)]
log/syslog: disable on Windows

We want to be able to implement good Windows support
after Go 1.  Right now Windows tries to use Unix domain
sockets, and I'd rather just have it not be available.

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

13 years agonet: package doc overview / examples
Brad Fitzpatrick [Fri, 17 Feb 2012 02:07:06 +0000 (13:07 +1100)]
net: package doc overview / examples

Fixes #2774

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

13 years agonet, os, syscall: delete os.EPLAN9
Mikio Hara [Fri, 17 Feb 2012 01:59:30 +0000 (10:59 +0900)]
net, os, syscall: delete os.EPLAN9

Also fixes plan9 cross-build.

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

13 years agodebug/dwarf: address TODO in doc comment for New
Rob Pike [Fri, 17 Feb 2012 01:47:56 +0000 (12:47 +1100)]
debug/dwarf: address TODO in doc comment for New

Fixes #2844.

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

13 years agodoc: provide example filepath.Walk for go1
Mike Rosset [Fri, 17 Feb 2012 01:45:55 +0000 (12:45 +1100)]
doc: provide example filepath.Walk for go1

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

13 years agonet/textproto: delete spurious quote
Rob Pike [Fri, 17 Feb 2012 00:35:38 +0000 (11:35 +1100)]
net/textproto: delete spurious quote
Sigh.

R=golang-dev, gri, nigeltao
CC=golang-dev
https://golang.org/cl/5675071

13 years agonet/textproto: add Conn to doc comment
Rob Pike [Thu, 16 Feb 2012 23:21:12 +0000 (10:21 +1100)]
net/textproto: add Conn to doc comment

This revolutionary transfiguration undergirding the code base
Fixes #2945.

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

13 years agoos: delete os.EINVAL and so on
Rob Pike [Thu, 16 Feb 2012 23:04:29 +0000 (10:04 +1100)]
os: delete os.EINVAL and so on
The set of errors forwarded by the os package varied with system and
was therefore non-portable.
Three helpers added for portable error checking: IsExist, IsNotExist, and IsPermission.
One or two more may need to come, but let's keep the set very small to discourage
thinking about errors that way.

R=mikioh.mikioh, gustavo, r, rsc
CC=golang-dev
https://golang.org/cl/5672047

13 years agopath/filepath: fix test on darwin
Rob Pike [Thu, 16 Feb 2012 22:56:14 +0000 (09:56 +1100)]
path/filepath: fix test on darwin
/tmp being itself a symlink causes problems for the test, so use / as the absolute path.

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

13 years agocmd/gc: correctly typecheck expression lists in returns.
Rémy Oudompheng [Thu, 16 Feb 2012 22:42:19 +0000 (23:42 +0100)]
cmd/gc: correctly typecheck expression lists in returns.

Invalid return statements were accidentally compiling or
triggering internal errors.
Fixes #3044.

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

13 years agogo/parser: imaginary constants and ! may start an expression
Robert Griesemer [Thu, 16 Feb 2012 22:13:31 +0000 (14:13 -0800)]
go/parser: imaginary constants and ! may start an expression

Complete list of tokens that can start a top-level expression.

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

13 years agogo spec: struct comparison only compares non-blank fields
Robert Griesemer [Thu, 16 Feb 2012 22:13:17 +0000 (14:13 -0800)]
go spec: struct comparison only compares non-blank fields

Fixes #3031.

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

13 years agoruntime: rename Cgocalls and Goroutines to NumCgoCall and NumGoroutine, respectively.
David Symonds [Thu, 16 Feb 2012 21:49:41 +0000 (08:49 +1100)]
runtime: rename Cgocalls and Goroutines to NumCgoCall and NumGoroutine, respectively.
Update some other docs too.

Update #2955.

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

13 years agomake.bat, run.bat: echo newlines
Hector Chu [Thu, 16 Feb 2012 20:49:50 +0000 (20:49 +0000)]
make.bat, run.bat: echo newlines

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

13 years agosyscall: fix bounds check in Error
Russ Cox [Thu, 16 Feb 2012 20:23:50 +0000 (15:23 -0500)]
syscall: fix bounds check in Error

Fixes #3042.

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

13 years agoencoding/gob: catch internal error when it happens
Rob Pike [Thu, 16 Feb 2012 20:07:53 +0000 (07:07 +1100)]
encoding/gob: catch internal error when it happens
It was being skipped due to an oversight.
Also adjust naming parameters for map type construction - makes debugging easier.
Prelude to issue 3026.

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

13 years agopath, path/filepath: polish documentation.
Rémy Oudompheng [Thu, 16 Feb 2012 19:05:39 +0000 (20:05 +0100)]
path, path/filepath: polish documentation.

Fixes #2950.
Fixes #2951.

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

13 years agocmd/go: fix 'go help <command>'
Bobby Powers [Thu, 16 Feb 2012 19:05:17 +0000 (14:05 -0500)]
cmd/go: fix 'go help <command>'

It depended on the old behavior of functions in structs.

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

13 years agoos,syscall: fix plan 9 build
David du Colombier [Thu, 16 Feb 2012 19:04:51 +0000 (14:04 -0500)]
os,syscall: fix plan 9 build

NewFile take uintptr
make syscall.ProcAttr.Files be []uintptr

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

13 years agodist: add clang specific -Wno options
Bobby Powers [Thu, 16 Feb 2012 18:31:46 +0000 (13:31 -0500)]
dist: add clang specific -Wno options

Clang 3.1 has more warnings enabled by default than GCC.
Combined with -Werror, they cause the build to fail
unnecessarily.  if the name of our compiler ends in "clang",
add the necessary extra -Wno options.  Ideally we would add
these flags unconditionally, as GCC is supposed to ignore
unknown -Wno flags, but apple's llvm-gcc doesn't.

Fixes #2878.

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

13 years agoruntime: release unused memory to the OS.
Sébastien Paolacci [Thu, 16 Feb 2012 18:30:04 +0000 (13:30 -0500)]
runtime: release unused memory to the OS.

Periodically browse MHeap's freelists for long unused spans and release them if any.

Current hardcoded settings:
        - GC is forced if none occured over the last 2 minutes.
        - spans are handed back after 5 minutes of uselessness.

SysUnused (for Unix) is a wrapper on madvise MADV_DONTNEED on Linux and MADV_FREE on BSDs.

R=rsc, dvyukov, remyoudompheng
CC=golang-dev
https://golang.org/cl/5451057

13 years agocmd, pkg/go/*: fix "go vet" warnings for go/ast and go/printer
Nigel Tao [Thu, 16 Feb 2012 11:43:41 +0000 (22:43 +1100)]
cmd, pkg/go/*: fix "go vet" warnings for go/ast and go/printer
struct literals.

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

13 years agoos: fix build
Rob Pike [Thu, 16 Feb 2012 06:39:04 +0000 (17:39 +1100)]
os: fix build

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5674070

13 years agohtml/template: clone is implemented elsewhere, so delete this implementation
Rob Pike [Thu, 16 Feb 2012 06:36:06 +0000 (17:36 +1100)]
html/template: clone is implemented elsewhere, so delete this implementation

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5676064

13 years agoall: errors caught by go vet
Rob Pike [Thu, 16 Feb 2012 06:21:21 +0000 (17:21 +1100)]
all: errors caught by go vet

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