]> Cypherpunks repositories - gostls13.git/log
gostls13.git
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

13 years agogc: describe debugging flags
Anthony Martin [Thu, 2 Feb 2012 22:02:54 +0000 (14:02 -0800)]
gc: describe debugging flags

The change to -m is the only one necessary
to close the issue.  The others are useful
to know about when debugging but shouldn't
be in the usage message since they may go
away or change at any time.

Fixes #2802.

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

13 years agocodereview: explain how to get hgpatch in error message
Brad Fitzpatrick [Thu, 2 Feb 2012 19:53:28 +0000 (11:53 -0800)]
codereview: explain how to get hgpatch in error message

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

13 years agotest: make map nan timing test more robust
Brad Fitzpatrick [Thu, 2 Feb 2012 19:49:28 +0000 (11:49 -0800)]
test: make map nan timing test more robust

take 2

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

13 years agocodereview: don't check default paths when codereview disabled
Andrew Gerrand [Thu, 2 Feb 2012 19:25:13 +0000 (14:25 -0500)]
codereview: don't check default paths when codereview disabled

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

13 years agoruntime: add runtime.cputicks() and seed fastrand with it
Damian Gryski [Thu, 2 Feb 2012 19:09:27 +0000 (14:09 -0500)]
runtime: add runtime.cputicks() and seed fastrand with it

This patch adds a function to get the current cpu ticks.  This is
deemed to be 'sufficiently random' to use to seed fastrand to mitigate
the algorithmic complexity attacks on the hash table implementation.

On AMD64 we use the RDTSC instruction.  For 386, this instruction,
while valid, is not recognized by 8a so I've inserted the opcode by
hand.  For ARM, this routine is currently stubbed to return a constant
0 value.

Future work: update 8a to recognize RDTSC.

Fixes #2630.

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

13 years agoos: Process.handle use syscall.Handle
Wei Guangjing [Thu, 2 Feb 2012 19:08:48 +0000 (14:08 -0500)]
os: Process.handle use syscall.Handle

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

13 years agotest: add import test that caused an incorrect gccgo error
Ian Lance Taylor [Thu, 2 Feb 2012 19:04:09 +0000 (11:04 -0800)]
test: add import test that caused an incorrect gccgo error

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

13 years agoexp/norm: a few minor changes in prepration for a table format change:
Marcel van Lohuizen [Thu, 2 Feb 2012 12:55:53 +0000 (13:55 +0100)]
exp/norm: a few minor changes in prepration for a table format change:
 - Unified bounary conditions for NFC and NFD and removed some indirections.
   This enforces boundaries at the character level, which is typically what
   the user expects. (NFD allows a boundary between 'a' and '`', for example,
   which may give unexpected results for collation.  The current implementation
   is already stricter than the standard, so nothing much changes.  This change
   just formalizes it.
 - Moved methods of qcflags to runeInfo.
 - Swapped YesC and YesMaybe bits in qcFlags. This is to aid future changes.
 - runeInfo return values use named fields in preperation for struct change.
 - Replaced some left-over uint32s with rune.

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

13 years agoexp/norm: Added some benchmarks for form-specific performance measurements.
Marcel van Lohuizen [Thu, 2 Feb 2012 12:19:12 +0000 (13:19 +0100)]
exp/norm: Added some benchmarks for form-specific performance measurements.

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

13 years agovet: fix comment typo.
Nigel Tao [Thu, 2 Feb 2012 06:53:28 +0000 (17:53 +1100)]
vet: fix comment typo.

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

13 years agogophertool: fix link to the build status dashboard
Jongmin Kim [Thu, 2 Feb 2012 04:53:31 +0000 (20:53 -0800)]
gophertool: fix link to the build status dashboard

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

13 years agogodoc: update metadata in appinit.go
Andrew Gerrand [Thu, 2 Feb 2012 04:18:33 +0000 (15:18 +1100)]
godoc: update metadata in appinit.go

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

13 years agoos/exec: make sure file is not closed early in leaked fd test
Ian Lance Taylor [Thu, 2 Feb 2012 00:37:02 +0000 (16:37 -0800)]
os/exec: make sure file is not closed early in leaked fd test

Without this change, fd3 can be collected by the garbage
collector and finalized, which causes the file descriptor to
be closed, which causes the call to os.Open to return 3 rather
than the expected descriptor number.

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

13 years agoall packages: fix various typos
Robert Griesemer [Thu, 2 Feb 2012 00:19:36 +0000 (16:19 -0800)]
all packages: fix various typos

Detected semi-automatically. There are probably more.

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

13 years agosyscall: fix build directive in types_linux.go
Russ Cox [Wed, 1 Feb 2012 23:25:51 +0000 (18:25 -0500)]
syscall: fix build directive in types_linux.go

The rule is that build directives can be preceded only
by blank lines and other line comments, not /* */ comments.

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

13 years agolib9: make safe for automatic builds
Russ Cox [Wed, 1 Feb 2012 23:25:40 +0000 (18:25 -0500)]
lib9: make safe for automatic builds

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

13 years agotest: test append with two different named types with same element type
Ian Lance Taylor [Wed, 1 Feb 2012 23:24:15 +0000 (15:24 -0800)]
test: test append with two different named types with same element type

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

13 years agoos: file windows use syscall.InvalidHandle instead of -1.
Wei Guangjing [Wed, 1 Feb 2012 23:17:52 +0000 (10:17 +1100)]
os: file windows use syscall.InvalidHandle instead of -1.

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

13 years agonet/http/httputil: fix race in DumpRequestOut
Brad Fitzpatrick [Wed, 1 Feb 2012 23:10:14 +0000 (15:10 -0800)]
net/http/httputil: fix race in DumpRequestOut

Fixes #2715

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

13 years agogo/printer: remove package comment from testdata/parser.go
Andrew Gerrand [Wed, 1 Feb 2012 22:28:11 +0000 (09:28 +1100)]
go/printer: remove package comment from testdata/parser.go

This prevents an incorrect summary line from appearing in the godoc
package list.

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

13 years agoos/signal: move to exp/signal.
David Symonds [Wed, 1 Feb 2012 22:08:50 +0000 (09:08 +1100)]
os/signal: move to exp/signal.

Fixes #2816.

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

13 years agogo/build: put a space between 'generated by make' and package statement
Andrew Gerrand [Wed, 1 Feb 2012 21:52:22 +0000 (08:52 +1100)]
go/build: put a space between 'generated by make' and package statement

This prevents the message from showing up in godoc.

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

13 years agomat/big: add raw access to Int bits
Robert Griesemer [Wed, 1 Feb 2012 19:43:40 +0000 (11:43 -0800)]
mat/big: add raw access to Int bits

This is a minimal API extension, it makes it possible
to implement missing Int functionality externally w/o
compromising efficiency. It is the hope that this will
reduce the number of feature requests going directly
into the big package.

Also: Fixed some naming inconsistencies: The receiver
is only called z when it is also the result.

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

13 years agocmd/go: fix including of _cgo_export.h
Gustavo Niemeyer [Wed, 1 Feb 2012 18:07:32 +0000 (16:07 -0200)]
cmd/go: fix including of _cgo_export.h

This will add the temporary object directory into the lookup
path so that cgo-exported function declarations may be
included from C files.

This was previously applied by CL 5600043, and apparently
removed by mistake on CL 5598045.

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

13 years agotest: test that x := <-c accepts a general expression
Ian Lance Taylor [Wed, 1 Feb 2012 15:31:00 +0000 (07:31 -0800)]
test: test that x := <-c accepts a general expression

The gccgo compiler used to fail to parse this.

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

13 years agopkg/math: undo manual inlining of IsInf and IsNaN
Luuk van Dijk [Wed, 1 Feb 2012 15:08:31 +0000 (16:08 +0100)]
pkg/math: undo manual inlining of IsInf and IsNaN

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

13 years agogodoc: fix redirect loop for URL "/".
Sameer Ajmani [Wed, 1 Feb 2012 14:43:22 +0000 (09:43 -0500)]
godoc: fix redirect loop for URL "/".

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

13 years agogc, cc: avoid using the wrong library when building the compilers
Anthony Martin [Wed, 1 Feb 2012 12:14:37 +0000 (04:14 -0800)]
gc, cc: avoid using the wrong library when building the compilers

This can happen on Plan 9 if we we're building
with the 32-bit and 64-bit host compilers, one
after the other.

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

13 years agoencoding/base64: ignore new line characters during decode.
David Symonds [Wed, 1 Feb 2012 08:13:38 +0000 (19:13 +1100)]
encoding/base64: ignore new line characters during decode.

Fixes #2541.

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

13 years agonet, syscall: add IPv4 multicast helpers for windows
Mikio Hara [Wed, 1 Feb 2012 05:14:04 +0000 (14:14 +0900)]
net, syscall: add IPv4 multicast helpers for windows

Also re-enable simple IPv4 multicast testing on windows.

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

13 years agogo/build: update syslist.go package comment
Andrew Gerrand [Wed, 1 Feb 2012 04:12:24 +0000 (15:12 +1100)]
go/build: update syslist.go package comment

It's no longer generated by make.

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

13 years agobuild: move the "-c" flag into HOST_CFLAGS
Anthony Martin [Wed, 1 Feb 2012 03:31:30 +0000 (19:31 -0800)]
build: move the "-c" flag into HOST_CFLAGS

On Plan 9 this flag is used to discover
constant expressions in "if" statements.

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

13 years agogc: use octal escapes in mkopnames
Anthony Martin [Wed, 1 Feb 2012 02:15:42 +0000 (18:15 -0800)]
gc: use octal escapes in mkopnames

Plan 9's tr(1) doesn't accept the C-style escapes
for tab and newline characters.  I was going to use
the \xFF hexadecimal escapes but GNU tr(1) doesn't
accept those.  It seems octal is the least common
denominator.

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

13 years agobuild: add include files for Plan 9
Anthony Martin [Wed, 1 Feb 2012 02:14:44 +0000 (18:14 -0800)]
build: add include files for Plan 9

Previously, I had made available a tarball of
the modified system headers that were necessary
to build on Plan 9 but that was only a stopgap.
I think this method is much better since no
files outside of $GOROOT will have to be added
or modified during the build process.

Also, this is just the first step. I'll change
the build to reference these files in another CL
(that also contains a few more Makefile changes).

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

13 years agosyscall: cache environment variables on Plan 9.
Anthony Martin [Wed, 1 Feb 2012 02:14:02 +0000 (18:14 -0800)]
syscall: cache environment variables on Plan 9.

This can drastically reduce the number of system
calls made by programs that repeatedly query the
environment.

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

13 years agolibmach: add stubs for Plan 9
Anthony Martin [Wed, 1 Feb 2012 02:13:17 +0000 (18:13 -0800)]
libmach: add stubs for Plan 9

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

13 years agonet: fix windows build
Alex Brainman [Wed, 1 Feb 2012 01:13:46 +0000 (12:13 +1100)]
net: fix windows build

Ignore result of setting SO_BROADCAST.

Disable TestSimpleListenMulticastUDP as
setIPv4MulticastInterface is not implemented.

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

13 years agotest: add test which crashed gccgo compiler
Ian Lance Taylor [Wed, 1 Feb 2012 00:19:25 +0000 (16:19 -0800)]
test: add test which crashed gccgo compiler

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

13 years agocmd/go: improvements
Russ Cox [Tue, 31 Jan 2012 23:44:20 +0000 (18:44 -0500)]
cmd/go: improvements

Print all the syntax errors.  Fixes issue 2811.

Change Windows binary removal strategy.
This should keep the temporary files closer to
the binaries they are for, which will make it
more likely that the rename is not cross-device
and also make it easier to clean them up.
Fixes #2604 (as much as we can).

The standard build does not use the go command
to install the go command anymore, so issue 2604
is less of a concern than it originally was.
(It uses the go_bootstrap command to install
the go command.)

Buffer 'go list' output.

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

13 years agogo/doc: added error, rune to list of predeclared types
Robert Griesemer [Tue, 31 Jan 2012 23:41:25 +0000 (15:41 -0800)]
go/doc: added error, rune to list of predeclared types

Don't throw away factory functions returning error or rune.

Fixes #2820.

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

13 years agofmt: fix caching bug in Scan
Russ Cox [Tue, 31 Jan 2012 23:38:33 +0000 (18:38 -0500)]
fmt: fix caching bug in Scan

Black box test is too time-consuming, as the bug
does not appear until Scan has processed 2 GB of
input in total across multiple calls, so no test.

Thanks to Frederick Mayle for the diagnosis and fix.

Fixes #2809.

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

13 years agonet: remove types InvalidConnError and UnknownSocketError
Brad Fitzpatrick [Tue, 31 Jan 2012 23:04:42 +0000 (15:04 -0800)]
net: remove types InvalidConnError and UnknownSocketError

Both are unused and undocumented.

InvalidConnError is also non-idiomatic: a FooError type can
typically describe something, else it would be an ErrFoo
variable.

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

13 years agocmd/go: improvements
Russ Cox [Tue, 31 Jan 2012 22:40:36 +0000 (17:40 -0500)]
cmd/go: improvements

Do not treat $GOROOT/src/pkg, $GOROOT/src/cmd,
$GOPATH/src as package directories (only subdirectories
of those can be package directories).  Fixes issue 2602.

Accept additional compiler and linker arguments during
cgo from $CGO_CFLAGS and $CGO_LDFLAGS, as the
Makefiles used to do.

Show failed pkg-config output.  Fixes issue 2785.

Use different (perhaps better) git commands.  Fixes issue 2109.

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

13 years agogo: record location of failed imports for error reporting.
Rémy Oudompheng [Tue, 31 Jan 2012 22:37:01 +0000 (23:37 +0100)]
go: record location of failed imports for error reporting.

Fixes #2664.

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

13 years agogc: diagnose \ in import path
Russ Cox [Tue, 31 Jan 2012 22:29:59 +0000 (17:29 -0500)]
gc: diagnose \ in import path

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

13 years agobuild: remove ./ from buildscripts
Russ Cox [Tue, 31 Jan 2012 21:53:43 +0000 (16:53 -0500)]
build: remove ./ from buildscripts

Fixes #2753.

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

13 years agonet: move DNSConfigError to a portable file
Brad Fitzpatrick [Tue, 31 Jan 2012 21:01:34 +0000 (13:01 -0800)]
net: move DNSConfigError to a portable file

The type being unavailable on Windows was the only API
signature difference in the net package.

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

13 years agocmd/go: improvements
Russ Cox [Tue, 31 Jan 2012 20:08:20 +0000 (15:08 -0500)]
cmd/go: improvements

Print build errors to stderr during 'go run'.
Stream test output during 'go test' (no args).  Fixes issue 2731.
Add go test -i to install test dependencies.  Fixes issue 2685.
Fix data race in exitStatus.  Fixes issue 2709.
Fix tool paths.  Fixes issue 2817.

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

13 years agocmd/go: fix handling of gccgo standard library.
Rémy Oudompheng [Tue, 31 Jan 2012 18:41:38 +0000 (19:41 +0100)]
cmd/go: fix handling of gccgo standard library.

The previous logic was mainly non-working. It only needs to
ensure that the go tool doesn't try to build the standard
library with gccgo.

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

13 years agogo/doc: enable AllMethods flag (and fix logic)
Robert Griesemer [Tue, 31 Jan 2012 17:48:10 +0000 (09:48 -0800)]
go/doc: enable AllMethods flag (and fix logic)

- enable AllMethods flag (default: not set)
- fix logic determining which methods to show
- added respective test case in testdata/e.go for AllMethods = false
- added test case set for AllMethods = true

The critical changes/files to look at are:
- testdata/e{0,1,2}.golden: T4.M should only show up as method of T5 in e2.golden
- reader.go: always include top-level methods, and negate former logic for embedded methods
  (rewrote as a switch for better comprehensability)

Fixes #2791.

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

13 years agonet/http: close client fd sooner on response read error
Brad Fitzpatrick [Tue, 31 Jan 2012 17:45:13 +0000 (09:45 -0800)]
net/http: close client fd sooner on response read error

This fixes some test noise in TestStressSurpriseServerCloses when
ulimit -n something low, like 256 on a Mac.

Previously, when the server closed on us and we were expecting more
responses (like we are in that test), we'd read an "Unexpected EOF"
and just forget about the client's net.Conn.  Now it's closed,
rather than waiting on the finalizer to release the fd.

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

13 years agonet: disable normal multicast testing on linux/arm
Mikio Hara [Tue, 31 Jan 2012 17:42:56 +0000 (02:42 +0900)]
net: disable normal multicast testing on linux/arm

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

13 years agocrypto/elliptic: p224Contract could produce a non-minimal representation.
Adam Langley [Tue, 31 Jan 2012 17:27:42 +0000 (12:27 -0500)]
crypto/elliptic: p224Contract could produce a non-minimal representation.

I missed an overflow in contract because I suspected that the prime
elimination would take care of it. It didn't, and I forgot to get back
to the overflow. Because of this, p224Contract may have produced a
non-minimal representation, causing flakey failures ~0.02% of the
time.

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

13 years agonet: ListenMulticastUDP to listen concurrently across multiple listeners
Mikio Hara [Tue, 31 Jan 2012 16:53:26 +0000 (01:53 +0900)]
net: ListenMulticastUDP to listen concurrently across multiple listeners

This CL introduces new function ListenMulticastUDP to fix
multicast UDP listening across multiple listeners issue,
to replace old multicast methods JoinGroup and LeaveGroup
on UDPConn.

This CL also enables multicast testing by default.

Fixes #2730.

R=rsc, paul.a.lalonde, fullung, devon.odell
CC=golang-dev
https://golang.org/cl/5562048

13 years agocrypto/tls: better error message when connecting to SSLv3 servers.
Adam Langley [Tue, 31 Jan 2012 16:22:47 +0000 (11:22 -0500)]
crypto/tls: better error message when connecting to SSLv3 servers.

We support SSLv3 as a server but not as a client (and we don't want to
support it as a client). This change fixes the error message when
connecting to an SSLv3 server since SSLv3 support on the server side
made mutualVersion accept SSLv3.

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

13 years agonet: fix windows build
Russ Cox [Tue, 31 Jan 2012 16:20:34 +0000 (11:20 -0500)]
net: fix windows build

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

13 years agocrypto/x509: use case-insensitive hostname matching.
Adam Langley [Tue, 31 Jan 2012 16:00:16 +0000 (11:00 -0500)]
crypto/x509: use case-insensitive hostname matching.

Fixes #2792.

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

13 years ago5l: optimize the common case in patch()
Shenghou Ma [Tue, 31 Jan 2012 15:59:34 +0000 (10:59 -0500)]
5l: optimize the common case in patch()
    If p->to.sym->text is non-nil, then no need to search for sym->value.

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

13 years ago5l: make -v option output less nonessential clutter
Shenghou Ma [Tue, 31 Jan 2012 15:59:29 +0000 (10:59 -0500)]
5l: make -v option output less nonessential clutter
        5l -v is for benchmarking various parts of the loader, but this code in
        obj.c will clutter the output. I only comment them out, because this is
        on par with 8l/6l.

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

13 years agobuild: move goapi, quietgcc, cgo, gotype, ebnflint into go-tool
Russ Cox [Tue, 31 Jan 2012 15:38:07 +0000 (10:38 -0500)]
build: move goapi, quietgcc, cgo, gotype, ebnflint into go-tool

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

13 years agocmd/go: clean test directories as they complete
Joel Sing [Tue, 31 Jan 2012 15:37:21 +0000 (10:37 -0500)]
cmd/go: clean test directories as they complete

A go build currently generates around 400MB of test output prior to
cleaning up. With this change we use a maximum of ~15MB.

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

13 years agonet: replace error variable name e, errno with err
Mikio Hara [Tue, 31 Jan 2012 15:36:45 +0000 (00:36 +0900)]
net: replace error variable name e, errno with err

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

13 years agocmd/ld: fix gdbscript
Wei Guangjing [Tue, 31 Jan 2012 15:32:24 +0000 (10:32 -0500)]
cmd/ld: fix gdbscript

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

13 years agoos/exec: TestExtraFiles - close any leaked file descriptors
Joel Sing [Tue, 31 Jan 2012 11:09:06 +0000 (22:09 +1100)]
os/exec: TestExtraFiles - close any leaked file descriptors

Ensure that file descriptors have not already been leaked into our
environment - close any that are open at the start of the
TestExtraFiles test.

Also use the appropriate command for listing open files.

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

13 years agotest: float to integer test case
Ian Lance Taylor [Tue, 31 Jan 2012 05:39:38 +0000 (21:39 -0800)]
test: float to integer test case

gccgo currently fails this test:

fixedbugs/bug402.go:12:9: error: floating point constant truncated to integer
fixedbugs/bug402.go:13:8: error: floating point constant truncated to integer

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

13 years agoruntime: use per-map hash seeds
Damian Gryski [Tue, 31 Jan 2012 05:37:03 +0000 (00:37 -0500)]
runtime: use per-map hash seeds

This patch adds a hash seed to the Hmap struct.  Each seed is
initialized by runtime.fastrand1().  This is the first step of a
solution to issue 2630.  Fastrand1 still needs to be updated to provide
us with actually random bits.

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

13 years agoA+C: Damian Gryski (individual CLA)
Russ Cox [Tue, 31 Jan 2012 05:30:44 +0000 (00:30 -0500)]
A+C: Damian Gryski (individual CLA)

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

13 years agobuild: fix again
Russ Cox [Tue, 31 Jan 2012 05:06:33 +0000 (00:06 -0500)]
build: fix again

The new cross-compiling bin target was breaking
everything but the system where buildscript.sh ran.

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

13 years agobuild: fix buildscripts
Russ Cox [Tue, 31 Jan 2012 04:48:57 +0000 (23:48 -0500)]
build: fix buildscripts

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

13 years agobuild: remove Make.pkg, Make.tool
Russ Cox [Tue, 31 Jan 2012 04:43:46 +0000 (23:43 -0500)]
build: remove Make.pkg, Make.tool

Consequently, remove many package Makefiles,
and shorten the few that remain.

gomake becomes 'go tool make'.

Turn off test phases of run.bash that do not work,
flagged with $BROKEN.  Future CLs will restore these,
but this seemed like a big enough CL already.

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

13 years agogo: improvements
Russ Cox [Tue, 31 Jan 2012 04:42:41 +0000 (23:42 -0500)]
go: improvements

Add 'go clean'.
Make 'go build' write to pkgname, not a.out.
Make 'go test -c' write to pkgname.test, not test.out.
Make 'go install' write alternate binaries to .../bin/goos_goarch/.

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

13 years agobuild: force numerical comparison in version.bash
Russ Cox [Tue, 31 Jan 2012 04:33:16 +0000 (23:33 -0500)]
build: force numerical comparison in version.bash

Fixes #2436.

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

13 years agotest: attempt at making a test more robust
Brad Fitzpatrick [Tue, 31 Jan 2012 04:17:34 +0000 (20:17 -0800)]
test: attempt at making a test more robust

A current theory is that this test is too fast for the
time resolution on the VMs where our builders run.

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

13 years agoruntime: fix mkasmh.sh for arm?
Russ Cox [Tue, 31 Jan 2012 04:17:11 +0000 (23:17 -0500)]
runtime: fix mkasmh.sh for arm?

The builder is Debian, so maybe running dash,
the shell that time forgot.

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

13 years agoruntime: fix mkasmh.h
Anthony Martin [Tue, 31 Jan 2012 03:25:40 +0000 (19:25 -0800)]
runtime: fix mkasmh.h

We weren't properly deleting the various header
files (that were temporarily renamed) if a $CC
for the current $GOARCH didn't exist.  And since
the compiler checks the current directory for
headers before any -I arguments, this had the
unfortunate side effect of including the last
generated headers instead of the correct ones.

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

13 years agoimage: remove image/bmp and image/tiff from std.
Nigel Tao [Tue, 31 Jan 2012 03:01:53 +0000 (14:01 +1100)]
image: remove image/bmp and image/tiff from std.

They have moved to the code.google.com/p/go.image subrepo.

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

13 years agodoc: add image/{bmp,tiff} renames to go1.tmpl.
Nigel Tao [Tue, 31 Jan 2012 01:29:00 +0000 (12:29 +1100)]
doc: add image/{bmp,tiff} renames to go1.tmpl.

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

13 years agofix: add image/{bmp,tiff} to go1pkgrename.
Nigel Tao [Tue, 31 Jan 2012 01:27:58 +0000 (12:27 +1100)]
fix: add image/{bmp,tiff} to go1pkgrename.

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

13 years agodoc: update weekly snapshot notes with subrepo changes
Andrew Gerrand [Tue, 31 Jan 2012 01:15:33 +0000 (12:15 +1100)]
doc: update weekly snapshot notes with subrepo changes

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

13 years agodashboard: better ui layout for subrepo status
Andrew Gerrand [Tue, 31 Jan 2012 01:09:56 +0000 (12:09 +1100)]
dashboard: better ui layout for subrepo status

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

13 years agocmd/pack: change gopack to pack in error messages
Rob Pike [Mon, 30 Jan 2012 23:44:27 +0000 (15:44 -0800)]
cmd/pack: change gopack to pack in error messages

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

13 years agorun.bash: s/make/gomake
Rob Pike [Mon, 30 Jan 2012 23:34:34 +0000 (15:34 -0800)]
run.bash: s/make/gomake
attempt to fix freebsd build
TBR=rsc

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

13 years agogo/spec: Update language on map types.
Robert Griesemer [Mon, 30 Jan 2012 23:31:33 +0000 (15:31 -0800)]
go/spec: Update language on map types.

Fixes #2803.

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

13 years agogo: move compilers into the go-tool directory
Rob Pike [Mon, 30 Jan 2012 22:46:31 +0000 (14:46 -0800)]
go: move compilers into the go-tool directory
Also delete gotest, since it's messy to fix and slated for deletion anyway.
A couple of things outside src can't be tested any more. "go test" will be
fixed and these tests will be re-enabled. They're noisy for now.

Fixes #284.

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

13 years agobuildscript.sh: now works correctly on windows
Alex Brainman [Mon, 30 Jan 2012 22:42:33 +0000 (09:42 +1100)]
buildscript.sh: now works correctly on windows

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

13 years agogodoc: sort list of "other packages"
Robert Griesemer [Mon, 30 Jan 2012 22:31:51 +0000 (14:31 -0800)]
godoc: sort list of "other packages"

Fixes #2786.

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

13 years agogodoc: add URL mode m=methods
Robert Griesemer [Mon, 30 Jan 2012 22:07:50 +0000 (14:07 -0800)]
godoc: add URL mode m=methods

If set, all methods are shown, not just those
of non-exported anonynous fields.

This change will only become functional once
CL 5576057 is submitted.

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

13 years agobuild: fix buildscript breakage after all.bash
Brad Fitzpatrick [Mon, 30 Jan 2012 20:08:35 +0000 (12:08 -0800)]
build: fix buildscript breakage after all.bash

Fix from Russ. Tested that multiple builds in a row
work again.

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

13 years agodoc: use consistent receiver names, when it makes sense.
Brad Fitzpatrick [Mon, 30 Jan 2012 19:58:49 +0000 (11:58 -0800)]
doc: use consistent receiver names, when it makes sense.

Makes for prettier docs.

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

13 years agojson: remove old optimization that inlining covers now
Brad Fitzpatrick [Mon, 30 Jan 2012 19:42:09 +0000 (11:42 -0800)]
json: remove old optimization that inlining covers now

Benchmarks look the same.

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

13 years agogo: don't clobber command install paths
Anthony Martin [Mon, 30 Jan 2012 18:54:22 +0000 (13:54 -0500)]
go: don't clobber command install paths

This fixes a regression that was made when adding
support for building with gccgo (in d6a14e6fac0c).

External commands (those not from the Go tree) were
being installed to the package directory instead of
the binary directory.

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

13 years agotest: add test of NaN in map
Russ Cox [Mon, 30 Jan 2012 18:41:38 +0000 (13:41 -0500)]
test: add test of NaN in map

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

13 years agocodereview: ignore test files during 'hg gofmt'
Russ Cox [Mon, 30 Jan 2012 18:41:29 +0000 (13:41 -0500)]
codereview: ignore test files during 'hg gofmt'

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

13 years agoencoding/xml: fix decoding of xml.Name with sub-elements
Gustavo Niemeyer [Mon, 30 Jan 2012 18:32:48 +0000 (16:32 -0200)]
encoding/xml: fix decoding of xml.Name with sub-elements

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

13 years agogopack: rename pack, move to go-tool directory
Rob Pike [Mon, 30 Jan 2012 18:30:46 +0000 (10:30 -0800)]
gopack: rename pack, move to go-tool directory

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