]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agoos/exec: put the print where it will help
Russ Cox [Wed, 21 Dec 2011 22:49:29 +0000 (17:49 -0500)]
os/exec: put the print where it will help

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

13 years agodashboard: add /key handler
Andrew Gerrand [Wed, 21 Dec 2011 22:38:57 +0000 (09:38 +1100)]
dashboard: add /key handler

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

13 years agodashboard: deprecation notice for the old dashboard
Andrew Gerrand [Wed, 21 Dec 2011 22:38:35 +0000 (09:38 +1100)]
dashboard: deprecation notice for the old dashboard

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

13 years agoos/exec: dump lsof on failure
Russ Cox [Wed, 21 Dec 2011 22:17:28 +0000 (17:17 -0500)]
os/exec: dump lsof on failure

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

13 years agogodoc: fix crash
Robert Griesemer [Wed, 21 Dec 2011 21:55:47 +0000 (13:55 -0800)]
godoc: fix crash

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

13 years agoos/exec: enable inherited file descriptor test
Andrew Gerrand [Wed, 21 Dec 2011 21:50:56 +0000 (08:50 +1100)]
os/exec: enable inherited file descriptor test

Fixes #2596.

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

13 years agoos/user: not on windows
Russ Cox [Wed, 21 Dec 2011 21:35:31 +0000 (16:35 -0500)]
os/user: not on windows

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

13 years agobuildscript: make script safer, same output on Windows
Russ Cox [Wed, 21 Dec 2011 20:58:05 +0000 (15:58 -0500)]
buildscript: make script safer, same output on Windows

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

13 years agobuild: fixes for Windows
Russ Cox [Wed, 21 Dec 2011 20:57:47 +0000 (15:57 -0500)]
build: fixes for Windows

* work around a linker/cgo bug
* do not run deps.bash on Windows unless we need it
  (cuts a full minute off the build time)
* add windows to the list of cgo-enabled targets

The gopack problem is issue 2601.

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

13 years agodoc/progs/run: go1 prints output; fix test
Rob Pike [Wed, 21 Dec 2011 20:06:20 +0000 (12:06 -0800)]
doc/progs/run: go1 prints output; fix test

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

13 years agopath/filepath.Rel: document that the returned path is always relative
Rob Pike [Wed, 21 Dec 2011 19:46:42 +0000 (11:46 -0800)]
path/filepath.Rel: document that the returned path is always relative

Fixes #2593.

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

13 years agocrypto/x509: don't crash with nil receiver in accessor method
Brad Fitzpatrick [Wed, 21 Dec 2011 18:49:35 +0000 (10:49 -0800)]
crypto/x509: don't crash with nil receiver in accessor method

Fixes #2600

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

13 years agogo/doc: steps towards collecting methods of embedded types
Robert Griesemer [Wed, 21 Dec 2011 16:45:00 +0000 (08:45 -0800)]
go/doc: steps towards collecting methods of embedded types

No visible external changes yet. The current approach is
a stop-gap approach: For methods of anonymous fields to be
seen, the anonymous field's types must be exported.

Missing: computing the actual MethodDocs and displaying them.

(Depending on the operation mode of godoc, the input to go/doc
is a pre-filtered AST with all non-exported nodes removed. Non-
exported anonymous fields are not even seen by go/doc in this
case, and it is impossible to collect associated (even exported)
methods. A correct fix will require some more significant re-
engineering; AST filtering will have to happen later, possibly
inside go/doc.)

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

13 years agoos/user: fix for arm (non-cgo)
Russ Cox [Wed, 21 Dec 2011 15:17:37 +0000 (10:17 -0500)]
os/user: fix for arm (non-cgo)

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

13 years agocmd/go: respect $GCFLAGS
Russ Cox [Wed, 21 Dec 2011 14:04:34 +0000 (09:04 -0500)]
cmd/go: respect $GCFLAGS

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

13 years agogo/build: add new +build tags 'cgo' and 'nocgo'
Russ Cox [Wed, 21 Dec 2011 13:51:18 +0000 (08:51 -0500)]
go/build: add new +build tags 'cgo' and 'nocgo'

This lets us mark net's cgo_stub.go as only to be
built when cgo is disabled.

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

13 years agocmd/go: use spaces consistently in help message
Roger Peppe [Wed, 21 Dec 2011 13:25:31 +0000 (08:25 -0500)]
cmd/go: use spaces consistently in help message

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

13 years agoos/signal: not on windows
Russ Cox [Wed, 21 Dec 2011 13:20:25 +0000 (08:20 -0500)]
os/signal: not on windows

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

13 years agocmd/go: fix build (piece of 5489100 leaked in to last checkin)
Russ Cox [Wed, 21 Dec 2011 13:05:04 +0000 (08:05 -0500)]
cmd/go: fix build (piece of 5489100 leaked in to last checkin)

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

13 years agoos/signal: do not build on Plan 9
Anthony Martin [Wed, 21 Dec 2011 12:52:07 +0000 (07:52 -0500)]
os/signal: do not build on Plan 9

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

13 years agocmd/go: many improvements
Russ Cox [Wed, 21 Dec 2011 12:47:12 +0000 (07:47 -0500)]
cmd/go: many improvements

* correct dependency calculations
* comment meaning of action fields
* new alias "std" like "all" but standard packages only
* add -o flag to 'go build'
* set up for parallel build (still serial)
* understand that import "C" depends on cgo, runtime/cgo

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

13 years agonet, syscall: interface address and mask
Mikio Hara [Wed, 21 Dec 2011 12:39:00 +0000 (21:39 +0900)]
net, syscall: interface address and mask

This CL makes both InterfaceAddrs and Addrs method on Interface
return IPNet struct for representing interface address and mask
like below:

interface "lo0": flags "up|loopback|multicast", ifindex 1, mtu 16384
        interface address "fe80::1/64"
        interface address "127.0.0.1/8"
        interface address "::1/128"
        joined group address "ff02::fb"
        joined group address "224.0.0.251"
        joined group address "ff02::2:65d0:d71e"
        joined group address "224.0.0.1"
  joined group address "ff01::1"
        joined group address "ff02::1"
        joined group address "ff02::1:ff00:1"

Fixes #2571.

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

13 years agoruntime: silence darwin/386 build warnings
Russ Cox [Wed, 21 Dec 2011 12:23:03 +0000 (07:23 -0500)]
runtime: silence darwin/386 build warnings

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

13 years agocmd/go: avoid infinite loop with package specific flags
Mikio Hara [Wed, 21 Dec 2011 12:20:17 +0000 (21:20 +0900)]
cmd/go: avoid infinite loop with package specific flags

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

13 years agodashboard: fix typo in css
Andrew Gerrand [Wed, 21 Dec 2011 10:47:59 +0000 (21:47 +1100)]
dashboard: fix typo in css

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

13 years agocrypto/mime/net/time: add netbsd to +build tags
Joel Sing [Wed, 21 Dec 2011 10:44:47 +0000 (21:44 +1100)]
crypto/mime/net/time: add netbsd to +build tags

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

13 years agodashboard: use 'ok' instead of 'hit' or 'miss' for bool return vals
Andrew Gerrand [Wed, 21 Dec 2011 10:12:03 +0000 (21:12 +1100)]
dashboard: use 'ok' instead of 'hit' or 'miss' for bool return vals

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

13 years agobuild: rewrite to use bash time builtin
Russ Cox [Wed, 21 Dec 2011 06:24:57 +0000 (01:24 -0500)]
build: rewrite to use bash time builtin

Should help windows/amd64

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

13 years agodashboard: cache todo responses
Andrew Gerrand [Wed, 21 Dec 2011 06:24:42 +0000 (17:24 +1100)]
dashboard: cache todo responses

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

13 years agobuilder: set default builder host to build.golang.org
Andrew Gerrand [Wed, 21 Dec 2011 06:12:16 +0000 (17:12 +1100)]
builder: set default builder host to build.golang.org

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

13 years agobuild: multiple fixes to make "go install" work on windows
Alex Brainman [Wed, 21 Dec 2011 05:57:44 +0000 (16:57 +1100)]
build: multiple fixes to make "go install" work on windows

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

13 years agobuilder: report run time
Andrew Gerrand [Wed, 21 Dec 2011 04:43:12 +0000 (15:43 +1100)]
builder: report run time
dashboard: record run time

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

13 years agodashboard: store front page in memcache
Andrew Gerrand [Wed, 21 Dec 2011 03:57:46 +0000 (14:57 +1100)]
dashboard: store front page in memcache

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

13 years agodashboard: put http handlers in new file handler.go
Andrew Gerrand [Wed, 21 Dec 2011 03:07:32 +0000 (14:07 +1100)]
dashboard: put http handlers in new file handler.go

This CL contains no code changes.

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

13 years agodashboard: send mail on build failure
Andrew Gerrand [Wed, 21 Dec 2011 02:16:47 +0000 (13:16 +1100)]
dashboard: send mail on build failure

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

13 years agobuild: make use of env
Mikio Hara [Wed, 21 Dec 2011 02:11:55 +0000 (11:11 +0900)]
build: make use of env

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

13 years agobuild: fix for freebsd, openbsd
Russ Cox [Wed, 21 Dec 2011 01:37:58 +0000 (20:37 -0500)]
build: fix for freebsd, openbsd

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

13 years agodashboard: fix log recording and output
Andrew Gerrand [Wed, 21 Dec 2011 01:13:27 +0000 (12:13 +1100)]
dashboard: fix log recording and output

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

13 years agodashboard: more descriptive logging, ui tweaks, show better auth error
Andrew Gerrand [Wed, 21 Dec 2011 00:08:47 +0000 (11:08 +1100)]
dashboard: more descriptive logging, ui tweaks, show better auth error

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

13 years agoos: don't trust O_CLOEXEC on OS X
Brad Fitzpatrick [Tue, 20 Dec 2011 23:41:37 +0000 (15:41 -0800)]
os: don't trust O_CLOEXEC on OS X

OS X 10.6 doesn't do O_CLOEXEC.
OS X 10.7 does.

For now, always fall back to using syscall.CloseOnExec on darwin.

This can removed when 10.6 is old news, or if we find a
way to cheaply & reliably detect 10.6 vs 10.7 at runtime.

Fixes #2587

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

13 years agobuild: fix the build with USE_GO_TOOL=false
Brad Fitzpatrick [Tue, 20 Dec 2011 23:30:36 +0000 (15:30 -0800)]
build: fix the build with USE_GO_TOOL=false

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

13 years agoimage/ycbcr: move the Y'CbCr types into image and image/color.
Nigel Tao [Tue, 20 Dec 2011 23:29:21 +0000 (10:29 +1100)]
image/ycbcr: move the Y'CbCr types into image and image/color.

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

13 years agohtml: handle breakout tags in foreign content.
Nigel Tao [Tue, 20 Dec 2011 23:00:41 +0000 (10:00 +1100)]
html: handle breakout tags in foreign content.

Also recognize that, in the latest version of the HTML5 spec,
foreign content is not an insertion mode, but a separate concern.

Pass tests10.dat, test 13:
<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <table>
|       <caption>
|         <svg svg>
|           <svg g>
|             "foo"
|           <svg g>
|             "bar"
|         <p>
|           "baz"
|     <p>
|       "quux"

Also pass tests through test 15:
<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux

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

13 years agodashboard: send builder in commit POST query string
Andrew Gerrand [Tue, 20 Dec 2011 22:59:45 +0000 (09:59 +1100)]
dashboard: send builder in commit POST query string

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

13 years agobuild: a round of fixes
Russ Cox [Tue, 20 Dec 2011 22:54:40 +0000 (17:54 -0500)]
build: a round of fixes

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

13 years agonet: fix Windows build
Brad Fitzpatrick [Tue, 20 Dec 2011 22:32:33 +0000 (14:32 -0800)]
net: fix Windows build

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

13 years agoeffective_go: redeclaration
Rob Pike [Tue, 20 Dec 2011 22:15:35 +0000 (14:15 -0800)]
effective_go: redeclaration

Fixes #2455.
Fixes #2013.

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

13 years agobuild: fix on Linux
Russ Cox [Tue, 20 Dec 2011 22:11:16 +0000 (17:11 -0500)]
build: fix on Linux

On other systems the temporary directory name
will have a .XXXXXX in the middle of it.  Oh well.

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

13 years agobuild: fix build
Russ Cox [Tue, 20 Dec 2011 22:00:52 +0000 (17:00 -0500)]
build: fix build

Missing file during last CL.

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

13 years agobuild: use go command during build
Russ Cox [Tue, 20 Dec 2011 21:50:13 +0000 (16:50 -0500)]
build: use go command during build

If something goes wrong, it should suffice to set
USE_GO_TOOL=false in env.bash to fall back to the
makefiles.  I will delete the makefiles in January.

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

13 years agocmd/go: work toward build script
Russ Cox [Tue, 20 Dec 2011 21:42:44 +0000 (16:42 -0500)]
cmd/go: work toward build script

The commands in the standard tree are now named
by the pseudo-import paths cmd/gofmt etc.
This avoids ambiguity between cmd/go's directory
and go/token's parent directory.

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

13 years agobuilder: use go-build.appspot.com instead of godashboard by default
Andrew Gerrand [Tue, 20 Dec 2011 21:28:54 +0000 (08:28 +1100)]
builder: use go-build.appspot.com instead of godashboard by default

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

13 years agogc: allow use of unsafe.Pointer in generated code
Russ Cox [Tue, 20 Dec 2011 21:25:57 +0000 (16:25 -0500)]
gc: allow use of unsafe.Pointer in generated code

The functions we generate to implement == on structs
or arrays may need to refer to unsafe.Pointer even in
safe mode, in order to handle unexported fields contained
in other packages' structs.

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

13 years agonet: DialTimeout
Brad Fitzpatrick [Tue, 20 Dec 2011 21:17:39 +0000 (13:17 -0800)]
net: DialTimeout

Fixes #240

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

13 years agotemplate: better error message for empty templates
Rob Pike [Tue, 20 Dec 2011 20:58:23 +0000 (12:58 -0800)]
template: better error message for empty templates
New("x").ParseFiles("y") can result in an empty "x" template.
Make the message clearer that this is the problem. The error
returns from both template packages in this case were
confusing.

I considered making the method use "x" instead of "y" in
this case, but that just made other situations confusing
and harder to explain.

Fixes #2594.

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

13 years ago.hgignore: ignore autogenerated files
Christopher Wedgwood [Tue, 20 Dec 2011 20:54:39 +0000 (15:54 -0500)]
.hgignore: ignore autogenerated files

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

13 years agoruntime/cgo: fix build
Russ Cox [Tue, 20 Dec 2011 19:42:58 +0000 (14:42 -0500)]
runtime/cgo: fix build

Two forgotten renames from last CL.

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

13 years agogo: build runtime/cgo
Russ Cox [Tue, 20 Dec 2011 19:25:23 +0000 (14:25 -0500)]
go: build runtime/cgo

Also rename -v to -x in the build and install commands,
to match the flag in go test (which we can't change
because -v is taken).  Matches sh -x anyway.

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

13 years agopanics: use the new facilities of testing.B instead
Rob Pike [Tue, 20 Dec 2011 18:36:25 +0000 (10:36 -0800)]
panics: use the new facilities of testing.B instead

Lots of panics go away.
Also fix a name error in html/template.

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

13 years agogo/ast, parser: remember short variable decls. w/ correspoding ident objects
Robert Griesemer [Tue, 20 Dec 2011 17:59:09 +0000 (09:59 -0800)]
go/ast, parser: remember short variable decls. w/ correspoding ident objects

The ast.Object's Decl field pointed back to the corresponding declaration for
all but short variable declarations. Now remember corresponding assignment
statement in the Decl field.

Also: simplified some code for parsing select statements.

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

13 years agotesting: allow benchmarks to print and fail
Rob Pike [Tue, 20 Dec 2011 17:51:39 +0000 (09:51 -0800)]
testing: allow benchmarks to print and fail
Refactors the benchmarks and test code.
Now benchmarks can call Errorf, Fail, etc.,
and the runner will act accordingly.

Because functionality has been folded into an
embedded type, a number of methods' docs
no longer appear in godoc output. A fix is
underway; if it doesn't happen fast enough,
I'll add wrapper methods to restore the
documentation.

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

13 years agocgo: support export for built-in types
Maxim Pimenov [Tue, 20 Dec 2011 17:28:45 +0000 (09:28 -0800)]
cgo: support export for built-in types
This change doesn't pay attention to structs
so they still cannot be exported, see Issue 2552.

Fixes #2462.

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

13 years agoencoding/binary: add more benchmarks
Roger Peppe [Tue, 20 Dec 2011 17:25:47 +0000 (09:25 -0800)]
encoding/binary: add more benchmarks
Also add a byte count to the varint benchmarks - this
isn't accurate, of course, but it allows a rough comparison to
the other benchmarks.

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

13 years agotime: JSON marshaler for Time
Robert Hencke [Tue, 20 Dec 2011 17:01:18 +0000 (09:01 -0800)]
time: JSON marshaler for Time

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

13 years agogo: build runtime
Russ Cox [Tue, 20 Dec 2011 15:28:04 +0000 (10:28 -0500)]
go: build runtime

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

13 years agosyscall: remove unnecessary semicolon from mksyscall.pl
Ian Lance Taylor [Tue, 20 Dec 2011 04:57:59 +0000 (20:57 -0800)]
syscall: remove unnecessary semicolon from mksyscall.pl

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

13 years agostrconv: remove obsolete comment.
Ian Lance Taylor [Tue, 20 Dec 2011 04:57:32 +0000 (20:57 -0800)]
strconv: remove obsolete comment.

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

13 years agoruntime: correct '.' to '·' in comments
Ian Lance Taylor [Tue, 20 Dec 2011 04:56:37 +0000 (20:56 -0800)]
runtime: correct '.' to '·' in comments

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

13 years agodashboard: todo sends full Commit with Kind field
Andrew Gerrand [Tue, 20 Dec 2011 04:30:11 +0000 (15:30 +1100)]
dashboard: todo sends full Commit with Kind field

Permits us to implement other Kinds of todo instruction in the future.

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

13 years agoencoding/binary: add Write and Read examples
Andrew Gerrand [Tue, 20 Dec 2011 02:16:36 +0000 (13:16 +1100)]
encoding/binary: add Write and Read examples

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

13 years ago5l/6l/8l: add support for netbsd signature note section
Joel Sing [Tue, 20 Dec 2011 01:25:06 +0000 (12:25 +1100)]
5l/6l/8l: add support for netbsd signature note section

R=m4dh4tt3r, jsing, rsc
CC=golang-dev
https://golang.org/cl/5493068

13 years agonet/http: test should not leave tmp files behind on windows
Alex Brainman [Tue, 20 Dec 2011 00:53:24 +0000 (11:53 +1100)]
net/http: test should not leave tmp files behind on windows

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

13 years agoos: make sure Remove returns correct error on windows
Alex Brainman [Tue, 20 Dec 2011 00:52:20 +0000 (11:52 +1100)]
os: make sure Remove returns correct error on windows

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

13 years agoold/template: close file in TestAll before deleting it
Alex Brainman [Tue, 20 Dec 2011 00:51:31 +0000 (11:51 +1100)]
old/template: close file in TestAll before deleting it

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

13 years agodashboard: display correct package build state
Andrew Gerrand [Tue, 20 Dec 2011 00:30:48 +0000 (11:30 +1100)]
dashboard: display correct package build state

Includes some boring whitespace tweaks.

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

13 years agohtml: ignore <caption>, <col>, <tbody> etc. when parsing table fragments
Andrew Balholm [Mon, 19 Dec 2011 23:57:06 +0000 (10:57 +1100)]
html: ignore <caption>, <col>, <tbody> etc. when parsing table fragments

Pass tests6.dat, test 36:
<caption><col><colgroup><tbody><tfoot><thead><tr>

| <tr>

Pass tests through test 44:
<body></body></html>

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

13 years agozip: fix data race in test
Brad Fitzpatrick [Mon, 19 Dec 2011 23:40:10 +0000 (15:40 -0800)]
zip: fix data race in test

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

13 years agosyscall: regenerate z-files for linux/arm
Mikio Hara [Mon, 19 Dec 2011 22:42:00 +0000 (07:42 +0900)]
syscall: regenerate z-files for linux/arm

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

13 years agoexec: disable new test to fix build
Ian Lance Taylor [Mon, 19 Dec 2011 22:09:12 +0000 (14:09 -0800)]
exec: disable new test to fix build

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

13 years agostrconv: implement faster parsing of decimal numbers.
Rémy Oudompheng [Mon, 19 Dec 2011 21:45:51 +0000 (16:45 -0500)]
strconv: implement faster parsing of decimal numbers.

The algorithm is the same as in the double-conversion library
which also implements Florian Loitsch's fast printing algorithm.
It uses extended floats with a 64-bit mantissa, but cannot give
an answer for all cases.

                           old ns/op  new ns/op  speedup
BenchmarkAtof64Decimal         332        322      1.0x
BenchmarkAtof64Float           385        373      1.0x
BenchmarkAtof64FloatExp       9777        419     23.3x
BenchmarkAtof64Big            3934        691      5.7x
BenchmarkAtof64RandomBits    34060        899     37.9x
BenchmarkAtof64RandomFloats   1329        680      2.0x

See F. Loitsch, ``Printing Floating-Point Numbers Quickly and
Accurately with Integers'', Proceedings of the ACM, 2010.

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

13 years agodoc: delete go course notes
Rob Pike [Mon, 19 Dec 2011 21:23:27 +0000 (13:23 -0800)]
doc: delete go course notes
They're out of date, a pain to maintain, and most of the material
is better served by the Go Tour.

Fixes #2101.

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

13 years agonet, syscall, os: set CLOEXEC flag on epoll/kqueue descriptor
Ian Lance Taylor [Mon, 19 Dec 2011 20:57:49 +0000 (12:57 -0800)]
net, syscall, os: set CLOEXEC flag on epoll/kqueue descriptor
Enable new test in os.

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

13 years agogc: avoid unsafe in defn of package runtime
Russ Cox [Mon, 19 Dec 2011 20:52:15 +0000 (15:52 -0500)]
gc: avoid unsafe in defn of package runtime

Keeps -u tracking simple.

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

13 years agoruntime: separate out auto-generated files, take 2
Russ Cox [Mon, 19 Dec 2011 20:51:13 +0000 (15:51 -0500)]
runtime: separate out auto-generated files, take 2

This is like the ill-fated CL 5493063 except that
I have written a shell script (autogen.sh) instead of
thinking I could possibly write a correct Makefile.

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

13 years agoencoding/json: cleanup leftover variables in array decoding.
Rémy Oudompheng [Mon, 19 Dec 2011 20:32:06 +0000 (15:32 -0500)]
encoding/json: cleanup leftover variables in array decoding.

An old update for API changes in reflect package left several
helper variables that do not have a meaning anymore, and
the type checking of arrays vs slices was broken.
Fixes #2513.

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

13 years agostrconv: reduce buffer size for multi-precision decimals.
Rémy Oudompheng [Mon, 19 Dec 2011 20:03:53 +0000 (15:03 -0500)]
strconv: reduce buffer size for multi-precision decimals.

The longest numbers we have to represent are the smallest denormals.
Their decimal mantissa is not longer than 5^1100. Taking into
account some extra size for in-place operations, 800 digits are
enough. This saves time used for zero intiialization of extra
bytes.

                                        old ns/op  new ns/op    delta
strconv_test.BenchmarkAtof64Decimal           521        334   -35.9%
strconv_test.BenchmarkAtof64Float             572        391   -31.6%
strconv_test.BenchmarkAtof64FloatExp        10242      10036    -2.0%
strconv_test.BenchmarkAtof64Big              4229       4029    -4.7%
strconv_test.BenchmarkFormatFloatDecimal     1396        934   -33.1%
strconv_test.BenchmarkFormatFloat            4295       3341   -22.2%
strconv_test.BenchmarkFormatFloatExp        12035      11181    -7.1%
strconv_test.BenchmarkFormatFloatBig         4213       3229   -23.4%
strconv_test.BenchmarkAppendFloatDecimal     1031        600   -41.8%
strconv_test.BenchmarkAppendFloat            3971       3044   -23.3%
strconv_test.BenchmarkAppendFloatExp        11699      11003    -5.9%
strconv_test.BenchmarkAppendFloatBig         3836       2915   -24.0%

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

13 years agoexec: add test to verify net package's epoll fd doesn't go to child
Brad Fitzpatrick [Mon, 19 Dec 2011 17:23:07 +0000 (09:23 -0800)]
exec: add test to verify net package's epoll fd doesn't go to child

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

13 years agosyscall: Changes to the syscall package to support NetBSD.
Christopher Nielsen [Mon, 19 Dec 2011 16:57:58 +0000 (03:57 +1100)]
syscall: Changes to the syscall package to support NetBSD.

Not all syscalls are implemented, but many are. On the suggestion
of Joel Sing <jsing@google.com>, the generated files were added
with hg add instead of hg cp, since they are generated on an OS
dependant basis.

R=golang-dev, jsing, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5491050

13 years agocrypto/tls: don't assume an RSA private key in the API.
Adam Langley [Mon, 19 Dec 2011 15:39:30 +0000 (10:39 -0500)]
crypto/tls: don't assume an RSA private key in the API.

We still very much assume it in the code, but with this change in
place we can implement other things later without changing and users
of the package.

Fixes #2319.

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

13 years agonet/http: test both texta and textb values, not texta twice
Alex Brainman [Mon, 19 Dec 2011 06:31:20 +0000 (17:31 +1100)]
net/http: test both texta and textb values, not texta twice

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

13 years agoio/ioutil: close file in TestWriteFile before deleting it
Alex Brainman [Mon, 19 Dec 2011 06:30:14 +0000 (17:30 +1100)]
io/ioutil: close file in TestWriteFile before deleting it

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

13 years agodashboard: improve formatting of build status page
Andrew Gerrand [Mon, 19 Dec 2011 05:57:25 +0000 (16:57 +1100)]
dashboard: improve formatting of build status page

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

13 years agobuilder: send commit time to dashboard
Andrew Gerrand [Mon, 19 Dec 2011 05:57:03 +0000 (16:57 +1100)]
builder: send commit time to dashboard

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

13 years agoarchive/zip: add SetModTime method to FileHeader
Andrew Gerrand [Mon, 19 Dec 2011 03:59:41 +0000 (14:59 +1100)]
archive/zip: add SetModTime method to FileHeader

Fixes #2574.

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

13 years agodashboard: hide build status column (package builder is out of action)
Andrew Gerrand [Mon, 19 Dec 2011 01:37:39 +0000 (12:37 +1100)]
dashboard: hide build status column (package builder is out of action)

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

13 years agohtml: handle text nodes in foreign content.
Nigel Tao [Mon, 19 Dec 2011 01:20:00 +0000 (12:20 +1100)]
html: handle text nodes in foreign content.

Passes tests10.dat, test 6:
<!DOCTYPE html><body><table><svg><g>foo</g></svg></table>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <svg svg>
|       <svg g>
|         "foo"
|     <table>

Also pass tests through test 12:
<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>

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

13 years agoencoding/json: examples for Marshal and Unmarshal
Andrew Gerrand [Mon, 19 Dec 2011 00:16:55 +0000 (11:16 +1100)]
encoding/json: examples for Marshal and Unmarshal

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

13 years agotext/template: fix handing of nil arguments to functions
Gustavo Niemeyer [Mon, 19 Dec 2011 00:14:11 +0000 (22:14 -0200)]
text/template: fix handing of nil arguments to functions

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

13 years agovim: fix go filetype detection
Paul Sbarra [Sun, 18 Dec 2011 23:42:32 +0000 (10:42 +1100)]
vim: fix go filetype detection

The filetype needs to be set during BufRead in order for the did_filetype() check to prevent the file being detected as a conf file.  One example where this can occur is if a cgo file has a #include at the top of the file.  The # is detected in vim's generic configuration (conf file) toward the bottom of filetype.vim

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

13 years agodoc: suggest code.google.com/p/go instead of go.googlecode.com/hg
Andrew Gerrand [Sun, 18 Dec 2011 23:17:44 +0000 (10:17 +1100)]
doc: suggest code.google.com/p/go instead of go.googlecode.com/hg

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