1
0
mirror of https://github.com/golang/go synced 2024-09-24 23:10:12 -06:00
Commit Graph

11903 Commits

Author SHA1 Message Date
Russ Cox
77aaa3555d gc: fix import of struct type in struct literal
Fixes #2716.

R=ken2
CC=golang-dev
https://golang.org/cl/5652065
2012-02-11 00:34:01 -05:00
Ian Lance Taylor
53e139c7a0 runtime: put lockorder before pollorder in Select memory block.
Otherwise lockorder may be misaligned, since lockorder is a
list of pointers and pollorder is a list of uint16.
Discovered running gccgo (which uses a modified copy of this
code) on SPARC.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5655054
2012-02-10 21:24:14 -08:00
Russ Cox
f91cc3bdbb gc: optimize interface ==, !=
If the values being compared have different concrete types,
then they're clearly unequal without needing to invoke the
actual interface compare routine.  This speeds tests for
specific values, like if err == io.EOF, by about 3x.

benchmark                  old ns/op    new ns/op    delta
BenchmarkIfaceCmp100             843          287  -65.95%
BenchmarkIfaceCmpNil100          184          182   -1.09%

Fixes #2591.

R=ken2
CC=golang-dev
https://golang.org/cl/5651073
2012-02-11 00:19:24 -05:00
Russ Cox
a7b83f2287 5g: fix out of registers bug
Same fix as 6g, tripped by the 6g test case.

R=ken2
CC=golang-dev
https://golang.org/cl/5651074
2012-02-11 00:04:37 -05:00
Mikio Hara
f842dc160b cmd/dist: clear execute bit from source file
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651072
2012-02-11 13:23:44 +09:00
Russ Cox
12fab9d122 gc: add test case for issue 1743
Fixes #1743.
(Actually was fixed earlier, but now we have proof.)

R=ken2
CC=golang-dev
https://golang.org/cl/5649064
2012-02-10 23:20:00 -05:00
Russ Cox
896f0c61c8 gc: diagnose init loop involving func
Fixes #2295.

R=ken2
CC=golang-dev
https://golang.org/cl/5655057
2012-02-10 23:10:45 -05:00
Russ Cox
7ae1fe420e gc: eliminate duplicate ambiguous selector message
Also show actual expression in message when possible.

Fixes #2599.

R=ken2
CC=golang-dev
https://golang.org/cl/5654059
2012-02-10 22:46:56 -05:00
Russ Cox
5340510203 8g: fix opt bug
Was trying to optimize a duplicate float64 move
by registerizing an int64.

Fixes #2588.

R=ken2
CC=golang-dev
https://golang.org/cl/5645086
2012-02-10 22:32:02 -05:00
Rob Pike
b027a0f118 text/template/parse: deep Copy method for nodes
This will help html/template copy templates.

R=golang-dev, gri, nigeltao, r
CC=golang-dev
https://golang.org/cl/5653062
2012-02-11 14:21:16 +11:00
Russ Cox
ca5da31f83 6g: fix out of registers bug
Fix it twice: reuse registers more aggressively in cgen abop,
and also release R14 and R15, which are no longer m and g.

Fixes #2669.

R=ken2
CC=golang-dev
https://golang.org/cl/5655056
2012-02-10 22:19:34 -05:00
Mikio Hara
76a1cb5a00 net: fix comment, make use of listenerBacklog
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5653056
2012-02-11 11:51:12 +09:00
Mikio Hara
0e3514eaac 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
2012-02-11 11:50:51 +09:00
Robert Griesemer
21a3aceb4a fix build: update image/png test
R=nigeltao
CC=golang-dev
https://golang.org/cl/5649062
2012-02-10 17:26:40 -08:00
Nigel Tao
22636be8b0 flate: delete WrongValueError type.
Fixes #2838.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5651060
2012-02-11 12:09:11 +11:00
Bjorn Tipling
0846e275a8 net/http: fix reference to URL.RawPath in docs
R=go.peter.90, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5655053
2012-02-10 22:39:57 -02:00
Gustavo Niemeyer
ec87811662 CONTRIBUTORS: add Bjorn Tipling <bjorn.tipling@gmail.com>
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5645085
2012-02-10 22:35:42 -02:00
Gustavo Niemeyer
dbac863ed8 cmd/dist: reset version during bootstrap
Fixes #2927.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5651062
2012-02-10 22:26:36 -02:00
Nigel Tao
18f518362b compress: add comments to gzip and zlib.
Fixes #2939.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5655050
2012-02-11 09:42:07 +11:00
Luuk van Dijk
e0b2ce3401 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
2012-02-10 22:50:55 +01:00
Brad Fitzpatrick
fbab6d8512 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
2012-02-11 08:47:19 +11:00
James Whitehead
09f6a49194 exp/types: Use build.FindTree in GcImporter
Fixes #2932

R=gri
CC=golang-dev
https://golang.org/cl/5654046
2012-02-10 13:35:03 -08:00
Robert Griesemer
a0acdd210b 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
2012-02-10 13:28:29 -08:00
Robert Griesemer
f8cf82f6f2 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
2012-02-10 13:27:32 -08:00
Nigel Tao
cc9ed447d0 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
2012-02-10 18:49:19 +11:00
Russ Cox
0bc6836e81 builder: set $GOBUILDEXIT for Windows
Actually %GOBUILDEXIT% I suppose.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5651058
2012-02-10 01:27:59 -05:00
Russ Cox
ce63ec93ce regexp/syntax: delete old package comment
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651057
2012-02-10 01:11:56 -05:00
Alex Brainman
62b328ed19 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
2012-02-10 16:29:50 +11:00
Andrew Gerrand
08e11187e6 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
2012-02-10 16:03:24 +11:00
Rob Pike
1ceb561629 regexp/syntax: add package and Parse commentary
Fixes #2954.

R=golang-dev, bradfitz, rsc, r
CC=golang-dev
https://golang.org/cl/5645077
2012-02-10 15:57:12 +11:00
Rob Pike
13443ccc2a math: fix gamma doc, link to OEIS
Fixes #2940.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5645078
2012-02-10 15:56:51 +11:00
Russ Cox
ee3e24f2d7 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
2012-02-09 23:46:48 -05:00
Daniel Theophanes
ef1d2a32ea 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
2012-02-09 23:10:27 -05:00
Rob Pike
9bcfc57660 reflect: documentation tweaks
Fixes #2952.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5651054
2012-02-10 15:09:09 +11:00
Brad Fitzpatrick
5d198bf866 os/exec: add Cmd.Waitmsg, fix a misleading comment
Fixes #2948

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5655048
2012-02-10 14:52:08 +11:00
Rob Pike
4c7695126d strings: delete method comments implied by interface satisfaction
Fixes #2957.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5653053
2012-02-10 14:45:11 +11:00
Rob Pike
3f1cff3951 testing/quick: documentation tweaks
Fixes #2960.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5652055
2012-02-10 14:37:50 +11:00
Rob Pike
1308f7c94f testing/iotest: adjust adverbial imprecision in package comment
Fixes #2959.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5651053
2012-02-10 14:37:20 +11:00
Rob Pike
cbd6c34131 testing/script: delete
Dead code.

Fixes #2961.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5650053
2012-02-10 14:31:08 +11:00
Rob Pike
989e611a7b 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
2012-02-10 14:30:44 +11:00
Rob Pike
0357af80b4 template: refer HTML users to html/template
Fixes #2963.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5650051
2012-02-10 14:21:36 +11:00
Brad Fitzpatrick
4152b43457 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
2012-02-10 14:16:15 +11:00
Rob Pike
6c0aa2f296 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
2012-02-10 14:12:17 +11:00
Rob Pike
1bfffb67d8 time: improve commentary about standard time and formatting/parsing
Fixes #2965.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5652054
2012-02-10 13:52:19 +11:00
Rob Pike
7ef97def80 testing: fix references to "gotest"
Fixes #2958.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5650050
2012-02-10 13:49:50 +11:00
Alex Brainman
9a469e6ab5 make.bat: remove double quotes
Fixes #2974.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5653052
2012-02-10 11:48:22 +11:00
Brad Fitzpatrick
7750fc894a os: remove Time; callers should use time.Time.
Part of issue 2947

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651051
2012-02-10 11:44:51 +11:00
Brad Fitzpatrick
0a398c4057 net/http/fcgi: don't mention threads in docs
Fixes #2942

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5650049
2012-02-10 10:29:57 +11:00
Robert Griesemer
88a9e76e28 text/scanner: update comments
Fixes #2962.

R=rsc
CC=golang-dev
https://golang.org/cl/5652048
2012-02-09 15:26:08 -08:00
Brad Fitzpatrick
9cd4a0467a regexp: name result parameters referenced from docs
Fixes #2953

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5653051
2012-02-10 10:22:01 +11:00