]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agomime/multipart: remove newline at top of the multipart.
Yasuhiro Matsumoto [Thu, 23 Jun 2011 17:11:33 +0000 (10:11 -0700)]
mime/multipart: remove newline at top of the multipart.

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

13 years agolibmach: fix disassembly of FCMOVcc and FCOMI
Anthony Martin [Thu, 23 Jun 2011 13:32:29 +0000 (09:32 -0400)]
libmach: fix disassembly of FCMOVcc and FCOMI

The optable for 0xDB is handled specially.

This was the cause of a really weird bug
when using cov (386!) on the math package.

A real head-scratcher.

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

13 years agolibmach: fix tracing on linux (for cov)
Anthony Martin [Thu, 23 Jun 2011 03:24:14 +0000 (23:24 -0400)]
libmach: fix tracing on linux (for cov)

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

13 years ago5c: do not use R9 and R10
Russ Cox [Thu, 23 Jun 2011 03:22:36 +0000 (23:22 -0400)]
5c: do not use R9 and R10

This program used to use R9 and R10.
Now it fails to compile (out of registers).
I used to know a simpler test but can't remember it.

Learned something new: Rietveld refuses change
list descriptions bigger than 10 kB.

int sum(int x, int y, int z, int w) {
        return
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))*
        (((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))))*
        ((((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))%
        (((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))))/
        ((((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))|
        (((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w))&
        ((x*y+z*w|x*y+z*w)^
        (x*y+z*w|x*y+z*w)))))))
        ;
}

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

13 years agoexec: LookPath should not search %PATH% for files like c:cmd.exe
Alex Brainman [Thu, 23 Jun 2011 00:56:53 +0000 (10:56 +1000)]
exec: LookPath should not search %PATH% for files like c:cmd.exe

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

13 years agoexp/template: make -0 be an unsigned int.
Rob Pike [Thu, 23 Jun 2011 00:19:29 +0000 (10:19 +1000)]
exp/template: make -0 be an unsigned int.
Fix (inconsequential) type error in list initializer.

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

13 years agogo/build: include Import objects in Script Inputs
Andrew Gerrand [Thu, 23 Jun 2011 00:15:46 +0000 (10:15 +1000)]
go/build: include Import objects in Script Inputs

This has the effect of making goinstall rebuild a package's
dependencies when they are newer than the current package object.

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

13 years agonet, syscall: interface for windows
Yasuhiro Matsumoto [Wed, 22 Jun 2011 23:54:57 +0000 (09:54 +1000)]
net, syscall: interface for windows

R=mikioh.mikioh, alex.brainman, rsc, vincent.vanackere
CC=golang-dev
https://golang.org/cl/4590050

13 years agoio: clarify Read, ReadAt, Copy, Copyn EOF behavior
Russ Cox [Wed, 22 Jun 2011 23:33:07 +0000 (19:33 -0400)]
io: clarify Read, ReadAt, Copy, Copyn EOF behavior

R=golang-dev, bradfitz, iant, dsymonds, nigeltao, r
CC=golang-dev
https://golang.org/cl/4629062

13 years agoFirst cut at the parser for the new template package.
Rob Pike [Wed, 22 Jun 2011 23:27:28 +0000 (09:27 +1000)]
First cut at the parser for the new template package.

This is not a full grammar, but the pieces are there to implement whatever we converge on.

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

13 years agoexec: better error message for windows LookPath
Alex Brainman [Wed, 22 Jun 2011 23:16:20 +0000 (09:16 +1000)]
exec: better error message for windows LookPath

Fixes #1991.

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

13 years agoimage: basic test for the 16-bits-per-color-channel types.
Nigel Tao [Wed, 22 Jun 2011 22:39:00 +0000 (08:39 +1000)]
image: basic test for the 16-bits-per-color-channel types.

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

13 years agosyscall: add tty support to StartProcess
Ken Rockot [Wed, 22 Jun 2011 22:07:20 +0000 (18:07 -0400)]
syscall: add tty support to StartProcess

These changes add a Ctty int field to the Unix syscall.ProcAttr which,
if set >= 0 in conjuction with Setsid=true, will be used by
forkAndExecInChild as the file descriptor for the new child's
controlling terminal.

Necessary changes have been made to mkerrors.sh to generate defs for
TIOC*, though changes to its output files are not included here.
The changes made should support Linux, FreeBSD and Darwin, at least.

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

13 years agoA+C: Ken Rockot (individual CLA)
Russ Cox [Wed, 22 Jun 2011 22:07:08 +0000 (18:07 -0400)]
A+C: Ken Rockot (individual CLA)

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

13 years agobuild: explain $PWD use
Russ Cox [Wed, 22 Jun 2011 21:00:46 +0000 (17:00 -0400)]
build: explain $PWD use

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

13 years agosync: restore GOMAXPROCS during benchmarks
Dmitriy Vyukov [Wed, 22 Jun 2011 20:20:37 +0000 (16:20 -0400)]
sync: restore GOMAXPROCS during benchmarks

R=golang-dev
CC=dvyukov, golang-dev
https://golang.org/cl/4631060

13 years agold: don't attempt to build dynamic sections unnecessarily
Gustavo Niemeyer [Wed, 22 Jun 2011 19:12:22 +0000 (15:12 -0400)]
ld: don't attempt to build dynamic sections unnecessarily

This prevents ld from generating zeroed symtab entries for
sections that aren't going to be generated because dynamic
linkage has been disabled (-d was used or no dynamic libs
were seen).  Even though they were not explicitly added by
doelf, the section creation process was making them
reachable again.

The windows head is being disconsidered for this because
apparently it's not taking into account debug['d'].

This makes elflint 0.1% happier.

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

13 years agoFix Windows build; ErrorString->NewError
Brad Fitzpatrick [Wed, 22 Jun 2011 18:33:30 +0000 (11:33 -0700)]
Fix Windows build; ErrorString->NewError

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

13 years agoos.Error API: don't export os.ErrorString, use os.NewError consistently
Robert Griesemer [Wed, 22 Jun 2011 17:52:47 +0000 (10:52 -0700)]
os.Error API: don't export os.ErrorString, use os.NewError consistently

This is a core API change.

1) gofix misc src
2) Manual adjustments to the following files under src/pkg:
   gob/decode.go
   rpc/client.go
   os/error.go
   io/io.go
   bufio/bufio.go
   http/request.go
   websocket/client.go
as well as:
   src/cmd/gofix/testdata/*.go.in (reverted)
   test/fixedbugs/bug243.go
3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go)

Compiles and runs all tests.

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

13 years agogodefs: remove test from build
Russ Cox [Wed, 22 Jun 2011 01:45:13 +0000 (21:45 -0400)]
godefs: remove test from build

The test is only defined on darwin/amd64, and it fails
with recent versions of Xcode, which do not support
-gstabs+ debugging output.  At some point godefs will
have to be replaced, perhaps merged with cgo.
Godefs is not needed during builds anyway (its output files
are checked into the repository in src/pkg/runtime),
so its failure on the newer Xcode is a distraction from an
otherwise usable build.  Disable the test.

Fixes #1985.

R=golang-dev, gri, robert.hencke, r
CC=golang-dev
https://golang.org/cl/4638053

13 years agocrypto/openpgp: add ElGamal support.
Adam Langley [Wed, 22 Jun 2011 01:00:49 +0000 (21:00 -0400)]
crypto/openpgp: add ElGamal support.

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

13 years ago8l: more fixes for Plan 9
Lucio De Re [Tue, 21 Jun 2011 16:14:32 +0000 (12:14 -0400)]
8l: more fixes for Plan 9

Once these changes are effected, it is possible to construct
"8l" native on a (386?) Plan 9 system, albeit with assistance
from modules such as mkfiles that are not (yet) included in any
public patches.

8l/asm.c:
. Corrected some format qualifiers.

8l/list.c:
. Cast a print() argument to (int) to match the given format.
  It may be possible to change the format (%R), but I have not
  looked into it.

8l/obj.c:
. Removed some unused code.

8l/span.c:
. Removed unnecessary incrementation on "bp".
. Corrected some format qualifiers.

ld/data.c:
. Corrected some format qualifiers.
. Cast print argument to (int): used as field size.
. Use braces to suppress warning about empty if() statements.

ld/dwarf.c:
. Trivial spelling mistake in comment.

ld/ldelf.c:
. Added USED() statements to silence warnings.
. Dropped redundant address (&) operators.
. corrected some format qualifiers.
. Cast to (int) for switch selection variable.

ld/macho.c:
. Added USED() statements to silence warnings.

ld/ldpe.c:
. Added USED() statements to silence warnings.
. More careful use of "sect" variable.
. Corrected some format qualifiers.
. Removed redundant assignments.
. Minor fix dropped as it was submitted separately.

ld/pe.c:
. Dropped <time.h> which is now in <u.h>.
. Dropped redundant address (&) operators.
. Added a missing variable initialisation.

ld/symtab.c:
. Added USED() statements to silence warnings.
. Removed redundant incrementation.
. Corrected some format qualifiers.

All the above have been tested against a (very) recent release
and do not seem to trigger any regressions.

All review suggestions have been incorporated.

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

13 years agonacl, tiny: remove vestiges
Robert Hencke [Tue, 21 Jun 2011 16:02:40 +0000 (12:02 -0400)]
nacl, tiny: remove vestiges

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

13 years agogopprof: update list of memory allocators
Russ Cox [Tue, 21 Jun 2011 15:27:08 +0000 (11:27 -0400)]
gopprof: update list of memory allocators

Also import new weblist command from Google version.

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

13 years agogoinstall: undo 1ad616fb313d (always rebuild...)
Andrew Gerrand [Tue, 21 Jun 2011 07:13:16 +0000 (17:13 +1000)]
goinstall: undo 1ad616fb313d (always rebuild...)

CL 4627051 is a better way of doing the same thing.

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

13 years agobuilder: run make single-threaded on windows
Alex Brainman [Tue, 21 Jun 2011 02:26:38 +0000 (12:26 +1000)]
builder: run make single-threaded on windows

Will still honor MAKEFLAGS environment variable if set.

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

13 years agogoinstall: undo repo peeking code
Andrew Gerrand [Tue, 21 Jun 2011 01:28:15 +0000 (11:28 +1000)]
goinstall: undo repo peeking code

Keeping the Julian's good refactoring work.

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

13 years agoEffective Go: supplied missing type in variadic function example.
Ben Lynn [Tue, 21 Jun 2011 00:55:07 +0000 (10:55 +1000)]
Effective Go: supplied missing type in variadic function example.

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

13 years agosyscall: add socket control message support for darwin, freebsd, linux
Mikio Hara [Mon, 20 Jun 2011 22:40:20 +0000 (18:40 -0400)]
syscall: add socket control message support for darwin, freebsd, linux

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

13 years agofmt: catch panics from calls to String etc.
Rob Pike [Mon, 20 Jun 2011 22:31:02 +0000 (08:31 +1000)]
fmt: catch panics from calls to String etc.

This change causes Print et al. to catch panics generated by
calls to String, GoString, and Format.  The panic is formatted
into the output stream as an error, but the program continues.
As a special case, if the argument was a nil pointer, the
result is just "<nil>", because that's almost certainly enough
information and handles the very common case of String
methods that don't guard against nil.

Scan does not want this change. Input must work; output can
be for debugging and it's nice to get output even when you
make a mistake.

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

13 years agoall-qemu.bash: cannot test go/build
Russ Cox [Mon, 20 Jun 2011 21:44:36 +0000 (17:44 -0400)]
all-qemu.bash: cannot test go/build

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

13 years agohttp: write Header keys with empty values
Brad Fitzpatrick [Mon, 20 Jun 2011 21:36:03 +0000 (14:36 -0700)]
http: write Header keys with empty values

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

13 years agohttp: permit handlers to explicitly remove the Date header
Brad Fitzpatrick [Mon, 20 Jun 2011 20:39:03 +0000 (13:39 -0700)]
http: permit handlers to explicitly remove the Date header

We'll do the right thing by default, but people wanting minimal
response sizes can explicitly remove the Date header.
(empty fields aren't written out)

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

13 years agoos: change Waitmsg String method to use pointer receiver
Graham Miller [Mon, 20 Jun 2011 19:42:17 +0000 (15:42 -0400)]
os: change Waitmsg String method to use pointer receiver

Fixes #1851.

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

13 years agohttp: add Server.ListenAndServeTLS
Brad Fitzpatrick [Mon, 20 Jun 2011 19:19:26 +0000 (12:19 -0700)]
http: add Server.ListenAndServeTLS

Fixes #1964

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

13 years agosyscall: add LSF support for linux
Mikio Hara [Mon, 20 Jun 2011 18:51:34 +0000 (14:51 -0400)]
syscall: add LSF support for linux

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

13 years agocodereview.py: note that hg change -d abandons a change list
Robert Hencke [Mon, 20 Jun 2011 18:50:00 +0000 (14:50 -0400)]
codereview.py: note that hg change -d abandons a change list

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

13 years ago5g, 6g, 8g: fix comments in method call generation
Anthony Martin [Mon, 20 Jun 2011 18:49:29 +0000 (14:49 -0400)]
5g, 6g, 8g: fix comments in method call generation

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

13 years ago5g, 5l: fix more set but not used warnings
Anthony Martin [Mon, 20 Jun 2011 18:18:04 +0000 (14:18 -0400)]
5g, 5l: fix more set but not used warnings

These are present when building with gcc 4.6.

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

13 years agotest: test of goto restrictions
Russ Cox [Mon, 20 Jun 2011 18:06:00 +0000 (14:06 -0400)]
test: test of goto restrictions

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

13 years agohttp: fix req.Cookie(name) with cookies in one header
Brad Fitzpatrick [Mon, 20 Jun 2011 17:33:07 +0000 (10:33 -0700)]
http: fix req.Cookie(name) with cookies in one header

Fixes #1974

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

13 years agomime: fix RFC references
Pascal S. de Kloe [Mon, 20 Jun 2011 14:41:18 +0000 (07:41 -0700)]
mime: fix RFC references

R=golang-dev, bradfitz
CC=brad fitzpatrick <bradfitz, golang-dev
https://golang.org/cl/4634063

13 years agobuild: exclude packages that fail on Plan 9 (for now)
Anthony Martin [Mon, 20 Jun 2011 12:23:43 +0000 (22:23 +1000)]
build: exclude packages that fail on Plan 9 (for now)

All but two packages depend on net:
        debug/proc
        os/signal

With this change, we can produce
a working build with GOOS=plan9.

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

13 years agogoinstall: update doc.go
Andrew Gerrand [Mon, 20 Jun 2011 06:39:16 +0000 (16:39 +1000)]
goinstall: update doc.go

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

13 years agomisc/godashboard: Accept sub-directories for goinstall's report.
Yasuhiro Matsumoto [Mon, 20 Jun 2011 04:46:32 +0000 (14:46 +1000)]
misc/godashboard: Accept sub-directories for goinstall's report.
Fixed issue 1155.

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

13 years agogoinstall: s/vlogf/printf/
Andrew Gerrand [Mon, 20 Jun 2011 04:44:14 +0000 (14:44 +1000)]
goinstall: s/vlogf/printf/

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

13 years agogoinstall: wait for all commands to finish instead of timeout
Andrew Gerrand [Mon, 20 Jun 2011 04:12:23 +0000 (14:12 +1000)]
goinstall: wait for all commands to finish instead of timeout
goinstall: make ".git" repo suffix optional

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

13 years agoexec: add support for Plan 9
Anthony Martin [Mon, 20 Jun 2011 03:34:10 +0000 (13:34 +1000)]
exec: add support for Plan 9

R=paulzhol, mirtchovski, fshahriar, alex.brainman, r
CC=golang-dev
https://golang.org/cl/4386041

13 years agogoinstall: Add support for arbitary code repositories
Julian Phillips [Mon, 20 Jun 2011 03:00:43 +0000 (13:00 +1000)]
goinstall: Add support for arbitary code repositories

Extend goinstall to support downloading from any hg/git/svn/bzr hosting
site, not just the standard ones.  The type of hosting is automatically
checked by trying all the tools, so the import statement looks like:

  import "example.com/mything"

Which will work for Mercurial (http), Subversion (http, svn), Git (http,
git) and Bazaar (http, bzr) hosting.

All the existing package imports will work through this new mechanism,
but the existing hard-coded host support is left in place to ensure
there is no change in behaviour.

R=golang-dev, bradfitz, fvbommel, go.peter.90, n13m3y3r, adg, duperray.olivier
CC=golang-dev
https://golang.org/cl/4650043

13 years agodoc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
Rob Pike [Mon, 20 Jun 2011 02:36:14 +0000 (12:36 +1000)]
doc/GoCourseDay1: shrink the PDF by rewriting it using ps2pdf.
No difference in content or appearance.
Forgot to do this when I updated this file a few days ago.

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

13 years agogodefs: rudimentary tests
Robert Hencke [Mon, 20 Jun 2011 01:54:07 +0000 (11:54 +1000)]
godefs: rudimentary tests

currently only defined for darwin

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

13 years ago8a: delete dreg l.s
Rob Pike [Mon, 20 Jun 2011 01:53:41 +0000 (11:53 +1000)]
8a: delete dreg l.s

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

13 years agotime: add support for Plan 9
Anthony Martin [Sun, 19 Jun 2011 06:36:33 +0000 (16:36 +1000)]
time: add support for Plan 9

R=paulzhol, mirtchovski, r, r, rsc
CC=golang-dev
https://golang.org/cl/4362041

13 years agoA+C: add Julian Phillips
Andrew Gerrand [Sun, 19 Jun 2011 06:09:28 +0000 (16:09 +1000)]
A+C: add Julian Phillips

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

13 years agoMake.ccmd: another build fix.
Rob Pike [Sun, 19 Jun 2011 05:30:54 +0000 (15:30 +1000)]
Make.ccmd: another build fix.
It's sad to think there are environments where compiling against a library
isn't enough information for the the linker to decide that you need that
library.
TBR=jdpoirier

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

13 years agoMake.ccmd: fix build - libraries in wrong order.
Rob Pike [Sun, 19 Jun 2011 04:56:25 +0000 (14:56 +1000)]
Make.ccmd: fix build - libraries in wrong order.
TBR=jdpoirier

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

13 years agocc: nit: silence comment warnings
Dave Cheney [Sun, 19 Jun 2011 03:58:08 +0000 (13:58 +1000)]
cc: nit: silence comment warnings

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

13 years agoMake.ccmd: link with mach lib,
Joe Poirier [Sun, 19 Jun 2011 03:57:22 +0000 (13:57 +1000)]
Make.ccmd: link with mach lib,
remove explicit linking in make files

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

13 years agodoc/faq: remove misleading FAQ entry
Andrew Gerrand [Sun, 19 Jun 2011 03:53:07 +0000 (13:53 +1000)]
doc/faq: remove misleading FAQ entry

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

13 years agogoinstall: always rebuild a package after its dependencies are built
Andrew Gerrand [Sat, 18 Jun 2011 23:36:45 +0000 (09:36 +1000)]
goinstall: always rebuild a package after its dependencies are built

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

13 years agohttp: fix documentation typo
Scott Lawrence [Sat, 18 Jun 2011 11:53:18 +0000 (21:53 +1000)]
http: fix documentation typo
(Variable is referred to alternately as 'r' and 'req')

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

13 years agodoc/faq: add question about converting from []T to []interface{}
Andrew Gerrand [Sat, 18 Jun 2011 10:31:38 +0000 (20:31 +1000)]
doc/faq: add question about converting from []T to []interface{}

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

13 years agosyscall: fix build for Sizeof change
Russ Cox [Fri, 17 Jun 2011 21:07:21 +0000 (17:07 -0400)]
syscall: fix build for Sizeof change

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

13 years agogc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr
Russ Cox [Fri, 17 Jun 2011 20:12:14 +0000 (16:12 -0400)]
gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptr

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

13 years ago5g, 8g: fix build
Russ Cox [Fri, 17 Jun 2011 20:05:00 +0000 (16:05 -0400)]
5g, 8g: fix build

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

13 years agogc: implement goto restriction
Russ Cox [Fri, 17 Jun 2011 19:25:05 +0000 (15:25 -0400)]
gc: implement goto restriction

Remove now-unnecessary zeroing of stack frames.

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

13 years agogc: descriptive panic for nil pointer -> value method call
Russ Cox [Fri, 17 Jun 2011 19:23:27 +0000 (15:23 -0400)]
gc: descriptive panic for nil pointer -> value method call

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

13 years agospec: disallow goto into blocks
Russ Cox [Fri, 17 Jun 2011 16:49:04 +0000 (12:49 -0400)]
spec: disallow goto into blocks

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

13 years agorespect goto restrictions
Russ Cox [Fri, 17 Jun 2011 10:07:13 +0000 (06:07 -0400)]
respect goto restrictions

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

13 years agogo/build: use back quotes for regular expression
Alex Brainman [Fri, 17 Jun 2011 06:41:59 +0000 (16:41 +1000)]
go/build: use back quotes for regular expression

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

13 years ago8l: minor fix discovered by lucio
Alex Brainman [Fri, 17 Jun 2011 05:55:54 +0000 (15:55 +1000)]
8l: minor fix discovered by lucio

R=lucio.dere, vcc.163, bradfitz
CC=golang-dev
https://golang.org/cl/4645044

13 years agotag weekly.2011-06-16
Andrew Gerrand [Fri, 17 Jun 2011 01:35:57 +0000 (11:35 +1000)]
tag weekly.2011-06-16

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

13 years agoweekly.2011-06-16 weekly.2011-06-16
Andrew Gerrand [Fri, 17 Jun 2011 01:31:40 +0000 (11:31 +1000)]
weekly.2011-06-16

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

13 years agogoinstall, go/build: support building cgo packages
Andrew Gerrand [Fri, 17 Jun 2011 01:15:54 +0000 (11:15 +1000)]
goinstall, go/build: support building cgo packages

Fixes #1962.

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

13 years agodoc/effective_go: add a note about prefixing error strings with their
Nigel Tao [Fri, 17 Jun 2011 00:51:10 +0000 (10:51 +1000)]
doc/effective_go: add a note about prefixing error strings with their
package name.

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

13 years agoregexp: add a package prefix to error strings.
Nigel Tao [Fri, 17 Jun 2011 00:50:38 +0000 (10:50 +1000)]
regexp: add a package prefix to error strings.

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

13 years agocgo: make file path work for windows
Alex Brainman [Fri, 17 Jun 2011 00:17:33 +0000 (10:17 +1000)]
cgo: make file path work for windows

R=golang-dev, mattn.jp, adg
CC=golang-dev
https://golang.org/cl/4634043

13 years agohttp: document http client/transport thread safety
Brad Fitzpatrick [Thu, 16 Jun 2011 22:02:47 +0000 (15:02 -0700)]
http: document http client/transport thread safety

Fixes #1961

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

13 years agounicode: add case folding tables
Russ Cox [Thu, 16 Jun 2011 21:56:25 +0000 (17:56 -0400)]
unicode: add case folding tables

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

13 years agohttp: make Headers be source of truth
Brad Fitzpatrick [Thu, 16 Jun 2011 20:02:28 +0000 (13:02 -0700)]
http: make Headers be source of truth

Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs.  It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day.  That would be
hard to gofix, especially with code ranging over Headers.

After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.

Request:
change: Referer -> Referer()
change: UserAgent -> UserAgent()
change: Cookie -> Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)

Response:
change: Cookie -> Cookies()

Cookie:
new: String() string

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

13 years agoxml: allow attributes without value in non-strict mode.
Volker Dobler [Thu, 16 Jun 2011 16:56:49 +0000 (12:56 -0400)]
xml: allow attributes without value in non-strict mode.

Attributes without value are commen in html and the xml
parser will accept them in non-strict mode and use the
attribute name as value. Thus parsing <p nowrap> as
<p norwar="nowrap">.

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

13 years agoA+C: Volker Dobler (individual CLA)
Russ Cox [Thu, 16 Jun 2011 16:56:39 +0000 (12:56 -0400)]
A+C: Volker Dobler (individual CLA)

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

13 years agomime/multipart: convert Reader from interface to struct
Brad Fitzpatrick [Thu, 16 Jun 2011 15:55:53 +0000 (08:55 -0700)]
mime/multipart: convert Reader from interface to struct

It was always a weird interface but I didn't know what I
was doing at the time.  rsc questioned me about it then
but didn't press on it during review.  Then adg bugged me
about it too recently.

So clean it up. It parallels the Writer struct too.

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

13 years agoruntime/cgo: fix for OS X 10.7
Russ Cox [Thu, 16 Jun 2011 15:10:31 +0000 (11:10 -0400)]
runtime/cgo: fix for OS X 10.7

Correct a few error messages (libcgo -> runtime/cgo)
and delete old nacl_386.c file too.

Fixes #1657.

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

13 years agosort: change the name of Float64Array to Float64Slice.
Rob Pike [Thu, 16 Jun 2011 07:48:02 +0000 (17:48 +1000)]
sort: change the name of Float64Array to Float64Slice.
I missed this before because I used the wrong regexp. What a moron.

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

13 years agotag release = release.r57.2
Russ Cox [Thu, 16 Jun 2011 06:09:48 +0000 (02:09 -0400)]
tag release = release.r57.2

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

13 years agotag release.r57.2
Russ Cox [Thu, 16 Jun 2011 06:06:27 +0000 (02:06 -0400)]
tag release.r57.2

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

13 years agodocs/GoCourseDay1.pdf: fix error in operator table.
Rob Pike [Thu, 16 Jun 2011 06:03:24 +0000 (16:03 +1000)]
docs/GoCourseDay1.pdf: fix error in operator table.
Communications op was listed as a binary; it isn't any more.

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

13 years agodoc: document r57.2
Russ Cox [Thu, 16 Jun 2011 05:46:14 +0000 (01:46 -0400)]
doc: document r57.2

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

13 years ago6g, 8g: fix goto fix
Russ Cox [Thu, 16 Jun 2011 05:25:49 +0000 (01:25 -0400)]
6g, 8g: fix goto fix

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

13 years agogo/printer, gofmt: print "select {}" on one line
Robert Griesemer [Thu, 16 Jun 2011 04:47:29 +0000 (21:47 -0700)]
go/printer, gofmt: print "select {}" on one line

No impact on existing sources under src, misc.

Fixes #1959.

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

13 years agogc: work around goto bug
Russ Cox [Thu, 16 Jun 2011 04:18:43 +0000 (00:18 -0400)]
gc: work around goto bug

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

13 years agobuild: use awk instead of giant egrep regexp
Russ Cox [Thu, 16 Jun 2011 04:04:24 +0000 (00:04 -0400)]
build: use awk instead of giant egrep regexp

Avoids buggy version of egrep on some Macs.

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

13 years agogo/build: support building cgo packages on non intel platforms
Dave Cheney [Thu, 16 Jun 2011 03:35:27 +0000 (13:35 +1000)]
go/build: support building cgo packages on non intel platforms

See https://golang.org/cl/4572045/

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

13 years agoimage/draw: add an Op argument to Draw.
Nigel Tao [Thu, 16 Jun 2011 01:45:16 +0000 (11:45 +1000)]
image/draw: add an Op argument to Draw.

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

13 years agosyscall: use strict in perl scripts
Yasuhiro Matsumoto [Thu, 16 Jun 2011 00:41:07 +0000 (17:41 -0700)]
syscall: use strict in perl scripts

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

13 years agoundo CL 4557047 / 8818ac606e92
Russ Cox [Wed, 15 Jun 2011 23:47:52 +0000 (19:47 -0400)]
undo CL 4557047 / 8818ac606e92

I don't think we've discussed this API enough.

««« original CL description
bike/shed: new package.

It comes up often enough that it's time to provide
the utility of a standard package.

R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
»»»

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

13 years agogodoc: replace direct OS file system accesses in favor
Robert Griesemer [Wed, 15 Jun 2011 21:06:35 +0000 (14:06 -0700)]
godoc: replace direct OS file system accesses in favor
       of accesses via a FileSystem interface.

Preparation for appengine version which gets its files
via a snapshot or zip file and uses a corresponding
FileSystem implementation.

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

13 years agodoc/effective_go.html: replace tab with spaces.
Rob Pike [Wed, 15 Jun 2011 14:13:18 +0000 (00:13 +1000)]
doc/effective_go.html: replace tab with spaces.

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

13 years agohttp: use runtime/debug.Stack() to dump stack trace on panic.
Rob Pike [Wed, 15 Jun 2011 14:12:50 +0000 (00:12 +1000)]
http: use runtime/debug.Stack() to dump stack trace on panic.
Test output now looks like this:

2011/06/15 21:10:41 http: panic serving 127.0.0.1:59729: intentional death for testing
$GOROOT/src/pkg/http/server.go:495 (0x3f9f8)
        _func_004: buf.Write(debug.Stack())
$GOROOT/src/pkg/runtime/proc.c:1041 (0x12367)
        panic: reflect·call(d->fn, d->args, d->siz);
$GOROOT/src/pkg/http/serve_test.go:775 (0x5831b)
        _func_029: panic("intentional death for testing")
$GOROOT/src/pkg/http/server.go:575 (0x26366)
        HandlerFunc.ServeHTTP: f(w, r)
$GOROOT/src/pkg/http/server.go:541 (0x261a9)
        *conn.serve: c.handler.ServeHTTP(w, w.req)
$GOROOT/src/pkg/runtime/proc.c:178 (0x10a83)
        goexit: runtime·goexit(void)

with $GOROOT expanded, of course.

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