1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00
Commit Graph

11712 Commits

Author SHA1 Message Date
Russ Cox
388816ae07 spec: disallow recursive embedded interfaces
Fixes #1814.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5647054
2012-02-08 14:35:00 -05:00
Russ Cox
fd2a511253 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
2012-02-08 14:28:51 -05:00
Russ Cox
d0dc68901a 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
2012-02-08 13:50:00 -05:00
Russ Cox
49110eaa22 encoding/json: document buffering
Fixes #1955.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5643058
2012-02-08 13:48:03 -05:00
Robert Griesemer
467f8751f9 gofmt: replace defunct test.sh with a go test
R=r, rsc
CC=golang-dev
https://golang.org/cl/5639053
2012-02-08 08:47:02 -08:00
Dmitriy Vyukov
bd37349485 cmd/dist: fix copying of cmd/prof
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5642059
2012-02-08 20:15:17 +04:00
Russ Cox
136f12f51f cmd/dist: pass -m32 or -m64 to link too, not just compile
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5646053
2012-02-08 11:12:14 -05:00
Russ Cox
5b93fc9da6 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
2012-02-08 10:33:54 -05:00
Jamie Gennis
fff732ea2c 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
2012-02-08 10:25:13 -05:00
Russ Cox
1460cce081 CONTRIBUTORS: code review email for Jamie Gennis
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5646051
2012-02-08 10:25:03 -05:00
Russ Cox
5957f914e2 regexp: fix typo
Fixes #2918.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5639062
2012-02-08 08:59:59 -05:00
Andrew Pritchard
cc39bb9068 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
2012-02-08 17:14:15 +11:00
Brad Fitzpatrick
878608bd29 cmd/go: connect os.Stdin for go run
Fixes #2875

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5641052
2012-02-08 16:30:28 +11:00
Russ Cox
3f6a517db6 cmd/dist: respect $CC, as quietgcc.bash used to
R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5641051
2012-02-08 00:22:38 -05:00
Brad Fitzpatrick
1a761fd002 A+C: add Andrew Pritchard (Individual CLA)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5646049
2012-02-08 16:12:21 +11:00
Russ Cox
7201ba2171 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
2012-02-07 23:46:47 -05:00
Russ Cox
1d8250c8b0 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
2012-02-07 23:37:25 -05:00
Russ Cox
3ee208533e strconv: handle very large inputs
Fixes #2642.

R=remyoudompheng, r, r
CC=golang-dev
https://golang.org/cl/5639052
2012-02-07 23:37:15 -05:00
Russ Cox
00134fe8ef fmt: diagnose invalid verb applied to pointer
Fixes #2851.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5644048
2012-02-07 23:37:05 -05:00
Rob Pike
0bd53d2ce0 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
2012-02-08 15:26:36 +11:00
Rob Pike
9af4b01654 5l: attempt to fix arm build
TBR=rsc

R=golang-dev
CC=golang-dev
https://golang.org/cl/5647049
2012-02-08 15:12:56 +11:00
Gustavo Niemeyer
0a7ad329e1 encoding/xml: add support for the omitempty flag
This also changes the behavior of attribute marshalling so
that strings and byte slices are marshalled even if empty.
The omitempty flag may be used to obtain the previous behavior.

Fixes #2899.

R=rsc
CC=golang-dev
https://golang.org/cl/5645050
2012-02-08 01:57:44 -02:00
Andrew Gerrand
63975807c9 tag weekly.2012-02-07
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5645052
2012-02-08 14:54:14 +11:00
Andrew Gerrand
d3f8f0c258 weekly.2012-02-07
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5615056
2012-02-08 14:37:47 +11:00
Andrew Gerrand
0a6e2461e3 archive/zip: tweak API and docs.
Fixes #2835.

R=golang-dev, n13m3y3r, r, bradfitz
CC=golang-dev
https://golang.org/cl/5645051
2012-02-08 14:34:40 +11:00
Rob Pike
90d43ad720 encoding/csv: document ReadAll behavior at EOF
Fixes #2847.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5641050
2012-02-08 14:24:04 +11:00
Brad Fitzpatrick
c02db82b83 net/http: don't ignore some errors in tests
to help debug Issue 2651

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5644049
2012-02-07 19:15:25 -08:00
Rob Pike
52ebadd356 encoding/binary: hide TotalSize
The function has a bizarre signature: it was the only public function there
that exposed the reflect package. Also, its definition is peculiar and hard to
explain. It doesn't merit being exported.

This is an API change but really, it should never have been exported and
it's certain very few programs will depend on it: it's too weird.

Fixes #2846.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5639054
2012-02-08 14:09:20 +11:00
Brad Fitzpatrick
f23a6dba5e cmd/api: compare multiple contexts
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5626045
2012-02-07 18:13:11 -08:00
Rob Pike
bb7b1a11d5 bufio: drop error return for NewReaderSize and NewWriterSize
It complicates the interface unnecessarily.
Document this in go1.html.
Also update the go/doc Makefile.

Fixes #2836.

R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5642054
2012-02-08 13:07:13 +11:00
Brad Fitzpatrick
518ee115b7 net/http/httputil: preserve query params in reverse proxy
Fixes #2853

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5642056
2012-02-07 18:00:30 -08:00
Rob Pike
92f55949f9 encoding/hex: canonicalize error type names
Also simplify the tests.

Fixes #2849.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5643045
2012-02-08 11:53:32 +11:00
Nigel Tao
5e381d3a9a image: delete the image.Repeated type.
R=r
CC=golang-dev
https://golang.org/cl/5636045
2012-02-08 11:41:47 +11:00
Rob Pike
2f8e5a5f88 io/ioutil: document EOF behavior in ReadFile and ReadAll
Fixes #2862.

R=golang-dev, n13m3y3r, iant
CC=golang-dev
https://golang.org/cl/5646048
2012-02-08 11:40:56 +11:00
Rob Pike
c5de9b773f bug408: delete
It's disabled and unreproducible.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5642053
2012-02-08 10:52:54 +11:00
Robert Griesemer
3d6b368514 go/printer, gofmt: don't print incorrect programs
Be careful when printing line comments with incorrect
position information. Maintain additional state
impliedSemi: when set, a comment containing a newline
would imply a semicolon and thus placement must be
delayed.

Precompute state information pertaining to the next
comment for faster checks (the printer is marginally
faster now despite additional checks for each comment).

No effect on existing src, misc sources.

Fixes #1505.

R=rsc
CC=golang-dev
https://golang.org/cl/5598054
2012-02-07 15:19:52 -08:00
Russ Cox
e3755434b8 5l, 6l, 8l: implement -X flag
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5643050
2012-02-07 16:46:33 -05:00
Russ Cox
2cc58e93d6 test: disable bug408
Fixes #2902.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5641047
2012-02-07 15:50:26 -05:00
David Symonds
32ffc62348 flag: describe valid input for Duration flags.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5639046
2012-02-07 17:50:04 +11:00
Rob Pike
9ce23548cb encoding/gob: document CommonType
Also bring the names in doc.go in line with the source.
More radical resolutions are possible but require substantial internal
changes for very little benefit. Fixing it this way lets us keep the
embedding, which has a huge simplifying effect, and guarantees
binary compatibility.

Fixes #2848.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5644045
2012-02-07 16:15:55 +11:00
Rob Pike
749f228cbd encoding/xml: fix documentation for Decoder.Skip
Fixes #2850.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5645043
2012-02-07 16:15:35 +11:00
Rob Pike
38b8f6c7a4 bufio: remove special error type, update docs
Updates #2836.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5639045
2012-02-07 16:15:03 +11:00
Andrew Gerrand
eb039a8045 misc/osx: update for dist tool, drop image.bash, update readme
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5639043
2012-02-07 14:37:57 +11:00
Gustavo Niemeyer
c2fe6634db cmd/dist: prevent race on VERSION creation
Commands such as "dist version > VERSION" will cause
the shell to create an empty VERSION file and set dist's
stdout to its fd. dist in turn looks at VERSION and uses
its content if available, which is empty at this point.

Fix that by ignoring VERSION if it's empty.

Also prevent cmdversion from running findgoversion a
second time. It was already loaded by init.

R=adg, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5639044
2012-02-07 00:38:15 -02:00
Robert Griesemer
4151183e94 fix build: wrong godoc code submitted before
R=r
CC=golang-dev
https://golang.org/cl/5644044
2012-02-06 17:54:20 -08:00
Robert Griesemer
668418d122 go/token: remove dependency on encoding/gob
R=dsymonds
CC=golang-dev
https://golang.org/cl/5636053
2012-02-06 17:41:19 -08:00
Alex Brainman
1f133e2b8e net: run TestDialTimeout on windows
R=golang-dev, rsc
CC=bradfitz, golang-dev, mikioh.mikioh
https://golang.org/cl/5616066
2012-02-07 12:05:59 +11:00
Rob Pike
97ef437212 path/filepath: repair and simplify the symlink test
I hate symlinks.
Fixes #2787.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5638043
2012-02-07 11:00:13 +11:00
Andrew Gerrand
d887a31b7c misc/osx: don't set GOROOT or modify profile files
There's no reason to set GOROOT as the tools will have the path baked
into it with GOROOT_FINAL.

R=bradfitz, bytbox, gustavo, rsc
CC=golang-dev
https://golang.org/cl/5576064
2012-02-07 10:38:10 +11:00
Russ Cox
32f011e46b syscall: add Timeval.Nano, Timespec.Nano, for conversion to Duration
Fixes #2534.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/5635051
2012-02-06 18:04:12 -05:00