]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agonet: enable SO_REUSEADDR, SO_REUSEPORT options on stream, multicast listeners only
Mikio Hara [Sat, 11 Feb 2012 02:50:51 +0000 (11:50 +0900)]
net: enable SO_REUSEADDR, SO_REUSEPORT options on stream, multicast listeners only

This CL changes default SOL_SOCKET settings to mitigate connect
failure on OpenBSD or similar platforms which support randomized
transport protocol port number assignment.

Fixes #2830.

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

13 years agofix build: update image/png test
Robert Griesemer [Sat, 11 Feb 2012 01:26:40 +0000 (17:26 -0800)]
fix build: update image/png test

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

13 years agoflate: delete WrongValueError type.
Nigel Tao [Sat, 11 Feb 2012 01:09:11 +0000 (12:09 +1100)]
flate: delete WrongValueError type.

Fixes #2838.

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

13 years agonet/http: fix reference to URL.RawPath in docs
Bjorn Tipling [Sat, 11 Feb 2012 00:39:57 +0000 (22:39 -0200)]
net/http: fix reference to URL.RawPath in docs

R=go.peter.90, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5655053

13 years agoCONTRIBUTORS: add Bjorn Tipling <bjorn.tipling@gmail.com>
Gustavo Niemeyer [Sat, 11 Feb 2012 00:35:42 +0000 (22:35 -0200)]
CONTRIBUTORS: add Bjorn Tipling <bjorn.tipling@gmail.com>

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

13 years agocmd/dist: reset version during bootstrap
Gustavo Niemeyer [Sat, 11 Feb 2012 00:26:36 +0000 (22:26 -0200)]
cmd/dist: reset version during bootstrap

Fixes #2927.

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

13 years agocompress: add comments to gzip and zlib.
Nigel Tao [Fri, 10 Feb 2012 22:42:07 +0000 (09:42 +1100)]
compress: add comments to gzip and zlib.

Fixes #2939.

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

13 years agocmd/gc: suspend safemode during typecheck of inlined bodies.
Luuk van Dijk [Fri, 10 Feb 2012 21:50:55 +0000 (22:50 +0100)]
cmd/gc: suspend safemode during typecheck of inlined bodies.

Should be obviously correct.  Includes minimal test case.
A future CL should clear up the logic around typecheckok and importpkg != nil someday.

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

13 years agoos,syscall: fix windows build
Brad Fitzpatrick [Fri, 10 Feb 2012 21:47:19 +0000 (08:47 +1100)]
os,syscall: fix windows build

make syscall.ProcAttr.Files be []uintptr

all.bash passes on Linux.
things seem to compile on GOOS={darwin,windows}

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

13 years agoexp/types: Use build.FindTree in GcImporter
James Whitehead [Fri, 10 Feb 2012 21:35:03 +0000 (13:35 -0800)]
exp/types: Use build.FindTree in GcImporter

Fixes #2932

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

13 years agogo/printer: test that formatted code is parseable
Robert Griesemer [Fri, 10 Feb 2012 21:28:29 +0000 (13:28 -0800)]
go/printer: test that formatted code is parseable

- Added test case for issue 1542.

Fixes #1542.

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

13 years agogo/printer: implement SourcePos mode
Robert Griesemer [Fri, 10 Feb 2012 21:27:32 +0000 (13:27 -0800)]
go/printer: implement SourcePos mode

If a printer is configured with the SourcePos mode
set, it will emit //-line comments as necessary to
ensure that the result - if reparsed - reflects the
original source position information.

This change required a bit of reworking of the
output section in printer.go. Specifically:

- Introduced new Config mode 'SourcePos'.

- Introduced new position 'out' which tracks the
position of the generated output if it were read
in again. If there is a discrepancy between out
and the current AST/source position, a //line
comment is emitted to correct for it.

- Lazy emission of indentation so that //line
comments can be placed correctly. As a result,
the trimmer will have to do less work.

- Merged writeItem into writeString.

- Merged writeByteN into writeByte.

- Use a []byte instead of a byte.Buffer both in the
printer and in the trimmer (eliminates dependency).

Also: introduced explicit printer.Mode type (in
sync w/ parser.Mode, scanner.Mode, etc.)

Runs all tests. Applied gofmt to src, misc w/o changes.

Fixes #1047.
Fixes #2697.

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

13 years agocompress: make flate, gzip and zlib's NewWriterXxx functions all return
Nigel Tao [Fri, 10 Feb 2012 07:49:19 +0000 (18:49 +1100)]
compress: make flate, gzip and zlib's NewWriterXxx functions all return
(*Writer, error) if they take a compression level, and *Writer otherwise.
Rename gzip's Compressor and Decompressor to Writer and Reader, similar to
flate and zlib.

Clarify commentary when writing gzip metadata that is not representable
as Latin-1, and fix io.EOF comment bug.

Also refactor gzip_test to be more straightforward.

Fixes #2839.

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

13 years agobuilder: set $GOBUILDEXIT for Windows
Russ Cox [Fri, 10 Feb 2012 06:27:59 +0000 (01:27 -0500)]
builder: set $GOBUILDEXIT for Windows

Actually %GOBUILDEXIT% I suppose.

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

13 years agoregexp/syntax: delete old package comment
Russ Cox [Fri, 10 Feb 2012 06:11:56 +0000 (01:11 -0500)]
regexp/syntax: delete old package comment

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

13 years agoall.bat: report error code back to the gobuilder
Alex Brainman [Fri, 10 Feb 2012 05:29:50 +0000 (16:29 +1100)]
all.bat: report error code back to the gobuilder

not sure that it will work, but.

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

13 years agodebug/macho: dropped monstrous URL from package comment
Andrew Gerrand [Fri, 10 Feb 2012 05:03:24 +0000 (16:03 +1100)]
debug/macho: dropped monstrous URL from package comment

Relax. It's still in macho.go.

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

13 years agoregexp/syntax: add package and Parse commentary
Rob Pike [Fri, 10 Feb 2012 04:57:12 +0000 (15:57 +1100)]
regexp/syntax: add package and Parse commentary

Fixes #2954.

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

13 years agomath: fix gamma doc, link to OEIS
Rob Pike [Fri, 10 Feb 2012 04:56:51 +0000 (15:56 +1100)]
math: fix gamma doc, link to OEIS

Fixes #2940.

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

13 years agodashboard: add gobuilder -fail mode
Russ Cox [Fri, 10 Feb 2012 04:46:48 +0000 (23:46 -0500)]
dashboard: add gobuilder -fail mode

This is for filling a column with "fail", like I just did for
Windows, when the builder would get stuck running that
build.  (We have safeguards against the tests getting stuck
but this was the bootstrap build getting stuck.)

I usually use -cmd=/bin/false, but this avoids the Mercurial
checkouts, which means it runs instantly instead of requiring
~1 minute per "fail".

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

13 years agodist: prevent recusive loop on windows when fatal() is called.
Daniel Theophanes [Fri, 10 Feb 2012 04:10:27 +0000 (23:10 -0500)]
dist: prevent recusive loop on windows when fatal() is called.

Fixes #2931.

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

13 years agoreflect: documentation tweaks
Rob Pike [Fri, 10 Feb 2012 04:09:09 +0000 (15:09 +1100)]
reflect: documentation tweaks

Fixes #2952.

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

13 years agoos/exec: add Cmd.Waitmsg, fix a misleading comment
Brad Fitzpatrick [Fri, 10 Feb 2012 03:52:08 +0000 (14:52 +1100)]
os/exec: add Cmd.Waitmsg, fix a misleading comment

Fixes #2948

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

13 years agostrings: delete method comments implied by interface satisfaction
Rob Pike [Fri, 10 Feb 2012 03:45:11 +0000 (14:45 +1100)]
strings: delete method comments implied by interface satisfaction

Fixes #2957.

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

13 years agotesting/quick: documentation tweaks
Rob Pike [Fri, 10 Feb 2012 03:37:50 +0000 (14:37 +1100)]
testing/quick: documentation tweaks

Fixes #2960.

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

13 years agotesting/iotest: adjust adverbial imprecision in package comment
Rob Pike [Fri, 10 Feb 2012 03:37:20 +0000 (14:37 +1100)]
testing/iotest: adjust adverbial imprecision in package comment

Fixes #2959.

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

13 years agotesting/script: delete
Rob Pike [Fri, 10 Feb 2012 03:31:08 +0000 (14:31 +1100)]
testing/script: delete
Dead code.

Fixes #2961.

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

13 years agounicode: various documentation tweaks
Rob Pike [Fri, 10 Feb 2012 03:30:44 +0000 (14:30 +1100)]
unicode: various documentation tweaks

The comment on IsOneOf regarding Latin-1 was an implementation detail:
when the function is called internally, that condition is true. It used to matter,
but now the comment is a dreg. The function works fine if the character is
Latin-1, so we just delete the comment.

Fixes #2966.

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

13 years agotemplate: refer HTML users to html/template
Rob Pike [Fri, 10 Feb 2012 03:21:36 +0000 (14:21 +1100)]
template: refer HTML users to html/template

Fixes #2963.

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

13 years agoos: delete Exec, NewFile takes uintptr, rename ShellExpand, doc fixes
Brad Fitzpatrick [Fri, 10 Feb 2012 03:16:15 +0000 (14:16 +1100)]
os: delete Exec, NewFile takes uintptr, rename ShellExpand, doc fixes

Delete O_NDELAY, O_NONBLOCK, O_NOCTTY, O_ASYNC.

Clean up some docs.

Rename ShellExpand -> ExpandEnv.

Make NewFile take a uintptr; change File.Fd to return one.
(for API compatibility between Unix and Windows)

Fixes #2947

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

13 years agounicode/utf8: document return value for decode errors
Rob Pike [Fri, 10 Feb 2012 03:12:17 +0000 (14:12 +1100)]
unicode/utf8: document return value for decode errors
Also replace archaic definition of rune.

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

13 years agotime: improve commentary about standard time and formatting/parsing
Rob Pike [Fri, 10 Feb 2012 02:52:19 +0000 (13:52 +1100)]
time: improve commentary about standard time and formatting/parsing

Fixes #2965.

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

13 years agotesting: fix references to "gotest"
Rob Pike [Fri, 10 Feb 2012 02:49:50 +0000 (13:49 +1100)]
testing: fix references to "gotest"

Fixes #2958.

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

13 years agomake.bat: remove double quotes
Alex Brainman [Fri, 10 Feb 2012 00:48:22 +0000 (11:48 +1100)]
make.bat: remove double quotes

Fixes #2974.

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

13 years agoos: remove Time; callers should use time.Time.
Brad Fitzpatrick [Fri, 10 Feb 2012 00:44:51 +0000 (11:44 +1100)]
os: remove Time; callers should use time.Time.

Part of issue 2947

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

13 years agonet/http/fcgi: don't mention threads in docs
Brad Fitzpatrick [Thu, 9 Feb 2012 23:29:57 +0000 (10:29 +1100)]
net/http/fcgi: don't mention threads in docs

Fixes #2942

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

13 years agotext/scanner: update comments
Robert Griesemer [Thu, 9 Feb 2012 23:26:08 +0000 (15:26 -0800)]
text/scanner: update comments

Fixes #2962.

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

13 years agoregexp: name result parameters referenced from docs
Brad Fitzpatrick [Thu, 9 Feb 2012 23:22:01 +0000 (10:22 +1100)]
regexp: name result parameters referenced from docs

Fixes #2953

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

13 years agodatabase/sql: remove Into from ScannerInto/ScanInto
Brad Fitzpatrick [Thu, 9 Feb 2012 23:20:49 +0000 (10:20 +1100)]
database/sql: remove Into from ScannerInto/ScanInto

Also fix a doc error.

Fixes #2843

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

13 years agocontainer/heap: add example
Rob Pike [Thu, 9 Feb 2012 23:07:55 +0000 (10:07 +1100)]
container/heap: add example
godoc doesn't have the fu to present the example well, but this gives
us an example of an example to develop example fu.

Fixes #2840.

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

13 years agocmd/api: follow constant references
Brad Fitzpatrick [Thu, 9 Feb 2012 23:05:26 +0000 (10:05 +1100)]
cmd/api: follow constant references

For gccgo. Also removes bunch of special cases.

Fixes #2906

R=golang-dev, remyoudompheng
CC=golang-dev
https://golang.org/cl/5644050

13 years agonet/http: add ServeContent
Brad Fitzpatrick [Thu, 9 Feb 2012 23:02:06 +0000 (10:02 +1100)]
net/http: add ServeContent

Fixes #2039

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

13 years agoencoding/binary: another attempt to describe the type of Read and Write's data
Rob Pike [Thu, 9 Feb 2012 22:55:48 +0000 (09:55 +1100)]
encoding/binary: another attempt to describe the type of Read and Write's data

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

13 years agocmd/dist: fix GOROOT_FINAL
Gustavo Niemeyer [Thu, 9 Feb 2012 22:47:12 +0000 (20:47 -0200)]
cmd/dist: fix GOROOT_FINAL

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

13 years agoencoding/hex: vet the test prints
Rob Pike [Thu, 9 Feb 2012 22:44:56 +0000 (09:44 +1100)]
encoding/hex: vet the test prints

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

13 years agocompress/gzip: remove dead code
Alex Brainman [Thu, 9 Feb 2012 22:33:51 +0000 (09:33 +1100)]
compress/gzip: remove dead code

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

13 years agodatabase/sql: support ErrSkip in Tx.Exec
Andrew Balholm [Thu, 9 Feb 2012 22:19:22 +0000 (09:19 +1100)]
database/sql: support ErrSkip in Tx.Exec

If the database driver supports the Execer interface but returns
ErrSkip, calling Exec on a transaction was returning the error instead
of using the slow path.

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

13 years agocmd/dist: do not use HEAP_GENERATE_EXCEPTIONS flag
Alex Brainman [Thu, 9 Feb 2012 22:14:00 +0000 (09:14 +1100)]
cmd/dist: do not use HEAP_GENERATE_EXCEPTIONS flag

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

13 years agodatabase/sql: rename ErrTransactionFinished to ErrTxDone
Brad Fitzpatrick [Thu, 9 Feb 2012 22:12:32 +0000 (09:12 +1100)]
database/sql: rename ErrTransactionFinished to ErrTxDone

Part of issue 2843

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

13 years agoruntime: Linux/ARM: exit early on OABI systems, and give an error message
Shenghou Ma [Thu, 9 Feb 2012 21:18:21 +0000 (16:18 -0500)]
runtime: Linux/ARM: exit early on OABI systems, and give an error message
Fixes #2533.

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

13 years agostrings: add Seek method to Reader
Brad Fitzpatrick [Thu, 9 Feb 2012 06:28:41 +0000 (17:28 +1100)]
strings: add Seek method to Reader

strings.Reader is already stateful and read-only.

This permits a *Reader with http.ServeContent.

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

13 years agoos: talk about errors and PathError in the package documentation
Rob Pike [Thu, 9 Feb 2012 05:55:36 +0000 (16:55 +1100)]
os: talk about errors and PathError in the package documentation

Fixes #2383.

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

13 years agoruntime: fix compiler warnings
Russ Cox [Thu, 9 Feb 2012 05:48:52 +0000 (16:48 +1100)]
runtime: fix compiler warnings

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

13 years agonet/http/httptest: add a test
Brad Fitzpatrick [Thu, 9 Feb 2012 05:45:24 +0000 (16:45 +1100)]
net/http/httptest: add a test

Less ironic. Don't you think?

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

13 years agogc: implicit type bug fix in export data
Russ Cox [Thu, 9 Feb 2012 05:26:08 +0000 (00:26 -0500)]
gc: implicit type bug fix in export data

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

13 years agodatabase/sql: more tests
Brad Fitzpatrick [Thu, 9 Feb 2012 04:01:29 +0000 (15:01 +1100)]
database/sql: more tests

Higher level tests for the pointer parameters
and scanning, complementing the existing ones
included in the previous CL.

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

13 years agogobuilder: fix windows builder
Alex Brainman [Thu, 9 Feb 2012 03:52:01 +0000 (14:52 +1100)]
gobuilder: fix windows builder

Do not rewrite commands if they have .bash extnsion.
Use path/filepath to manipulate file paths everywhere.
Use all.bat on windows, not all.bash.
Use HOMEDRIVE/HOMEPATH to find .gobuildkey on windows.

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

13 years agolog/syslog: fix documentation for NewLogger
Rob Pike [Thu, 9 Feb 2012 03:40:56 +0000 (14:40 +1100)]
log/syslog: fix documentation for NewLogger
Fixes #2798.

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

13 years agofmt: scan FALSE correctly
Rob Pike [Thu, 9 Feb 2012 03:12:55 +0000 (14:12 +1100)]
fmt: scan FALSE correctly

Fixes bug 2922.

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

13 years agocmd/go: rearrange help for 'go test'
Rob Pike [Thu, 9 Feb 2012 03:12:18 +0000 (14:12 +1100)]
cmd/go: rearrange help for 'go test'
Put the 'go test' flags into 'go help test', so 'go help testflags'
is about the flags for the compiled test binary.

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

13 years agonet/http: remove an errant space
Brad Fitzpatrick [Thu, 9 Feb 2012 03:10:36 +0000 (14:10 +1100)]
net/http: remove an errant space

Made the godoc overview section oddly indented
compared to the other code blocks.

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

13 years agogo/doc: Handle recursive embedded types.
Gary Burd [Thu, 9 Feb 2012 00:54:48 +0000 (16:54 -0800)]
go/doc: Handle recursive embedded types.

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

13 years agoencoding/binary: slices are allowed; say so
Rob Pike [Thu, 9 Feb 2012 00:42:10 +0000 (11:42 +1100)]
encoding/binary: slices are allowed; say so

Fixes #2629.

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

13 years agoencoding/binary: add Size, to replace the functionality of the old TotalSize
Rob Pike [Thu, 9 Feb 2012 00:26:03 +0000 (11:26 +1100)]
encoding/binary: add Size, to replace the functionality of the old TotalSize

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

13 years agomisc/dist: new hierarchy for binary distribution packaging scripts
Andrew Gerrand [Thu, 9 Feb 2012 00:15:14 +0000 (11:15 +1100)]
misc/dist: new hierarchy for binary distribution packaging scripts

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

13 years agotext/template/parse: fix comment
Mikio Hara [Wed, 8 Feb 2012 22:47:48 +0000 (07:47 +0900)]
text/template/parse: fix comment

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

13 years agodoc: new document about compatibility of releases
Rob Pike [Wed, 8 Feb 2012 22:42:40 +0000 (09:42 +1100)]
doc: new document about compatibility of releases
The doc is not linked anywhere yet; that will come later.

R=golang-dev, adg, gri, rsc, edsrzf
CC=golang-dev
https://golang.org/cl/5647050

13 years agoruntime: fix "SysReserve returned unaligned address" bug on 32-bit systems
Shenghou Ma [Wed, 8 Feb 2012 22:25:10 +0000 (09:25 +1100)]
runtime: fix "SysReserve returned unaligned address" bug on 32-bit systems

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

13 years agobytes.Buffer: return error in WriteTo if buffer is not drained
Rob Pike [Wed, 8 Feb 2012 21:58:40 +0000 (08:58 +1100)]
bytes.Buffer: return error in WriteTo if buffer is not drained

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

13 years agolog/syslog: return length of data provided by the user, not length of header
Rob Pike [Wed, 8 Feb 2012 21:36:13 +0000 (08:36 +1100)]
log/syslog: return length of data provided by the user, not length of header

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

13 years agocmd/dist: redure max background tasks nr. when building on ARM
Shenghou Ma [Wed, 8 Feb 2012 21:26:00 +0000 (16:26 -0500)]
cmd/dist: redure max background tasks nr. when building on ARM

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

13 years agocmd/go: let go tool invocation use stdin
Russ Cox [Wed, 8 Feb 2012 21:14:24 +0000 (16:14 -0500)]
cmd/go: let go tool invocation use stdin

Fixes #2921.

R=golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5647057

13 years agospec: address CL 5647054 comments
Russ Cox [Wed, 8 Feb 2012 20:37:58 +0000 (15:37 -0500)]
spec: address CL 5647054 comments

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

13 years agocmd/dist: make 'make' quieter for developers
Russ Cox [Wed, 8 Feb 2012 20:26:47 +0000 (15:26 -0500)]
cmd/dist: make 'make' quieter for developers

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

13 years agospec: send on closed channel counts as "proceeding"
Russ Cox [Wed, 8 Feb 2012 20:24:48 +0000 (15:24 -0500)]
spec: send on closed channel counts as "proceeding"

Other wordings are possible but defining this as one
of the ways to proceed means we don't have to add
language about this to the description of select.

Fixes #2825.

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

13 years agodoc/go1: mention that the compiler catches TotalSize and NewReaderSize
Rob Pike [Wed, 8 Feb 2012 20:09:52 +0000 (07:09 +1100)]
doc/go1: mention that the compiler catches TotalSize and NewReaderSize
Today is Size day and the compiler will reject old code using these functions.

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

13 years agogo/scanner: clean up error interface
Robert Griesemer [Wed, 8 Feb 2012 19:41:32 +0000 (11:41 -0800)]
go/scanner: clean up error interface

Issue 2856 asks for a rename of a few methods to a
more idiomatic Go style. This is a very early API
that evolved organically throughout the years.
Together with the fact that ErrorVectors were embedded
in other data structures (e.g. Parser), just renaming
methods (e.g. GetError -> Error) would lead to undesired
behavior (e.g., Parser would act like an Error). Instead,
cleaned up API a bit more:

- removed ErrorVector in favor of ErrorList (already
present)
- simplified Scanner.Init by making the error handler a
function instead of requiring an ErrorHandler implementation
- adjusted helper functions accordingly
- updated Go 1 doc

Fixes #2856.

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

13 years agoruntime: drop to 32 bit malloc if 64 bit will not work
Paul Borman [Wed, 8 Feb 2012 19:39:16 +0000 (14:39 -0500)]
runtime: drop to 32 bit malloc if 64 bit will not work

On 64 bit UML it is not possible to reserve memory at 0xF8<<32.
Detect when linux cannot use these high virtual memory addresses
and drop back to the 32 bit memory allocator.

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

13 years agocmd/dist: pass correct -DGOARCH_$GOARCH flag to gcc.
Shenghou Ma [Wed, 8 Feb 2012 19:36:38 +0000 (14:36 -0500)]
cmd/dist: pass correct -DGOARCH_$GOARCH flag to gcc.

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

13 years agospec: disallow recursive embedded interfaces
Russ Cox [Wed, 8 Feb 2012 19:35:00 +0000 (14:35 -0500)]
spec: disallow recursive embedded interfaces

Fixes #1814.

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

13 years agospec: add forward links from 'method set' to where it gets used
Russ Cox [Wed, 8 Feb 2012 19:28:51 +0000 (14:28 -0500)]
spec: add forward links from 'method set' to where it gets used

Fixes #1797.

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

13 years agonet/http: panic on duplicate registrations
Russ Cox [Wed, 8 Feb 2012 18:50:00 +0000 (13:50 -0500)]
net/http: panic on duplicate registrations

Otherwise, the registration semantics are
init-order-dependent, which I was trying very hard
to avoid in the API.  This may break broken programs.

Fixes #2900.

R=golang-dev, r, bradfitz, dsymonds, balasanjay, kevlar
CC=golang-dev
https://golang.org/cl/5644051

13 years agoencoding/json: document buffering
Russ Cox [Wed, 8 Feb 2012 18:48:03 +0000 (13:48 -0500)]
encoding/json: document buffering

Fixes #1955.

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

13 years agogofmt: replace defunct test.sh with a go test
Robert Griesemer [Wed, 8 Feb 2012 16:47:02 +0000 (08:47 -0800)]
gofmt: replace defunct test.sh with a go test

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

13 years agocmd/dist: fix copying of cmd/prof
Dmitriy Vyukov [Wed, 8 Feb 2012 16:15:17 +0000 (20:15 +0400)]
cmd/dist: fix copying of cmd/prof

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

13 years agocmd/dist: pass -m32 or -m64 to link too, not just compile
Russ Cox [Wed, 8 Feb 2012 16:12:14 +0000 (11:12 -0500)]
cmd/dist: pass -m32 or -m64 to link too, not just compile

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

13 years agoruntime, pprof: add profiling of thread creation
Russ Cox [Wed, 8 Feb 2012 15:33:54 +0000 (10:33 -0500)]
runtime, pprof: add profiling of thread creation

Same idea as heap profile: how did each thread get created?
Low memory (256 bytes per OS thread), high reward for
programs that suddenly have many threads running.

Fixes #1477.

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

13 years ago6g,8g: make constant propagation inlining-friendly.
Jamie Gennis [Wed, 8 Feb 2012 15:25:13 +0000 (10:25 -0500)]
6g,8g: make constant propagation inlining-friendly.

This changes makes constant propagation compare 'from' values using node
pointers rather than symbol names when checking to see whether a set
operation is redundant. When a function is inlined multiple times in a
calling function its arguments will share symbol names even though the values
are different. Prior to this fix the bug409 test would hit a case with 6g
where an LEAQ instruction was incorrectly eliminated from the second inlined
function call. 8g appears to have had the same bug, but the test did not fail
there.

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

13 years agoCONTRIBUTORS: code review email for Jamie Gennis
Russ Cox [Wed, 8 Feb 2012 15:25:03 +0000 (10:25 -0500)]
CONTRIBUTORS: code review email for Jamie Gennis

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

13 years agoregexp: fix typo
Russ Cox [Wed, 8 Feb 2012 13:59:59 +0000 (08:59 -0500)]
regexp: fix typo

Fixes #2918.

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

13 years agodatabase/sql: treat pointers as nullable types like encoding/json
Andrew Pritchard [Wed, 8 Feb 2012 06:14:15 +0000 (17:14 +1100)]
database/sql: treat pointers as nullable types like encoding/json

- convert from nil pointers to the nil interface{}
- dereference non-nil pointers
- convert from nil interface{}s to nil pointers
- allocate pointers for non-nil interface{}s
- tests for all of the above

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

13 years agocmd/go: connect os.Stdin for go run
Brad Fitzpatrick [Wed, 8 Feb 2012 05:30:28 +0000 (16:30 +1100)]
cmd/go: connect os.Stdin for go run

Fixes #2875

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

13 years agocmd/dist: respect $CC, as quietgcc.bash used to
Russ Cox [Wed, 8 Feb 2012 05:22:38 +0000 (00:22 -0500)]
cmd/dist: respect $CC, as quietgcc.bash used to

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

13 years agoA+C: add Andrew Pritchard (Individual CLA)
Brad Fitzpatrick [Wed, 8 Feb 2012 05:12:21 +0000 (16:12 +1100)]
A+C: add Andrew Pritchard (Individual CLA)

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

13 years agoregexp: allow substitutions in Replace, ReplaceString
Russ Cox [Wed, 8 Feb 2012 04:46:47 +0000 (23:46 -0500)]
regexp: allow substitutions in Replace, ReplaceString
Add Expand, ExpandString for access to the substitution functionality.

Fixes #2736.

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

13 years agotime: clean up MarshalJSON, add RFC3339 method
Russ Cox [Wed, 8 Feb 2012 04:37:25 +0000 (23:37 -0500)]
time: clean up MarshalJSON, add RFC3339 method
encoding/xml: handle time.Time as recognized type

The long term plan is to define an interface that time.Time
can implement and that encoding/xml can call, but we are
not going to try to define that interface before Go 1.
Instead, special-case time.Time in package xml, because
it is such a fundamental type, as a stop-gap.
The eventual methods will behave this way.

Fixes #2793.

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

13 years agostrconv: handle very large inputs
Russ Cox [Wed, 8 Feb 2012 04:37:15 +0000 (23:37 -0500)]
strconv: handle very large inputs

Fixes #2642.

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

13 years agofmt: diagnose invalid verb applied to pointer
Russ Cox [Wed, 8 Feb 2012 04:37:05 +0000 (23:37 -0500)]
fmt: diagnose invalid verb applied to pointer

Fixes #2851.

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

13 years agoruntime/cgo: silence warning on windows
Rob Pike [Wed, 8 Feb 2012 04:26:36 +0000 (15:26 +1100)]
runtime/cgo: silence warning on windows
It appears to want a * on an indirect function call (assembly language)

TBR=rsc

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

13 years ago5l: attempt to fix arm build
Rob Pike [Wed, 8 Feb 2012 04:12:56 +0000 (15:12 +1100)]
5l: attempt to fix arm build
TBR=rsc

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