]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agoruntime: use kernel-supplied cas on linux/arm
Russ Cox [Fri, 25 Feb 2011 19:29:55 +0000 (14:29 -0500)]
runtime: use kernel-supplied cas on linux/arm

Using the kernel-supplied compare-and-swap code
on linux/arm means that runtime doesn't have to care
whether this is GOARM=5 or GOARM=6 anymore.

Fixes #1494.

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

14 years agosync: use sync/atomic
Russ Cox [Fri, 25 Feb 2011 19:29:47 +0000 (14:29 -0500)]
sync: use sync/atomic

Remove references to custom assembly routines.

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

14 years agosync/atomic: new package
Russ Cox [Fri, 25 Feb 2011 19:29:36 +0000 (14:29 -0500)]
sync/atomic: new package

Fixes #170.

R=gri, iant, r, r2
CC=golang-dev
https://golang.org/cl/4241041

14 years agoA+C: Chris Dollin (individual CLA)
Russ Cox [Fri, 25 Feb 2011 19:05:44 +0000 (14:05 -0500)]
A+C: Chris Dollin (individual CLA)

R=r, r2, gri
CC=ehog.hedge, golang-dev
https://golang.org/cl/4240043

14 years agogob: make recursive map and slice types work.
Rob Pike [Fri, 25 Feb 2011 17:45:06 +0000 (09:45 -0800)]
gob: make recursive map and slice types work.

Before this fix, types such as
        type T map[string]T
caused infinite recursion in the gob implementation.
Now they just work.

Fixes #1518.

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

14 years ago8a, 8l: add CMPXCHG8B, XADDB, XADDL, XADDW
Russ Cox [Fri, 25 Feb 2011 06:04:29 +0000 (01:04 -0500)]
8a, 8l: add CMPXCHG8B, XADDB, XADDL, XADDW

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

14 years ago5a, 5l: add LDREXD, STREXD
Russ Cox [Fri, 25 Feb 2011 06:03:54 +0000 (01:03 -0500)]
5a, 5l: add LDREXD, STREXD

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

14 years agobug324.go: test case for issue 1550
Robert Griesemer [Fri, 25 Feb 2011 03:29:25 +0000 (19:29 -0800)]
bug324.go: test case for issue 1550

Also: renamed fixedbugs/bug322.go to fixedbugs/bug323.go
because we already have a bugs/bug322.go and bug322.dir.

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

14 years agotag release.2011-02-24
Andrew Gerrand [Fri, 25 Feb 2011 03:24:08 +0000 (14:24 +1100)]
tag release.2011-02-24

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

14 years agorelease.2011-02-24 weekly.2011-02-24
Andrew Gerrand [Fri, 25 Feb 2011 03:13:14 +0000 (14:13 +1100)]
release.2011-02-24

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

14 years agocrypto/openpgp: add package
Adam Langley [Fri, 25 Feb 2011 01:19:53 +0000 (20:19 -0500)]
crypto/openpgp: add package

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

14 years agogodoc: accept symbolic links as path names provided to -path
Robert Griesemer [Fri, 25 Feb 2011 00:24:51 +0000 (16:24 -0800)]
godoc: accept symbolic links as path names provided to -path

When providing addition file systems to godoc via -path, the
path names may be symbolic links. Follow them.

Also: better logging of error and special conditions.

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

14 years agoruntime: add empty windows/signals.h file to fix build
Alex Brainman [Fri, 25 Feb 2011 00:16:39 +0000 (11:16 +1100)]
runtime: add empty windows/signals.h file to fix build

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

14 years agocompress/lzw: implement an encoder.
Nigel Tao [Thu, 24 Feb 2011 22:20:04 +0000 (09:20 +1100)]
compress/lzw: implement an encoder.

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

14 years agoreflect: add pointer word to CommonType
Russ Cox [Thu, 24 Feb 2011 22:11:20 +0000 (17:11 -0500)]
reflect: add pointer word to CommonType

The pointer will eventually let us find *T given T.
This CL just makes room for it, always storing a zero.

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

14 years agoruntime: fix signal stack bug
Russ Cox [Thu, 24 Feb 2011 21:46:44 +0000 (13:46 -0800)]
runtime: fix signal stack bug

In CL 4188061 I changed malg to allocate the requested
number of bytes n, not n+StackGuard, so that the
allocations would use rounder numbers.

The allocation of the signal stack asks for 32k and
then used g->stackguard as the base, but g->stackguard
is StackGuard bytes above the base.  Previously, asking
for 32k meant getting 32k+StackGuard bytes, so using
g->stackguard as the base was safe.  Now, the actual base
must be computed, so that the signal handler does not
run StackGuard bytes past the top of the stack.

Was causing flakiness mainly in programs that use the
network, because they sometimes write to closed network
connections, causing SIGPIPEs.  Was also causing problems
in the doc/progs test.

Also fix Makefile so that changes to stack.h trigger rebuild.

R=bradfitzgo, r, r2
CC=golang-dev
https://golang.org/cl/4230044

14 years agold: weak symbols
Russ Cox [Thu, 24 Feb 2011 21:45:45 +0000 (16:45 -0500)]
ld: weak symbols

A reference to the address of weak.foo resolves at link time
to the address of the symbol foo if foo would end up in the
binary anyway, or to zero if foo would not be in the binary.

For example:

        int xxx = 1;
        int yyy = 2;
        int weak·xxx;
        int weak·yyy;

        void main·main(void) {
                runtime·printf("%p %p %p\n", &xxx, &weak·xxx, &weak·yyy);
        }

prints the same non-nil address twice, then 0 (because yyy is not
referenced so it was dropped from the binary).

This will be used by the reflection tables.

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

14 years agohttp: remove debugging log statement
Russ Cox [Thu, 24 Feb 2011 19:36:18 +0000 (14:36 -0500)]
http: remove debugging log statement

Issue 1547 is fixed.

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

14 years agogodoc: fix writeFileAtomically utility function
Robert Griesemer [Thu, 24 Feb 2011 19:13:20 +0000 (11:13 -0800)]
godoc: fix writeFileAtomically utility function

If the filename was absolute, writeFileAtomically
used the wrong filename for ioutil.TempFile leading
to non-existent directories and the TempFile would
fail.

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

14 years agogodoc: log errors when reading filter files
Robert Griesemer [Thu, 24 Feb 2011 18:22:32 +0000 (10:22 -0800)]
godoc: log errors when reading filter files

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

14 years agofmt: stop giving characters to the Scan method of Scanner
Rob Pike [Thu, 24 Feb 2011 18:14:19 +0000 (10:14 -0800)]
fmt: stop giving characters to the Scan method of Scanner
when we hit a newline during *scanln routines.

Fixes #1490.

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

14 years ago8l/6l: new -Hwindowsgui flag allows to build windows gui pe
Alex Brainman [Thu, 24 Feb 2011 05:10:30 +0000 (16:10 +1100)]
8l/6l: new -Hwindowsgui flag allows to build windows gui pe

Fixes #1516.

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

14 years agobuild: remove unused nacl conditional from make.bash
Dave Cheney [Thu, 24 Feb 2011 04:56:53 +0000 (15:56 +1100)]
build: remove unused nacl conditional from make.bash

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

14 years agonet: *netFD.Read to return os.EOF on eof (fixes windows build)
Alex Brainman [Wed, 23 Feb 2011 23:17:45 +0000 (10:17 +1100)]
net: *netFD.Read to return os.EOF on eof (fixes windows build)

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

14 years agohttp: set method GET on Get() requests
Brad Fitzpatrick [Wed, 23 Feb 2011 23:03:30 +0000 (15:03 -0800)]
http: set method GET on Get() requests

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

14 years agobuild: remove _gcc_main.c during make clean
Russ Cox [Wed, 23 Feb 2011 20:51:27 +0000 (15:51 -0500)]
build: remove _gcc_main.c during make clean

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

14 years agoruntime: always run stackalloc on scheduler stack
Russ Cox [Wed, 23 Feb 2011 20:51:20 +0000 (15:51 -0500)]
runtime: always run stackalloc on scheduler stack

Avoids deadlocks like the one below, in which a stack split happened
in order to call lock(&stacks), but then the stack unsplit cannot run
because stacks is now locked.

The only code calling stackalloc that wasn't on a scheduler
stack already was malg, which creates a new goroutine.

runtime.futex+0x23 /home/rsc/g/go/src/pkg/runtime/linux/amd64/sys.s:139
       runtime.futex()
futexsleep+0x50 /home/rsc/g/go/src/pkg/runtime/linux/thread.c:51
       futexsleep(0x5b0188, 0x300000003, 0x100020000, 0x4159e2)
futexlock+0x85 /home/rsc/g/go/src/pkg/runtime/linux/thread.c:119
       futexlock(0x5b0188, 0x5b0188)
runtime.lock+0x56 /home/rsc/g/go/src/pkg/runtime/linux/thread.c:158
       runtime.lock(0x5b0188, 0x7f0d27b4a000)
runtime.stackfree+0x4d /home/rsc/g/go/src/pkg/runtime/malloc.goc:336
       runtime.stackfree(0x7f0d27b4a000, 0x1000, 0x8, 0x7fff37e1e218)
runtime.oldstack+0xa6 /home/rsc/g/go/src/pkg/runtime/proc.c:705
       runtime.oldstack()
runtime.lessstack+0x22 /home/rsc/g/go/src/pkg/runtime/amd64/asm.s:224
       runtime.lessstack()
----- lessstack called from goroutine 2 -----
runtime.lock+0x56 /home/rsc/g/go/src/pkg/runtime/linux/thread.c:158
       runtime.lock(0x5b0188, 0x40a5e2)
runtime.stackalloc+0x55 /home/rsc/g/go/src/pkg/runtime/malloc.c:316
       runtime.stackalloc(0x1000, 0x4055b0)
runtime.malg+0x3d /home/rsc/g/go/src/pkg/runtime/proc.c:803
       runtime.malg(0x1000, 0x40add9)
runtime.newproc1+0x12b /home/rsc/g/go/src/pkg/runtime/proc.c:854
       runtime.newproc1(0xf840027440, 0x7f0d27b49230, 0x0, 0x49f238, 0x40, ...)
runtime.newproc+0x2f /home/rsc/g/go/src/pkg/runtime/proc.c:831
       runtime.newproc(0x0, 0xf840027440, 0xf800000010, 0x44b059)
...

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

14 years agoruntime: omit breakpoint during terminal panic
Russ Cox [Wed, 23 Feb 2011 20:42:13 +0000 (15:42 -0500)]
runtime: omit breakpoint during terminal panic

A terminal panic (one that prints a stack trace and exits)
has been calling runtime.breakpoint before calling exit,
so that if running under a debugger, the debugger can
take control.  When not running under a debugger, though,
this causes an additional SIGTRAP on Unix and pop-up
dialogs on Windows.

Support for debugging Go programs has gotten good
enough that we can rely on the debugger to set its own
breakpoint on runtime.exit if it wants to look around.

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

14 years agohttp: introduce start of Client and ClientTransport
Brad Fitzpatrick [Wed, 23 Feb 2011 20:20:50 +0000 (12:20 -0800)]
http: introduce start of Client and ClientTransport

Much yet to come, but this is a safe first step, introducing
an in-the-future configurable Client object (where policy for
cookies, auth, redirects will live) as well as introducing a
ClientTransport interface for sending requests.

The CL intentionally ignores everything around the creation
and configuration of Clients and merely ports/wraps the old
interfaces to/around Client/ClientTransport.

R=rsc, dsymonds, nigeltao, bradfitzwork
CC=golang-dev
https://golang.org/cl/4182086

14 years agoruntime: pass to signal handler value of g at time of signal
Russ Cox [Wed, 23 Feb 2011 19:47:42 +0000 (14:47 -0500)]
runtime: pass to signal handler value of g at time of signal

The existing code assumed that signals only arrived
while executing on the goroutine stack (g == m->curg),
not while executing on the scheduler stack (g == m->g0).

Most of the signal handling trampolines correctly saved
and restored g already, but the sighandler C code did not
have access to it.

Some rewriting of assembly to make the various
implementations as similar as possible.

Will need to change Windows too but I don't
understand how sigtramp gets called there.

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

14 years agoruntime: traceback through active lessstack
Russ Cox [Wed, 23 Feb 2011 19:47:22 +0000 (14:47 -0500)]
runtime: traceback through active lessstack

With this change, a panic trace due to a signal arriving while
running on the scheduler stack during a lessstack
(a stack unsplit) will trace through the lessstack to show
the state of the goroutine that was unsplitting its stack.

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

14 years ago5g: fix optimizer bug
Russ Cox [Wed, 23 Feb 2011 18:21:39 +0000 (13:21 -0500)]
5g: fix optimizer bug

same as in issue below, never fixed on ARM

changeset:   5498:3fa1372ca694
user:        Ken Thompson <ken@golang.org>
date:        Thu May 20 17:31:28 2010 -0700

description:
fix issue 798
cannot allocate an audomatic temp
while real registers are allocated.
there is a chance that the automatic
will be allocated to one of the
allocated registers. the fix is to
not registerize such variables.

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

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

14 years agosync: make package comment appear
Robert Griesemer [Wed, 23 Feb 2011 18:12:38 +0000 (10:12 -0800)]
sync: make package comment appear

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

14 years agogob: protect against pure recursive types.
Rob Pike [Wed, 23 Feb 2011 17:49:35 +0000 (09:49 -0800)]
gob: protect against pure recursive types.

There are further changes required for things like
recursive map types.  Recursive struct types work
but the mechanism needs generalization.  The
case handled in this CL is pathological since it
cannot be represented at all by gob, so it should
be handled separately. (Prior to this CL, encode
would recur forever.)

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

14 years agocompress/bzip2: fix bugs
Adam Langley [Wed, 23 Feb 2011 17:02:41 +0000 (12:02 -0500)]
compress/bzip2: fix bugs

(Once again, proving that a fuzz tester is the first thing that I
should try.)

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

14 years agocodereview: fix clpatch with empty diffs
Gustavo Niemeyer [Wed, 23 Feb 2011 16:48:40 +0000 (11:48 -0500)]
codereview: fix clpatch with empty diffs

Avoid passing the placeholder diff to hgpatch, so that
clpatch-ing an empty diff grabs the metadata and warns
about it being empty, rather than failing with a
hard-to-debug problem ("mkdir: no such file or dir",
no metadata, etc).

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

14 years agojson: use base64 to encode []byte
Roger Peppe [Wed, 23 Feb 2011 16:32:29 +0000 (11:32 -0500)]
json: use base64 to encode []byte

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

14 years agocompress/bzip2: add package.
Adam Langley [Wed, 23 Feb 2011 15:23:28 +0000 (10:23 -0500)]
compress/bzip2: add package.

This code implements bzip2 decompression only.

R=bradfitzgo, r2, nigeltao, rsc
CC=golang-dev
https://golang.org/cl/4176051

14 years agocompress/lzw: implement a decoder.
Nigel Tao [Wed, 23 Feb 2011 09:52:43 +0000 (20:52 +1100)]
compress/lzw: implement a decoder.

R=rsc
CC=bsiegert, golang-dev, mpl
https://golang.org/cl/4182081

14 years agohttp: introduce Header type, implement with net/textproto
Petar Maymounkov [Wed, 23 Feb 2011 05:39:25 +0000 (00:39 -0500)]
http: introduce Header type, implement with net/textproto
textproto: introduce Header type
websocket: use new interface to access Header

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

14 years agoMake.pkg, doc: Replace references to "-benchmarks" and "-match" with "-test.bench...
Kyle Consalus [Wed, 23 Feb 2011 04:23:21 +0000 (20:23 -0800)]
Make.pkg, doc: Replace references to "-benchmarks" and "-match" with "-test.bench" and "-test.run".

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

14 years agogo/parser: if and switch statements still can have empty init statements
Robert Griesemer [Wed, 23 Feb 2011 04:10:09 +0000 (20:10 -0800)]
go/parser: if and switch statements still can have empty init statements

This is a fix for the overly aggressive CL 4173075.
Ran all tests.

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

14 years agonet: refactor windows code
Alex Brainman [Wed, 23 Feb 2011 03:40:24 +0000 (14:40 +1100)]
net: refactor windows code

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

14 years ago5l/6l/8l: use enums for header type and symbolic strings for -H option values
Alex Brainman [Wed, 23 Feb 2011 03:30:40 +0000 (14:30 +1100)]
5l/6l/8l: use enums for header type and symbolic strings for -H option values

Thanks to rsc for the suggestion.

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

14 years agoexp/eval, go/printer: fix build
Robert Griesemer [Wed, 23 Feb 2011 02:17:03 +0000 (18:17 -0800)]
exp/eval, go/printer: fix build

There are some minor irregularities in the printer
output (some paren's are present that should be
removed), but these are unrelated issues.
Will review in a 2nd step.

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

14 years agoarm: fix build
Russ Cox [Wed, 23 Feb 2011 02:10:02 +0000 (21:10 -0500)]
arm: fix build

Changes on laptop were not sync'ed to machine
where I ran hg submit.

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

14 years agogo/ast, parser: condition in if statement is mandatory
Robert Griesemer [Wed, 23 Feb 2011 01:25:10 +0000 (17:25 -0800)]
go/ast, parser: condition in if statement is mandatory

As a result, parsing a "control clause" is now sufficiently
different for if, switch, and for statements that the code
is not factored out anymore. The code is a bit longer but
clearer in each individual case.

Reflect the changes in AST.

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

14 years agogo spec: make condition mandatory in if statements
Robert Griesemer [Tue, 22 Feb 2011 23:31:57 +0000 (15:31 -0800)]
go spec: make condition mandatory in if statements

Plus a few minor HTML fixes.

Fixes #1535.

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

14 years agogc: require if condition
Russ Cox [Tue, 22 Feb 2011 23:23:29 +0000 (18:23 -0500)]
gc: require if condition

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

14 years agotest: do not depend on implicit if condition
Russ Cox [Tue, 22 Feb 2011 23:23:14 +0000 (18:23 -0500)]
test: do not depend on implicit if condition

Deleted test/ken/robif.go because test/if.go is
the same program modulo formatting.

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

14 years agold: detect stack overflow due to NOSPLIT
Russ Cox [Tue, 22 Feb 2011 22:40:40 +0000 (17:40 -0500)]
ld: detect stack overflow due to NOSPLIT

Fix problems found.

On amd64, various library routines had bigger
stack frames than expected, because large function
calls had been added.

runtime.assertI2T: nosplit stack overflow
        120 assumed on entry to runtime.assertI2T
        8 after runtime.assertI2T uses 112
        0 on entry to runtime.newTypeAssertionError
        -8 on entry to runtime.morestack01

runtime.assertE2E: nosplit stack overflow
        120 assumed on entry to runtime.assertE2E
        16 after runtime.assertE2E uses 104
        8 on entry to runtime.panic
        0 on entry to runtime.morestack16
        -8 after runtime.morestack16 uses 8

runtime.assertE2T: nosplit stack overflow
        120 assumed on entry to runtime.assertE2T
        16 after runtime.assertE2T uses 104
        8 on entry to runtime.panic
        0 on entry to runtime.morestack16
        -8 after runtime.morestack16 uses 8

runtime.newselect: nosplit stack overflow
        120 assumed on entry to runtime.newselect
        56 after runtime.newselect uses 64
        48 on entry to runtime.printf
        8 after runtime.printf uses 40
        0 on entry to vprintf
        -8 on entry to runtime.morestack16

runtime.selectdefault: nosplit stack overflow
        120 assumed on entry to runtime.selectdefault
        56 after runtime.selectdefault uses 64
        48 on entry to runtime.printf
        8 after runtime.printf uses 40
        0 on entry to vprintf
        -8 on entry to runtime.morestack16

runtime.selectgo: nosplit stack overflow
        120 assumed on entry to runtime.selectgo
        0 after runtime.selectgo uses 120
        -8 on entry to runtime.gosched

On arm, 5c was tagging functions NOSPLIT that should
not have been, like the recursive function printpanics:

printpanics: nosplit stack overflow
        124 assumed on entry to printpanics
        112 after printpanics uses 12
        108 on entry to printpanics
        96 after printpanics uses 12
        92 on entry to printpanics
        80 after printpanics uses 12
        76 on entry to printpanics
        64 after printpanics uses 12
        60 on entry to printpanics
        48 after printpanics uses 12
        44 on entry to printpanics
        32 after printpanics uses 12
        28 on entry to printpanics
        16 after printpanics uses 12
        12 on entry to printpanics
        0 after printpanics uses 12
        -4 on entry to printpanics

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

14 years agomisc/dashboard/builder: talk to hg with utf-8 encoding always.
Andrew Gerrand [Tue, 22 Feb 2011 20:47:53 +0000 (07:47 +1100)]
misc/dashboard/builder: talk to hg with utf-8 encoding always.

Fixes #1465.

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

14 years ago.hgignore: add *.cgo*.{c,go}
Gustavo Niemeyer [Tue, 22 Feb 2011 20:42:10 +0000 (15:42 -0500)]
.hgignore: add *.cgo*.{c,go}

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

14 years agogob: compute information about a user's type once.
Rob Pike [Tue, 22 Feb 2011 20:31:57 +0000 (12:31 -0800)]
gob: compute information about a user's type once.
Other than maybe cleaning the code up a bit, this has
little practical effect for now, but lays the foundation
for remembering the method set of a type, which can
be expensive.

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

14 years agogo spec: fix local link
Robert Griesemer [Tue, 22 Feb 2011 17:34:13 +0000 (09:34 -0800)]
go spec: fix local link

Fixes #1543.

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

14 years agoreflect: add a secret method to ArrayOrSliceType.
Rob Pike [Tue, 22 Feb 2011 17:21:50 +0000 (09:21 -0800)]
reflect: add a secret method to ArrayOrSliceType.
It was observed that the interface was generic enough
that several other types implemented it too.

Fixes #1530.

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

14 years agohttp: add pointer from Handle[Func] to ServeMux docs
Andrew Gerrand [Tue, 22 Feb 2011 00:16:25 +0000 (11:16 +1100)]
http: add pointer from Handle[Func] to ServeMux docs

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

14 years agohttp: cleaned up HEAD request method.
Padraig Kitterick [Mon, 21 Feb 2011 23:40:37 +0000 (10:40 +1100)]
http: cleaned up HEAD request method.

Removed a redefinition of the request URL which is never used and
redundant checking of the return value from send().

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

14 years agoA+C: Padraig Kitterick
Andrew Gerrand [Mon, 21 Feb 2011 23:40:22 +0000 (10:40 +1100)]
A+C: Padraig Kitterick

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

14 years agotesting: Fix typo on Logf doc comment.
David Symonds [Mon, 21 Feb 2011 23:12:18 +0000 (10:12 +1100)]
testing: Fix typo on Logf doc comment.

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

14 years agoimage/png: support for more formats
Mikael Tillenius [Mon, 21 Feb 2011 23:04:32 +0000 (10:04 +1100)]
image/png: support for more formats

Added support for reading images with grayscale + alpha and
for images with depth 1, 2 or 4.

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

14 years agoA+C: Mikael Tillenius (individual CLA)
Nigel Tao [Mon, 21 Feb 2011 04:04:13 +0000 (15:04 +1100)]
A+C: Mikael Tillenius (individual CLA)

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

14 years agoruntime-gdb.py: gdb pretty printer for go strings properly handles length.
Luuk van Dijk [Sun, 20 Feb 2011 17:53:23 +0000 (18:53 +0100)]
runtime-gdb.py: gdb pretty printer for go strings properly handles length.

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

14 years agospec: delete incorrect obsolete mention of selector working on
Rob Pike [Sat, 19 Feb 2011 23:04:56 +0000 (15:04 -0800)]
spec: delete incorrect obsolete mention of selector working on
pointer to interface type.

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

14 years agocrypto/openpgp/packet: comment typo fix.
Adam Langley [Sat, 19 Feb 2011 15:41:57 +0000 (10:41 -0500)]
crypto/openpgp/packet: comment typo fix.

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

14 years agobuild: reduce the use of subshells in recursive make
Dave Cheney [Fri, 18 Feb 2011 23:49:46 +0000 (10:49 +1100)]
build: reduce the use of subshells in recursive make

Using make -C $* rather than (cd $* ; make) results in a small,
but measurable improvement in build times where compilation is
not the major component. eg.

before - ~/go/src/pkg$ time make
        real 0m1.176s
        user 0m0.639s
        sys 0m0.399s
after - ~/go/src/pkg$ time make
        real 0m0.916s
        user 0m0.571s
        sys 0m0.243s

There are other places in the distribution src/make.common for example
that could also benefit from this change.

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

14 years agomisc/dashboard: tweak build fail notification email
Andrew Gerrand [Fri, 18 Feb 2011 20:37:24 +0000 (07:37 +1100)]
misc/dashboard: tweak build fail notification email

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

14 years agonet: fix multicast tests
Dave Cheney [Fri, 18 Feb 2011 18:48:13 +0000 (13:48 -0500)]
net: fix multicast tests

R=rsc, mikioh, rsc1, dho
CC=golang-dev
https://golang.org/cl/4174056

14 years agocrypto/openpgp/packet: fix testing print (missing arg)
Rob Pike [Fri, 18 Feb 2011 18:47:38 +0000 (10:47 -0800)]
crypto/openpgp/packet: fix testing print (missing arg)

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

14 years agogodoc: serve robots.txt raw
Andrew Gerrand [Fri, 18 Feb 2011 18:46:20 +0000 (05:46 +1100)]
godoc: serve robots.txt raw

R=gri, niemeyer, rsc, r2, r
CC=golang-dev
https://golang.org/cl/4188063

14 years ago.hgignore: add doc/codelab/wiki/*.bin
Gustavo Niemeyer [Fri, 18 Feb 2011 18:44:53 +0000 (05:44 +1100)]
.hgignore: add doc/codelab/wiki/*.bin

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

14 years agoruntime: handle non-standard call sequences in arm traceback
Russ Cox [Fri, 18 Feb 2011 18:30:29 +0000 (13:30 -0500)]
runtime: handle non-standard call sequences in arm traceback

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

14 years agofix build
Russ Cox [Fri, 18 Feb 2011 17:37:16 +0000 (12:37 -0500)]
fix build

pieces of an upcoming CL leaked into CL 4168056

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

14 years agoruntime: record $GOROOT_FINAL for runtime.GOROOT
Russ Cox [Fri, 18 Feb 2011 16:35:43 +0000 (11:35 -0500)]
runtime: record $GOROOT_FINAL for runtime.GOROOT

Update #1527.

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

14 years agold: drop rpath
Russ Cox [Fri, 18 Feb 2011 16:35:36 +0000 (11:35 -0500)]
ld: drop rpath

Was required by old cgo but we don't
generate stub .so files anymore.

Update #1527.

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

14 years agocrypto/rsa: left-pad OAEP results when needed.
Adam Langley [Fri, 18 Feb 2011 16:31:10 +0000 (11:31 -0500)]
crypto/rsa: left-pad OAEP results when needed.

PKCS#1 v2.1 section 7.1.1 says that the result of an OAEP encryption
is "an octet string of length $k$". Since we didn't left-pad the
result it was previously possible for the result to be smaller when
the most-significant byte was zero.

Fixes #1519.

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

14 years agogo/scanner: update comment
Robert Griesemer [Fri, 18 Feb 2011 01:22:16 +0000 (17:22 -0800)]
go/scanner: update comment

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

14 years agotesting: rename cmdline flags to avoid conflicts
Gustavo Niemeyer [Fri, 18 Feb 2011 00:17:33 +0000 (16:17 -0800)]
testing: rename cmdline flags to avoid conflicts

Flags defined in the testing package may conflict
with real flags defined in the main package, or in
any other imported package.

This change makes them less likely to be used for
other purposes.

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

14 years ago6l: pe fixes
Wei Guangjing [Thu, 17 Feb 2011 23:58:47 +0000 (10:58 +1100)]
6l: pe fixes

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

14 years agohtml: small documentation fix.
Nigel Tao [Thu, 17 Feb 2011 23:35:49 +0000 (10:35 +1100)]
html: small documentation fix.

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

14 years agohttp: send full URL in proxy requests
Russ Cox [Thu, 17 Feb 2011 22:14:50 +0000 (17:14 -0500)]
http: send full URL in proxy requests

Fixes #53.  (again)

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

14 years agojson: only use alphanumeric tags
Russ Cox [Thu, 17 Feb 2011 22:14:19 +0000 (17:14 -0500)]
json: only use alphanumeric tags

Almost the same definition as Go identifier names.
(Leading digits are allowed.)

Fixes #1520.

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

14 years agogc: interface error message fixes
Russ Cox [Thu, 17 Feb 2011 21:33:26 +0000 (16:33 -0500)]
gc: interface error message fixes

Fixes #1526.

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

14 years agonet: remove comment fragments
Russ Cox [Thu, 17 Feb 2011 21:32:50 +0000 (16:32 -0500)]
net: remove comment fragments

I have no idea how I meant to complete that sentence.

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

14 years agoruntime: descriptive panics for use of nil map
Russ Cox [Thu, 17 Feb 2011 21:08:52 +0000 (16:08 -0500)]
runtime: descriptive panics for use of nil map

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

14 years agocrypto/rand: Added read buffer to speed up requests for small amounts of bytes.
Albert Strasheim [Thu, 17 Feb 2011 20:14:41 +0000 (15:14 -0500)]
crypto/rand: Added read buffer to speed up requests for small amounts of bytes.

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

14 years agomisc/dashboard: notify golang-dev on build failure
Andrew Gerrand [Thu, 17 Feb 2011 16:34:22 +0000 (03:34 +1100)]
misc/dashboard: notify golang-dev on build failure

Fixes #1229.

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

14 years agoEffective Go: stress that comments are uninterpreted text
Rob Pike [Thu, 17 Feb 2011 06:35:31 +0000 (22:35 -0800)]
Effective Go: stress that comments are uninterpreted text
that should look in godoc.

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

14 years agoarm runtime: attempt to fix build by adding casp (same as cas)
Rob Pike [Thu, 17 Feb 2011 06:01:57 +0000 (22:01 -0800)]
arm runtime: attempt to fix build by adding casp (same as cas)
untested.

Fixes #1523.

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

14 years agodoc/devel/release: discuss StartProcess in release notes
Andrew Gerrand [Thu, 17 Feb 2011 02:20:50 +0000 (21:20 -0500)]
doc/devel/release: discuss StartProcess in release notes

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

14 years agosyscall: fix windows SetFileAttributes
Alex Brainman [Thu, 17 Feb 2011 01:09:12 +0000 (12:09 +1100)]
syscall: fix windows SetFileAttributes

R=golang-dev, rsc, hector
CC=golang-dev, mattn
https://golang.org/cl/4180052

14 years agonet: fix windows build
Alex Brainman [Thu, 17 Feb 2011 01:00:02 +0000 (12:00 +1100)]
net: fix windows build

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4184051

14 years agohtml: tokenize HTML comments.
Nigel Tao [Wed, 16 Feb 2011 23:45:30 +0000 (10:45 +1100)]
html: tokenize HTML comments.

I'm not sure if it's 100% correct wrt the HTML5 specification,
but the test suite has plenty of HTML comment test cases, and
we'll shake out any tokenization bugs as the parser improves its
coverage.

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

14 years agogc: make string const comparison unsigned
Jeff R. Allen [Wed, 16 Feb 2011 22:57:15 +0000 (17:57 -0500)]
gc: make string const comparison unsigned

Make compile-time string const comparison match semantics
of runtime.cmpstring.

Fixes #1515.

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

14 years agonet: add IPv4 multicast to UDPConn
Dave Cheney [Wed, 16 Feb 2011 20:07:13 +0000 (15:07 -0500)]
net: add IPv4 multicast to UDPConn

notes:
Darwin is very particular about joining a multicast group if the
listneing socket is not created in "udp4" mode, the other supported
OS's are more flexible.

A simple example sets up a socket to listen on the mdns/bonjour
group 224.0.0.251:5353

// ensure the sock is udp4, and the IP is a 4 byte IPv4
socket, err := net.ListenUDP("udp4", &net.UDPAddr {
        IP: net.IPv4zero,
        // currently darwin will not allow you to bind to
        // a port if it is already bound to another process
        Port: 5353,
})
if err != nil {
        log.Exitf("listen %s", err)
}
defer socket.Close()
err = socket.JoinGroup(net.IPv4(224, 0, 0, 251))
if err != nil {
        log.Exitf("join group %s", err)
}

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

14 years agonet: more accurate IPv4-in-IPv6 API test
Mikio Hara [Wed, 16 Feb 2011 20:05:48 +0000 (15:05 -0500)]
net: more accurate IPv4-in-IPv6 API test

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

14 years agonet: reject invalid net:proto network names
Olivier Antoine [Wed, 16 Feb 2011 20:03:47 +0000 (15:03 -0500)]
net: reject invalid net:proto network names

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

14 years agoA+C: Olivier Antoine (individual CLA)
Russ Cox [Wed, 16 Feb 2011 20:02:08 +0000 (15:02 -0500)]
A+C: Olivier Antoine (individual CLA)

Also sort name lists.

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

14 years agosync: add Cond
Gustavo Niemeyer [Wed, 16 Feb 2011 19:11:07 +0000 (14:11 -0500)]
sync: add Cond

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

14 years agoos: remove ENODATA (fixes freebsd build)
Russ Cox [Wed, 16 Feb 2011 19:10:52 +0000 (14:10 -0500)]
os: remove ENODATA (fixes freebsd build)

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