]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agotesting: fix the fix to the wording about the bug
Rob Pike [Thu, 22 Dec 2011 19:23:10 +0000 (11:23 -0800)]
testing: fix the fix to the wording about the bug
TBR=rsc

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

13 years agotesting: fix wording in explanation of potential bug
Rob Pike [Thu, 22 Dec 2011 19:08:51 +0000 (11:08 -0800)]
testing: fix wording in explanation of potential bug
TBR=rsc

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

13 years agotesting: make signalling safer for parallel tests
Rob Pike [Thu, 22 Dec 2011 18:43:54 +0000 (10:43 -0800)]
testing: make signalling safer for parallel tests
Each test gets a private signal channel.
Also fix a bug that prevented parallel tests from running.

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

13 years agotesting: compare Log to Println
Robert Hencke [Thu, 22 Dec 2011 18:05:51 +0000 (10:05 -0800)]
testing: compare Log to Println

Log always adds spaces between operands, like Println but unlike Print

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

13 years agogc: better linenumbers for inlined functions
Luuk van Dijk [Thu, 22 Dec 2011 16:31:54 +0000 (17:31 +0100)]
gc: better linenumbers for inlined functions

Fixes #2580 up to a point.

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

13 years agoexp/terminal: several cleanups
Adam Langley [Thu, 22 Dec 2011 16:23:57 +0000 (11:23 -0500)]
exp/terminal: several cleanups

1) Add EscapeCodes to the terminal so that applications don't wire
   them in.
2) Add a callback for auto-complete
3) Fix an issue with input lines longer than the width of the
   terminal.
4) Have Write() not stomp the current line. It now erases the current
   input, writes the output and reprints the prompt and partial input.
5) Support prompting without local echo in Terminal.
6) Add GetSize to report the size of terminal.

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

13 years agosyscall: make pipe work on netbsd
Joel Sing [Thu, 22 Dec 2011 15:47:48 +0000 (02:47 +1100)]
syscall: make pipe work on netbsd

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

13 years agoos: update package location of exec to os/exec in comments
Brad Fitzpatrick [Thu, 22 Dec 2011 15:25:43 +0000 (07:25 -0800)]
os: update package location of exec to os/exec in comments

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

13 years agodashboard: horizontal crunch
Russ Cox [Thu, 22 Dec 2011 15:22:38 +0000 (10:22 -0500)]
dashboard: horizontal crunch

* group builders in to columns by OS
* drop builder suffix (moved to hover title)
* cut all domain names from email (full name+email in hover title)
* make ok smaller

This should easily give us room for netbsd and plan9,
even on small laptop screens.

Running at http://build-rsc.golang.org/.

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

13 years agodashboard: do not require key in source code
Russ Cox [Thu, 22 Dec 2011 15:21:59 +0000 (10:21 -0500)]
dashboard: do not require key in source code

Or else eventually someone will check it in.

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

13 years agocmd/go: fix windows build
Mikio Hara [Thu, 22 Dec 2011 15:14:59 +0000 (00:14 +0900)]
cmd/go: fix windows build

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

13 years agocmd/gc: make sure use of pthread for gcc-4.5 and beyond
Mikio Hara [Thu, 22 Dec 2011 14:18:34 +0000 (23:18 +0900)]
cmd/gc: make sure use of pthread for gcc-4.5 and beyond

R=golang-dev, rsc, n13m3y3r, rogpeppe
CC=golang-dev
https://golang.org/cl/5501060

13 years agosyscall: make getdirentries work on netbsd
Joel Sing [Thu, 22 Dec 2011 12:42:43 +0000 (23:42 +1100)]
syscall: make getdirentries work on netbsd

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

13 years agodoc: refer to http://build.golang.org/ where applicable
Robert Hencke [Thu, 22 Dec 2011 03:21:25 +0000 (14:21 +1100)]
doc: refer to http://build.golang.org/ where applicable

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

13 years agoexec: disable the ExtraFiles test on darwin
Brad Fitzpatrick [Thu, 22 Dec 2011 01:08:16 +0000 (17:08 -0800)]
exec: disable the ExtraFiles test on darwin

Still a mystery. New issue 2603 filed.

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

13 years agoruntime: don't panic on SIGILL, just crash
Ian Lance Taylor [Wed, 21 Dec 2011 23:45:36 +0000 (15:45 -0800)]
runtime: don't panic on SIGILL, just crash

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

13 years agodashboard: delete old build dashboard code
Andrew Gerrand [Wed, 21 Dec 2011 22:53:52 +0000 (09:53 +1100)]
dashboard: delete old build dashboard code

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

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