]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agonet: run TestDialTimeout on windows
Alex Brainman [Tue, 7 Feb 2012 01:05:59 +0000 (12:05 +1100)]
net: run TestDialTimeout on windows

R=golang-dev, rsc
CC=bradfitz, golang-dev, mikioh.mikioh
https://golang.org/cl/5616066

13 years agopath/filepath: repair and simplify the symlink test
Rob Pike [Tue, 7 Feb 2012 00:00:13 +0000 (11:00 +1100)]
path/filepath: repair and simplify the symlink test
I hate symlinks.
Fixes #2787.

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

13 years agomisc/osx: don't set GOROOT or modify profile files
Andrew Gerrand [Mon, 6 Feb 2012 23:38:10 +0000 (10:38 +1100)]
misc/osx: don't set GOROOT or modify profile files

There's no reason to set GOROOT as the tools will have the path baked
into it with GOROOT_FINAL.

R=bradfitz, bytbox, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5576064

13 years agosyscall: add Timeval.Nano, Timespec.Nano, for conversion to Duration
Russ Cox [Mon, 6 Feb 2012 23:04:12 +0000 (18:04 -0500)]
syscall: add Timeval.Nano, Timespec.Nano, for conversion to Duration

Fixes #2534.

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

13 years agogo_spec: primality is elusive
Rob Pike [Mon, 6 Feb 2012 19:59:36 +0000 (06:59 +1100)]
go_spec: primality is elusive
This time for sure.

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

13 years agocgo: print line numbers in fatal errors when relevant.
Rémy Oudompheng [Mon, 6 Feb 2012 19:38:54 +0000 (20:38 +0100)]
cgo: print line numbers in fatal errors when relevant.

Signatures of fatalf and error_ helpers have been matched for
consistency.
Fixes #1800.

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

13 years agobuild: add make.bash --dist-tool
Russ Cox [Mon, 6 Feb 2012 18:48:43 +0000 (13:48 -0500)]
build: add make.bash --dist-tool

R=golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5634048

13 years agodoc: remove overuse of simply
Russ Cox [Mon, 6 Feb 2012 18:34:35 +0000 (13:34 -0500)]
doc: remove overuse of simply

Specifically, remove simply where it is claiming that the
code or the action to be carried out is simple, since the
reader might disagree.

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

13 years agobuild: delete make paraphernalia
Russ Cox [Mon, 6 Feb 2012 18:34:25 +0000 (13:34 -0500)]
build: delete make paraphernalia

As a convenience to people working on the tools,
leave Makefiles that invoke the go dist tool appropriately.
They are not used during the build.

R=golang-dev, bradfitz, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5636050

13 years agocmd/dist: ignore file names beginning with . or _
Russ Cox [Mon, 6 Feb 2012 18:33:22 +0000 (13:33 -0500)]
cmd/dist: ignore file names beginning with . or _

This is the same heuristic that build.ScanDir uses.
It avoids considering 'resource fork' files on OS X;
the resource for x.go is ._x.go.

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

13 years agoruntime: delete UpdateMemStats, replace with ReadMemStats(&stats).
Rémy Oudompheng [Mon, 6 Feb 2012 18:16:26 +0000 (19:16 +0100)]
runtime: delete UpdateMemStats, replace with ReadMemStats(&stats).

Unexports runtime.MemStats and rename MemStatsType to MemStats.
The new accessor requires passing a pointer to a user-allocated
MemStats structure.

Fixes #2572.

R=bradfitz, rsc, bradfitz, gustavo
CC=golang-dev, remy
https://golang.org/cl/5616072

13 years agodatabase/sql: permit scanning into interface{}
Brad Fitzpatrick [Mon, 6 Feb 2012 18:06:22 +0000 (10:06 -0800)]
database/sql: permit scanning into interface{}

See thread http://goo.gl/7zzzU for background.

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

13 years ago8a, 8l: implement support for RDTSC instruction.
Shenghou Ma [Mon, 6 Feb 2012 17:49:28 +0000 (12:49 -0500)]
8a, 8l: implement support for RDTSC instruction.
        Also modify runtime/asm_386.s to use it.

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

13 years agobuild: remove unnecessary pragmas
Anthony Martin [Mon, 6 Feb 2012 17:45:23 +0000 (12:45 -0500)]
build: remove unnecessary pragmas

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

13 years agocmd/go: fixed panic on `go clean -n` and `go clean -x`.
Sanjay Menakuru [Mon, 6 Feb 2012 17:40:59 +0000 (12:40 -0500)]
cmd/go: fixed panic on `go clean -n` and `go clean -x`.
        also made generated scripts act more like running go clean itself

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

13 years agocmd/gc: disallow switch _ := v.(type)
Russ Cox [Mon, 6 Feb 2012 17:35:29 +0000 (12:35 -0500)]
cmd/gc: disallow switch _ := v.(type)

Fixes #2827.

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

13 years agomisc/goplay: use go tool "run"
Olivier Duperray [Mon, 6 Feb 2012 17:10:49 +0000 (12:10 -0500)]
misc/goplay: use go tool "run"

Fixes #2872

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

13 years agocmd/go: pass env CGO_CFLAGS to cgo
Jeff Hodges [Mon, 6 Feb 2012 16:26:15 +0000 (11:26 -0500)]
cmd/go: pass env CGO_CFLAGS to cgo

Passing the CGO_CFLAGS to cgo is required to make alternative include
directories work when building a cgo project.

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

13 years agoruntime: fix float64 hash on 32-bit machine
Russ Cox [Mon, 6 Feb 2012 16:24:34 +0000 (11:24 -0500)]
runtime: fix float64 hash on 32-bit machine

Multiplying by the low 32 bits was a bad idea
no matter what, but it was a particularly unfortunate
choice because those bits are 0 for small integer values.

Fixes #2883.

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

13 years agoruntime: use GOTRACEBACK to decide whether to show runtime frames
Russ Cox [Mon, 6 Feb 2012 16:24:14 +0000 (11:24 -0500)]
runtime: use GOTRACEBACK to decide whether to show runtime frames

Right now, GOTRACEBACK=0 means do not show any stack traces.
Unset means the default behavior (declutter by hiding runtime routines).

This CL makes GOTRACEBACK=2 mean include the runtime routines.
It avoids having to recompile the runtime when you want to see
the runtime in the tracebacks.

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

13 years agocmd/gc: another special (%hhS) case for method names.
Luuk van Dijk [Mon, 6 Feb 2012 15:38:59 +0000 (16:38 +0100)]
cmd/gc: another special (%hhS) case for method names.

Fixes #2877

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

13 years agocmd/gc: fix codegen reordering for expressions involving && and ||
Luuk van Dijk [Mon, 6 Feb 2012 14:41:01 +0000 (15:41 +0100)]
cmd/gc: fix codegen reordering for expressions involving && and ||

Fixes #2821.

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

13 years agoarchive/zip: support full range of FileMode flags
Gustavo Niemeyer [Mon, 6 Feb 2012 13:58:32 +0000 (11:58 -0200)]
archive/zip: support full range of FileMode flags

Zip files may actually store symlinks, and that's represented
as a file with unix flag S_IFLNK and with its data containing
the symlink target name.

The other flags are being supported too. Now that the os package
has the full range of flags in a system agnostic manner, there's
no reason to discard that information.

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

13 years agogc: don't print implicit type on struct literal in export
Luuk van Dijk [Mon, 6 Feb 2012 11:19:59 +0000 (12:19 +0100)]
gc: don't print implicit type on struct literal in export

As pointed out in the discussion around 2678.

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

13 years agonet/http: Don't set Content-Type header for HEAD requests by default
Patrick Mylund Nielsen [Mon, 6 Feb 2012 06:55:47 +0000 (17:55 +1100)]
net/http: Don't set Content-Type header for HEAD requests by default
since the real type is not inferred.
Fixes #2885.

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

13 years agoA+C: Patrick Mylund Nielsen (individual CLA)
David Symonds [Mon, 6 Feb 2012 06:54:56 +0000 (17:54 +1100)]
A+C: Patrick Mylund Nielsen (individual CLA)

R=golang-dev
TBR=adg
CC=golang-dev, patrick
https://golang.org/cl/5616070

13 years agobytes: API tweaks
Rob Pike [Mon, 6 Feb 2012 04:29:21 +0000 (15:29 +1100)]
bytes: API tweaks
- fix documentation for NewBuffer and NewBufferString
- document and implement behavior of Truncate on invalid lengths

Fixes #2837.

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

13 years agoio: API tweaks
Rob Pike [Mon, 6 Feb 2012 04:09:50 +0000 (15:09 +1100)]
io: API tweaks
- eliminate local Error type (a historical artifact)
- fix documentation of CopyN
- fix documentation of WriteString
Fixes #2859.

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

13 years ago cmd/go: build: print import errors when invoked on files
Kyle Lemons [Mon, 6 Feb 2012 03:10:03 +0000 (14:10 +1100)]
        cmd/go: build: print import errors when invoked on files

      This fix makes the goFilesPackage helper function print the errors from
      package imports and exit similar to how the packagesForBuild function does.

      Without this change, when invoking "go build *.go" with, for example,
      an old import path, the following stack trace is generated:

      panic: runtime error: invalid memory address or nil pointer dereference

      goroutine 1 [running]:
      go/build.(*Tree).PkgDir(...)
              /opt/go/src/pkg/go/build/path.go:52 +0xfb
      main.(*builder).action(...)
              /opt/go/src/cmd/go/build.go:327 +0xb8
      main.(*builder).action(...)
              /opt/go/src/cmd/go/build.go:335 +0x208
      main.runBuild(...)
              /opt/go/src/cmd/go/build.go:129 +0x386
      main.main()
              /opt/go/src/cmd/go/main.go:126 +0x2d8

Fixes #2865.

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

13 years agoall: avoid bytes.NewBuffer(nil)
Rob Pike [Mon, 6 Feb 2012 03:09:00 +0000 (14:09 +1100)]
all: avoid bytes.NewBuffer(nil)
The practice encourages people to think this is the way to
create a bytes.Buffer when new(bytes.Buffer) or
just var buf bytes.Buffer work fine.
(html/token.go was missing the point altogether.)

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

13 years agogob: fuzz testing, plus a fix for very large type names.
David Symonds [Mon, 6 Feb 2012 03:02:12 +0000 (14:02 +1100)]
gob: fuzz testing, plus a fix for very large type names.

Fixes #2689.

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

13 years agotesting: capture panics, present them, and mark the test as a failure.
David Symonds [Mon, 6 Feb 2012 03:00:23 +0000 (14:00 +1100)]
testing: capture panics, present them, and mark the test as a failure.

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

13 years agohtml: add package doc.
Nigel Tao [Mon, 6 Feb 2012 02:24:45 +0000 (13:24 +1100)]
html: add package doc.

Fixes #2857.

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

13 years agonet: fix Plan 9 build
Anthony Martin [Mon, 6 Feb 2012 00:59:32 +0000 (16:59 -0800)]
net: fix Plan 9 build

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

13 years ago.hgignore: delete more dregs
Rob Pike [Mon, 6 Feb 2012 00:25:28 +0000 (11:25 +1100)]
.hgignore: delete more dregs

R=golang-dev, ality
CC=golang-dev
https://golang.org/cl/5636044

13 years ago.hgignore: delete dregs
Rob Pike [Mon, 6 Feb 2012 00:09:38 +0000 (11:09 +1100)]
.hgignore: delete dregs

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

13 years agoimage: add package docs, rename s/UnknownFormatError/ErrFormat/ and
Nigel Tao [Mon, 6 Feb 2012 00:04:12 +0000 (11:04 +1100)]
image: add package docs, rename s/UnknownFormatError/ErrFormat/ and
rewrite the doc comment for Repeated.

Fixes #2858.

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

13 years agodashboard: update to go1beta
Andrew Gerrand [Sun, 5 Feb 2012 22:26:32 +0000 (09:26 +1100)]
dashboard: update to go1beta

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

13 years agocmd/dist: fix bug in bsubst
Alex Brainman [Sun, 5 Feb 2012 04:16:39 +0000 (15:16 +1100)]
cmd/dist: fix bug in bsubst

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

13 years agobuild: fix sudo.bash.
David Symonds [Sun, 5 Feb 2012 03:50:38 +0000 (14:50 +1100)]
build: fix sudo.bash.

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

13 years ago.hgignore: add VERSION.cache
Gustavo Niemeyer [Sun, 5 Feb 2012 02:36:20 +0000 (00:36 -0200)]
.hgignore: add VERSION.cache

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

13 years agocmd/dist: add GOBIN to env's output
Gustavo Niemeyer [Sun, 5 Feb 2012 02:35:08 +0000 (00:35 -0200)]
cmd/dist: add GOBIN to env's output

clean.bash depends on it being set.

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

13 years agodoc/go1.html: style tweak for expvar notes.
David Symonds [Sat, 4 Feb 2012 10:55:38 +0000 (21:55 +1100)]
doc/go1.html: style tweak for expvar notes.

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

13 years agounicode: document large var blocks and the SpecialCase vars.
David Symonds [Sat, 4 Feb 2012 07:35:37 +0000 (18:35 +1100)]
unicode: document large var blocks and the SpecialCase vars.

Fixes #2772.

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

13 years agocmd/dist: fix memory bug (fix builders?)
Russ Cox [Sat, 4 Feb 2012 07:15:53 +0000 (02:15 -0500)]
cmd/dist: fix memory bug (fix builders?)

Thanks, Valgrind!

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

13 years agocmd/dist: fix arm build
Russ Cox [Sat, 4 Feb 2012 07:01:58 +0000 (02:01 -0500)]
cmd/dist: fix arm build

5l does not use the whole set of ld files
like the other linkers do.

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

13 years agocmd/dist: more build fixes
Russ Cox [Sat, 4 Feb 2012 06:46:46 +0000 (01:46 -0500)]
cmd/dist: more build fixes

Flush stdout before writing to stderr, to avoid
reordering output.

Allow amd64 from uname -m (FreeBSD).

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

13 years agocmd/dist: add BSD gohostos cases
Russ Cox [Sat, 4 Feb 2012 06:39:29 +0000 (01:39 -0500)]
cmd/dist: add BSD gohostos cases

Should fix FreeBSD build.

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

13 years agopath/filepath: disable broken tests
Russ Cox [Sat, 4 Feb 2012 06:37:30 +0000 (01:37 -0500)]
path/filepath: disable broken tests

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

13 years agocmd/dist: fix build
Russ Cox [Sat, 4 Feb 2012 06:23:54 +0000 (01:23 -0500)]
cmd/dist: fix build

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

13 years agobuild: delete buildscripts, runtime scripts
Russ Cox [Sat, 4 Feb 2012 05:54:26 +0000 (00:54 -0500)]
build: delete buildscripts, runtime scripts

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

13 years agobuild: use cmd/dist
Russ Cox [Sat, 4 Feb 2012 05:54:08 +0000 (00:54 -0500)]
build: use cmd/dist

R=bradfitz, ality, r, r, iant, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5615058

13 years agobuild: dist-based build for windows
Russ Cox [Sat, 4 Feb 2012 05:48:31 +0000 (00:48 -0500)]
build: dist-based build for windows

R=golang-dev, bradfitz, iant, alex.brainman, go.peter.90
CC=golang-dev
https://golang.org/cl/5630047

13 years agocmd/dist: fix build on openbsd
Mikio Hara [Sat, 4 Feb 2012 04:27:12 +0000 (13:27 +0900)]
cmd/dist: fix build on openbsd

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

13 years agoexpvar: revise API.
David Symonds [Sat, 4 Feb 2012 03:32:05 +0000 (14:32 +1100)]
expvar: revise API.

Nuke RemoveAll from the public API.
Replace Iter functions with Do functions.

Fixes #2852.

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

13 years agotest: fix copyright year in new test case
Ian Lance Taylor [Sat, 4 Feb 2012 01:36:48 +0000 (17:36 -0800)]
test: fix copyright year in new test case

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

13 years agoreflect: test that PtrTo returns types that match program types
Ian Lance Taylor [Sat, 4 Feb 2012 01:36:25 +0000 (17:36 -0800)]
reflect: test that PtrTo returns types that match program types

The gccgo compiler was failing this test.

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

13 years agogo/printer: update documentation
Robert Griesemer [Sat, 4 Feb 2012 00:57:59 +0000 (16:57 -0800)]
go/printer: update documentation

Fixes #2855.

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

13 years agotest: test method expressions with parameters, and with import
Ian Lance Taylor [Sat, 4 Feb 2012 00:38:59 +0000 (16:38 -0800)]
test: test method expressions with parameters, and with import

The gccgo compiler had two different bugs triggered by this
test case.

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

13 years agospec: correct primes
Christopher Wedgwood [Fri, 3 Feb 2012 23:34:31 +0000 (10:34 +1100)]
spec: correct primes

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

13 years agocmd/dist: generate files for package runtime
Russ Cox [Fri, 3 Feb 2012 23:16:42 +0000 (18:16 -0500)]
cmd/dist: generate files for package runtime
goc2c moves here.
parallel builds like old makefiles (-j4).
add clean command.
add banner command.
implement Go version check.
real argument parsing (same as 6g etc)

Windows changes will be a separate CL.

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

13 years agodocs: replace references to gofix etc. with tool invocations
Rob Pike [Fri, 3 Feb 2012 20:49:51 +0000 (07:49 +1100)]
docs: replace references to gofix etc. with tool invocations

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

13 years agotest: fix bug headers
Russ Cox [Fri, 3 Feb 2012 20:22:19 +0000 (15:22 -0500)]
test: fix bug headers

The letter is $A, not $O.
($O is set accidentally, but not for long.)

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

13 years agolib9/utf: make safe for automatic build
Russ Cox [Fri, 3 Feb 2012 20:19:00 +0000 (15:19 -0500)]
lib9/utf: make safe for automatic build

Add // +build ignore to mkrunetype.c,
rename runetypebody to be .h since it is #included,
delete old runetypebody tables.

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

13 years agocrypto/...: changes to address some of bug 2841.
Adam Langley [Fri, 3 Feb 2012 20:08:53 +0000 (15:08 -0500)]
crypto/...: changes to address some of bug 2841.

This change addresses a subset of the issues raised in bug 2841.

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

13 years agotools: update references to "x" to be "go tool x"
Rob Pike [Fri, 3 Feb 2012 20:03:20 +0000 (07:03 +1100)]
tools: update references to "x" to be "go tool x"
For instance, don't talk about gofix, talk about the
fix tool or "go tool fix".

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

13 years agotest: don't use package main for files without a main function
Brad Fitzpatrick [Fri, 3 Feb 2012 19:43:24 +0000 (11:43 -0800)]
test: don't use package main for files without a main function

Part of issue 2833, but works fine with current test runner.

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

13 years agostrings: add Fields example
Brad Fitzpatrick [Fri, 3 Feb 2012 19:17:55 +0000 (11:17 -0800)]
strings: add Fields example

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

13 years agospec: restore primality
Rob Pike [Fri, 3 Feb 2012 19:16:02 +0000 (06:16 +1100)]
spec: restore primality
9 is prime if it's a hot day.

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

13 years agogodoc: provide link to subdirectories, if any
Robert Griesemer [Fri, 3 Feb 2012 18:17:37 +0000 (10:17 -0800)]
godoc: provide link to subdirectories, if any

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

13 years agomath/big: more accurate package comment
Robert Griesemer [Fri, 3 Feb 2012 18:17:19 +0000 (10:17 -0800)]
math/big: more accurate package comment

Fix some receiver names for consistency.

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

13 years agogodoc: fix identifier search
Robert Griesemer [Fri, 3 Feb 2012 17:20:53 +0000 (09:20 -0800)]
godoc: fix identifier search

Thanks to Andrey Mirtchovski for tracking this down.

This was broken by CL 5528077 which removed the InsertSemis
flag from go/scanner - as a result, semicolons are now always
inserted and the respective indexer code checked for the
wrong token.

Replaced the code by a direct identifier test.

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

13 years agogodoc: diagnostic for empty FS tree
Robert Griesemer [Fri, 3 Feb 2012 16:33:29 +0000 (08:33 -0800)]
godoc: diagnostic for empty FS tree

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

13 years agocodereview: allow spaces in y.tab.[ch]
Russ Cox [Fri, 3 Feb 2012 15:54:05 +0000 (10:54 -0500)]
codereview: allow spaces in y.tab.[ch]

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

13 years ago5a, 6a, 8a, cc: check in y.tab.[ch]
Russ Cox [Fri, 3 Feb 2012 15:53:51 +0000 (10:53 -0500)]
5a, 6a, 8a, cc: check in y.tab.[ch]

This enables builds on systems without Bison/yacc.

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

13 years agogc: check in y.tab.[ch], yerr.h, builtin.c.
Russ Cox [Fri, 3 Feb 2012 15:53:31 +0000 (10:53 -0500)]
gc: check in y.tab.[ch], yerr.h, builtin.c.

This enables builds on systems without Bison/yacc.

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

13 years agospec: 9 only looks prime
Russ Cox [Fri, 3 Feb 2012 15:30:52 +0000 (10:30 -0500)]
spec: 9 only looks prime

Fixes #2870.

R=golang-dev, agl, lvd
CC=golang-dev
https://golang.org/cl/5618050

13 years agotest: add test for receiver named _
Ian Lance Taylor [Fri, 3 Feb 2012 15:19:25 +0000 (07:19 -0800)]
test: add test for receiver named _

Was miscompiled by gccgo.

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

13 years agotest: test slice beyond len
Ian Lance Taylor [Fri, 3 Feb 2012 14:29:30 +0000 (06:29 -0800)]
test: test slice beyond len

When slicing a slice, the bounds may be > len as long as they
are <= cap.  Interestingly, gccgo got that wrong and still
passed the testsuite and all the library tests.

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

13 years agobuild: crash if test runs forever
Alex Brainman [Fri, 3 Feb 2012 05:45:51 +0000 (16:45 +1100)]
build: crash if test runs forever

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

13 years agocmd/go: add support for release tags via git branches
Gustavo Niemeyer [Fri, 3 Feb 2012 05:03:13 +0000 (03:03 -0200)]
cmd/go: add support for release tags via git branches

R=rsc, remyoudompheng, gustavo, dsymonds
CC=golang-dev
https://golang.org/cl/5617057

13 years agobuild: rename $GOROOT/bin/go-tool to $GOROOT/bin/tool.
Russ Cox [Fri, 3 Feb 2012 04:32:41 +0000 (23:32 -0500)]
build: rename $GOROOT/bin/go-tool to $GOROOT/bin/tool.

The go- is redundant now that the directory is required
to be inside $GOROOT.  Rob LGTMed the idea.

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

13 years agovet: add a check for untagged struct literals.
Nigel Tao [Fri, 3 Feb 2012 03:33:41 +0000 (14:33 +1100)]
vet: add a check for untagged struct literals.

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

13 years agogo/doc: don't lose factory functions of non-exported types
Robert Griesemer [Fri, 3 Feb 2012 03:25:29 +0000 (19:25 -0800)]
go/doc: don't lose factory functions of non-exported types

Fixes #2824.

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

13 years agosyscall: update bootstrap scripts to sync with new go command
Mikio Hara [Fri, 3 Feb 2012 03:22:40 +0000 (12:22 +0900)]
syscall: update bootstrap scripts to sync with new go command

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

13 years agomath/big: API, documentation cleanup
Robert Griesemer [Fri, 3 Feb 2012 03:21:55 +0000 (19:21 -0800)]
math/big: API, documentation cleanup

Fixes #2863.

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

13 years agodashboard: don't send failing Go commits as todos for subrepos
Andrew Gerrand [Fri, 3 Feb 2012 03:03:46 +0000 (14:03 +1100)]
dashboard: don't send failing Go commits as todos for subrepos

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

13 years agoencoding/base32: ignore new line characters during decode.
David Symonds [Fri, 3 Feb 2012 02:36:38 +0000 (13:36 +1100)]
encoding/base32: ignore new line characters during decode.

This is the analogue to the encoding/base64 change,
https://golang.org/cl/5610045.

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

13 years ago.hgignore: update to ignore tmpltohtml.
David Symonds [Fri, 3 Feb 2012 02:25:26 +0000 (13:25 +1100)]
.hgignore: update to ignore tmpltohtml.

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

13 years agoos: turn FileStat.Sys into a method on FileInfo
Gustavo Niemeyer [Fri, 3 Feb 2012 02:16:18 +0000 (00:16 -0200)]
os: turn FileStat.Sys into a method on FileInfo

This reduces the overhead necessary to work with OS-specific
file details, hides the implementation of FileStat, and
preserves the implementation-specific nature of Sys.

Expressions such as:

  stat.(*os.FileInfo).Sys.(*syscall.Stat_t).Uid
  fi1.(*os.FileStat).SameFile(fi2.(*os.FileStat))

Are now spelled as::

  stat.Sys().(*syscall.Stat_t).Uid
  os.SameFile(fi1, fi2)

R=cw, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5448079

13 years agogo/doc: Fix URL linking in ToHTML.
Gary Burd [Fri, 3 Feb 2012 01:02:05 +0000 (17:02 -0800)]
go/doc: Fix URL linking in ToHTML.

Fixes issue: 2832

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

13 years agoencoding/base32: add DecodeString and EncodeToString helper methods.
David Symonds [Fri, 3 Feb 2012 00:52:04 +0000 (11:52 +1100)]
encoding/base32: add DecodeString and EncodeToString helper methods.

This makes encoding/base32 be consistent with encoding/base64.

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

13 years agogo/scanner: idiomatic receiver names
Robert Griesemer [Fri, 3 Feb 2012 00:42:29 +0000 (16:42 -0800)]
go/scanner: idiomatic receiver names

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

13 years agosyscall: fix // +build comments in types_*.go
Russ Cox [Fri, 3 Feb 2012 00:42:02 +0000 (19:42 -0500)]
syscall: fix // +build comments in types_*.go

I fixed types_linux.go yesterday but missed the others.

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

13 years agocmd/dist: new command
Russ Cox [Fri, 3 Feb 2012 00:41:39 +0000 (19:41 -0500)]
cmd/dist: new command

dist is short for distribution.  This is the new Go distribution tool.

The plan is to replace the Makefiles with what amounts to
'go tool dist bootstrap', although it cannot be invoked like
that since it is in charge of getting us to the point where we
can build the go command.

It will also add additional commands to replace bash scripts
like test/run (go tool dist testrun), eventually eliminating our
dependence on not just bash but all the Unix tools and all
of cygwin.

This is strong enough to build (cc *.c) and run (a.out bootstrap)
to build not just the C libraries and tools but also the basic
Go packages up to the bootstrap form of the go command
(go_bootstrap).  I've run it successfully on both Linux and Windows.
This means that once we've switched to this tool in the build,
we can delete the buildscripts.

This tool is not nearly as nice as the go tool.  There are many
special cases that turn into simple if statements or tables in
the code.  Please forgive that.  C does not enjoy the benefits
that we designed into Go.

I was planning to wait to do this until after Go 1, but the
Windows builders are both broken due to a bug in either
make or bash or both involving the parsing of quoted command
arguments.  Make thinks it is invoking

        quietgcc -fno-common -I"c:/go/include" -ggdb -O2 -c foo.c

but bash (quietgcc is a bash script) thinks it is being invoked as

        quietgcc -fno-common '-Ic:/go/include -ggdb' -O2 -c foo.c

which obviously does not have the desired effect.  Rather than fight
these clumsy ports, I accelerated the schedule for the new tool.
We should be completely off cygwin (using just the mingw gcc port,
which is much more standalone) before Go 1.

It is big for a single CL, and for that I apologize.  I can cut it into
separate CLs along file boundaries if people would prefer that.

R=golang-dev, adg, gri, bradfitz, alex.brainman, dsymonds, iant, ality, hcwfrichter
CC=golang-dev
https://golang.org/cl/5620045

13 years agoencoding/json: call (*T).MarshalJSON for addressable T values.
David Symonds [Fri, 3 Feb 2012 00:15:06 +0000 (11:15 +1100)]
encoding/json: call (*T).MarshalJSON for addressable T values.

Fixes #2170.

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

13 years agostd: add struct field tags to untagged literals.
Nigel Tao [Thu, 2 Feb 2012 23:12:25 +0000 (10:12 +1100)]
std: add struct field tags to untagged literals.

R=rsc, dsymonds, bsiegert, rogpeppe
CC=golang-dev
https://golang.org/cl/5619052

13 years agocmd/go: fix error message on non-existing tools.
Rémy Oudompheng [Thu, 2 Feb 2012 22:52:30 +0000 (23:52 +0100)]
cmd/go: fix error message on non-existing tools.

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

13 years agomath/big: document Word type
Robert Griesemer [Thu, 2 Feb 2012 22:43:55 +0000 (14:43 -0800)]
math/big: document Word type

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

13 years agonet: tweak variable declarations
Mikio Hara [Thu, 2 Feb 2012 22:40:03 +0000 (07:40 +0900)]
net: tweak variable declarations

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