1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:11:21 -06:00
Commit Graph

9685 Commits

Author SHA1 Message Date
Shenghou Ma
ae382129f1 syscall: support Getpid() on Windows
Fixes #3379.

R=golang-dev, alex.brainman, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5909043
2012-04-10 22:34:31 +08:00
Shenghou Ma
edf8b03fef cmd/api: allow addition of API
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5991081
2012-04-10 22:12:09 +08:00
Russ Cox
3d462449f6 8a, 8l: add PREFETCH instructions
R=ken2
CC=golang-dev
https://golang.org/cl/5992082
2012-04-10 10:09:27 -04:00
Russ Cox
35d260fa4c 6a, 6l: add PREFETCH instructions
R=ken2
CC=golang-dev
https://golang.org/cl/5989073
2012-04-10 10:09:09 -04:00
Joel Sing
098b9dcf2f runtime: block signals during thread creation on openbsd
Block signals during thread creation, otherwise the new thread can
receive a signal prior to initialisation completing.

Fixes #3102.

R=golang-dev, rsc, devon.odell, minux.ma
CC=golang-dev
https://golang.org/cl/5757064
2012-04-10 21:57:05 +10:00
Alex Brainman
8e109af83b os: fix IsPermission on windows
Fixes #3482.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5987070
2012-04-10 10:07:29 +10:00
Rob Pike
6849c4db0c runtime.Callers: make documentation match code
It is a bug that Caller and Callers disagree about the offset of the skip
parameter. Document the bug.

R=rsc, dsymonds, r, iant
CC=golang-dev
https://golang.org/cl/5976064
2012-04-10 09:47:57 +10:00
Alexey Borzenkov
0669261af1 cmd/dist: don't fail when Mercurial is a batch file on Windows
On windows Mercurial installed with easy_install typically creates
an hg.bat batch file in Python Scripts directory, which cannot be used
with CreateProcess unless full path is specified. Work around by
launching hg via cmd.exe /c.

Additionally, fix a rare FormatMessageW crash.

Fixes #3093.

R=golang-dev, rsc, alex.brainman, aram, jdpoirier, mattn.jp
CC=golang-dev
https://golang.org/cl/5937043
2012-04-09 15:39:59 -04:00
Benny Siegert
f6d582db61 cmd/yacc: spring cleaning for units.y
* sort imports
* use runtime.GOROOT
* fix some typos

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5987054
2012-04-09 15:04:59 -04:00
Brad Fitzpatrick
494fe3b08f debug/gosym: in test, use temp binary name in /tmp, and clean up.
This fixes all.bash on shared machines.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5992078
2012-04-09 11:19:52 -07:00
Shenghou Ma
149983f136 build: run.bash no longer accepts --no-banner
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5986063
2012-04-10 01:49:49 +08:00
Dmitriy Vyukov
342658bbb6 runtime: preparation for parallel GC
make MHeap.allspans an array instead on a linked-list,
it's required for parallel for

benchmark                              old ns/op    new ns/op    delta

garbage.BenchmarkTree                  494435529    487962705   -1.31%
garbage.BenchmarkTree-2                499652705    485358000   -2.86%
garbage.BenchmarkTree-4                468482117    454093117   -3.07%
garbage.BenchmarkTree-8                488533235    471872470   -3.41%
garbage.BenchmarkTree-16               507835176    492558470   -3.01%

garbage.BenchmarkTree2                  31453900     31404300   -0.16%
garbage.BenchmarkTree2-2                21440600     21477000   +0.17%
garbage.BenchmarkTree2-4                10982000     11117400   +1.23%
garbage.BenchmarkTree2-8                 7544700      7456700   -1.17%
garbage.BenchmarkTree2-16                7049500      6805700   -3.46%

garbage.BenchmarkParser               4448988000   4453264000   +0.10%
garbage.BenchmarkParser-2             4086045000   4057948000   -0.69%
garbage.BenchmarkParser-4             3677365000   3661246000   -0.44%
garbage.BenchmarkParser-8             3517253000   3540190000   +0.65%
garbage.BenchmarkParser-16            3506562000   3463478000   -1.23%

garbage.BenchmarkTreePause              20969784     21100238   +0.62%
garbage.BenchmarkTreePause-2            20215875     20139572   -0.38%
garbage.BenchmarkTreePause-4            17240709     16683624   -3.23%
garbage.BenchmarkTreePause-8            18196386     17639306   -3.06%
garbage.BenchmarkTreePause-16           20621158     20215056   -1.97%

garbage.BenchmarkTree2Pause            173992142    173872380   -0.07%
garbage.BenchmarkTree2Pause-2          131281904    131366666   +0.06%
garbage.BenchmarkTree2Pause-4           93484952     95109619   +1.74%
garbage.BenchmarkTree2Pause-8           88950523     86533333   -2.72%
garbage.BenchmarkTree2Pause-16          86071238     84089190   -2.30%

garbage.BenchmarkParserPause           135815000    135255952   -0.41%
garbage.BenchmarkParserPause-2          92691523     91451428   -1.34%
garbage.BenchmarkParserPause-4          53392190     51611904   -3.33%
garbage.BenchmarkParserPause-8          36059523     35116666   -2.61%
garbage.BenchmarkParserPause-16         30174300     27340600   -9.39%

garbage.BenchmarkTreeLastPause          28420000     29142000   +2.54%
garbage.BenchmarkTreeLastPause-2        23514000     26779000  +13.89%
garbage.BenchmarkTreeLastPause-4        21773000     18660000  -14.30%
garbage.BenchmarkTreeLastPause-8        24072000     21276000  -11.62%
garbage.BenchmarkTreeLastPause-16       25149000     28541000  +13.49%

garbage.BenchmarkTree2LastPause        314491000    313982000   -0.16%
garbage.BenchmarkTree2LastPause-2      214363000    214715000   +0.16%
garbage.BenchmarkTree2LastPause-4      109778000    111115000   +1.22%
garbage.BenchmarkTree2LastPause-8       75390000     74522000   -1.15%
garbage.BenchmarkTree2LastPause-16      70333000     67880000   -3.49%

garbage.BenchmarkParserLastPause       327247000    326815000   -0.13%
garbage.BenchmarkParserLastPause-2     217039000    212529000   -2.08%
garbage.BenchmarkParserLastPause-4     119722000    111535000   -6.84%
garbage.BenchmarkParserLastPause-8      70806000     69613000   -1.68%
garbage.BenchmarkParserLastPause-16     62813000     48009000  -23.57%

R=rsc, r
CC=golang-dev
https://golang.org/cl/5992055
2012-04-09 13:05:43 +04:00
Dmitriy Vyukov
f09e63a2a0 runtime: add memory prefetching to GC
benchmark                              old ns/op    new ns/op    delta

garbage.BenchmarkParser               4448988000   4370531000   -1.76%
garbage.BenchmarkParser-2             4086045000   4023083000   -1.54%
garbage.BenchmarkParser-4             3677365000   3667020000   -0.28%
garbage.BenchmarkParser-8             3517253000   3543946000   +0.76%
garbage.BenchmarkParser-16            3506562000   3512518000   +0.17%

garbage.BenchmarkTree                  494435529    505784058   +2.30%
garbage.BenchmarkTree-2                499652705    502774823   +0.62%
garbage.BenchmarkTree-4                468482117    465713352   -0.59%
garbage.BenchmarkTree-8                488533235    482287000   -1.28%
garbage.BenchmarkTree-16               507835176    500654882   -1.41%

garbage.BenchmarkTree2                  31453900     28804600   -8.42%
garbage.BenchmarkTree2-2                21440600     19065800  -11.08%
garbage.BenchmarkTree2-4                10982000     10009100   -8.86%
garbage.BenchmarkTree2-8                 7544700      6479800  -14.11%
garbage.BenchmarkTree2-16                7049500      6163200  -12.57%

garbage.BenchmarkParserPause           135815000    125360666   -7.70%
garbage.BenchmarkParserPause-2          92691523     84365476   -8.98%
garbage.BenchmarkParserPause-4          53392190     46995809  -11.98%
garbage.BenchmarkParserPause-8          36059523     30998900  -14.03%
garbage.BenchmarkParserPause-16         30174300     27613350   -8.49%

garbage.BenchmarkTreePause              20969784     22568102   +7.62%
garbage.BenchmarkTreePause-2            20215875     20975130   +3.76%
garbage.BenchmarkTreePause-4            17240709     17180666   -0.35%
garbage.BenchmarkTreePause-8            18196386     18205870   +0.05%
garbage.BenchmarkTreePause-16           20621158     20486867   -0.65%

garbage.BenchmarkTree2Pause            173992142    159995285   -8.04%
garbage.BenchmarkTree2Pause-2          131281904    118013714  -10.11%
garbage.BenchmarkTree2Pause-4           93484952     85092666   -8.98%
garbage.BenchmarkTree2Pause-8           88950523     77340809  -13.05%
garbage.BenchmarkTree2Pause-16          86071238     76557952  -11.05%

garbage.BenchmarkParserLastPause       327247000    288205000  -11.93%
garbage.BenchmarkParserLastPause-2     217039000    187336000  -13.69%
garbage.BenchmarkParserLastPause-4     119722000    105069000  -12.24%
garbage.BenchmarkParserLastPause-8      70806000     64755000   -8.55%
garbage.BenchmarkParserLastPause-16     62813000     53486000  -14.85%

garbage.BenchmarkTreeLastPause          28420000     29735000   +4.63%
garbage.BenchmarkTreeLastPause-2        23514000     25427000   +8.14%
garbage.BenchmarkTreeLastPause-4        21773000     19548000  -10.22%
garbage.BenchmarkTreeLastPause-8        24072000     24046000   -0.11%
garbage.BenchmarkTreeLastPause-16       25149000     25291000   +0.56%

garbage.BenchmarkTree2LastPause        314491000    287988000   -8.43%
garbage.BenchmarkTree2LastPause-2      214363000    190616000  -11.08%
garbage.BenchmarkTree2LastPause-4      109778000    100052000   -8.86%
garbage.BenchmarkTree2LastPause-8       75390000     64753000  -14.11%
garbage.BenchmarkTree2LastPause-16      70333000     61484000  -12.58%

FTR, below are result with the empty prefetch function,
that is, single RET but no real prefetching.
It suggests that inlinable PREFETCH is worth pursuing.

benchmark                              old ns/op    new ns/op    delta

garbage.BenchmarkParser               4448988000   4560488000   +2.51%
garbage.BenchmarkParser-2             4086045000   4129728000   +1.07%
garbage.BenchmarkParser-4             3677365000   3728672000   +1.40%
garbage.BenchmarkParser-8             3517253000   3583968000   +1.90%
garbage.BenchmarkParser-16            3506562000   3591414000   +2.42%

garbage.BenchmarkTree                  494435529    499580882   +1.04%
garbage.BenchmarkTree-4                468482117    467387294   -0.23%
garbage.BenchmarkTree-8                488533235    478311117   -2.09%
garbage.BenchmarkTree-2                499652705    499324235   -0.07%
garbage.BenchmarkTree-16               507835176    502005705   -1.15%

garbage.BenchmarkTree2                  31453900     33296800   +5.86%
garbage.BenchmarkTree2-2                21440600     22466400   +4.78%
garbage.BenchmarkTree2-4                10982000     11402700   +3.83%
garbage.BenchmarkTree2-8                 7544700      7476500   -0.90%
garbage.BenchmarkTree2-16                7049500      7338200   +4.10%

garbage.BenchmarkParserPause           135815000    139529142   +2.73%
garbage.BenchmarkParserPause-2          92691523     95229190   +2.74%
garbage.BenchmarkParserPause-4          53392190     53083476   -0.58%
garbage.BenchmarkParserPause-8          36059523     34594800   -4.06%
garbage.BenchmarkParserPause-16         30174300     30063300   -0.37%

garbage.BenchmarkTreePause              20969784     21866920   +4.28%
garbage.BenchmarkTreePause-2            20215875     20731125   +2.55%
garbage.BenchmarkTreePause-4            17240709     17275837   +0.20%
garbage.BenchmarkTreePause-8            18196386     17898777   -1.64%
garbage.BenchmarkTreePause-16           20621158     20662772   +0.20%

garbage.BenchmarkTree2Pause            173992142    184336857   +5.95%
garbage.BenchmarkTree2Pause-2          131281904    138005714   +5.12%
garbage.BenchmarkTree2Pause-4           93484952     98449238   +5.31%
garbage.BenchmarkTree2Pause-8           88950523     89286095   +0.38%
garbage.BenchmarkTree2Pause-16          86071238     89568666   +4.06%

garbage.BenchmarkParserLastPause       327247000    342189000   +4.57%
garbage.BenchmarkParserLastPause-2     217039000    217224000   +0.09%
garbage.BenchmarkParserLastPause-4     119722000    121327000   +1.34%
garbage.BenchmarkParserLastPause-8      70806000     71941000   +1.60%
garbage.BenchmarkParserLastPause-16     62813000     60166000   -4.21%

garbage.BenchmarkTreeLastPause          28420000     27840000   -2.04%
garbage.BenchmarkTreeLastPause-2        23514000     27390000  +16.48%
garbage.BenchmarkTreeLastPause-4        21773000     21414000   -1.65%
garbage.BenchmarkTreeLastPause-8        24072000     21705000   -9.83%
garbage.BenchmarkTreeLastPause-16       25149000     23932000   -4.84%

garbage.BenchmarkTree2LastPause        314491000    332894000   +5.85%
garbage.BenchmarkTree2LastPause-2      214363000    224611000   +4.78%
garbage.BenchmarkTree2LastPause-4      109778000    113976000   +3.82%
garbage.BenchmarkTree2LastPause-8       75390000     67223000  -10.83%
garbage.BenchmarkTree2LastPause-16      70333000     73216000   +4.10%

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5991057
2012-04-07 17:02:44 +04:00
Bobby Powers
c9529e02c1 time: in Format give buffer an initial capacity
I have a small web server that simply sets several cookies
along with an expires header, and then returns.  In the
cpuprofile for a 200k request benchmark, time.Time.Format()
was showing up as 8.3% of cpu usage.  Giving the buffer an
inital capacity to avoid reallocs on append drops it down to
7.6%.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5992058
2012-04-07 10:51:32 +10:00
Charles L. Dorian
f27348776f math: make function documentation more regular
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5994043
2012-04-06 14:01:12 -04:00
Benny Siegert
559c191b89 syscall: manually fix z* for NetBSD/amd64
Building go currently fails on NetBSD, thus the regeneration
scripts do not run correctly. With these changes, at least
the go_bootstrap tool builds correctly.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5695064
2012-04-06 07:57:05 -07:00
Shenghou Ma
cf1f044251 crypto/aes: add benchmarks for decryption and key expansion
R=agl, rsc, fullung
CC=golang-dev
https://golang.org/cl/5972056
2012-04-06 04:19:35 +08:00
Stéphane Travostino
56024fa64e net/url: Correctly escape URL as per RFC 3986
The shouldEscape function did not correctly escape the reserved characters listed in RFC 3986 §2.2, breaking some strict web servers.
Fixes #3433.

R=rsc
CC=golang-dev
https://golang.org/cl/5970050
2012-04-05 13:23:08 -04:00
Dmitriy Vyukov
9903d6870f runtime: minor refactoring in preparation for parallel GC
factor sweepspan() out of sweep(), no logical changes

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5991047
2012-04-05 21:02:20 +04:00
Dmitriy Vyukov
d839a809b2 runtime: make GC stats per-M
This is factored out part of:
https://golang.org/cl/5279048/
(Parallel GC)

benchmark                             old ns/op    new ns/op    delta
garbage.BenchmarkParser              3999106750   3975026500   -0.60%
garbage.BenchmarkParser-2            3720553750   3719196500   -0.04%
garbage.BenchmarkParser-4            3502857000   3474980500   -0.80%
garbage.BenchmarkParser-8            3375448000   3341310500   -1.01%
garbage.BenchmarkParserLastPause      329401000    324097000   -1.61%
garbage.BenchmarkParserLastPause-2    208953000    214222000   +2.52%
garbage.BenchmarkParserLastPause-4    110933000    111656000   +0.65%
garbage.BenchmarkParserLastPause-8     71969000     78230000   +8.70%
garbage.BenchmarkParserPause          230808842    197237400  -14.55%
garbage.BenchmarkParserPause-2        123674365    125197595   +1.23%
garbage.BenchmarkParserPause-4         80518525     85710333   +6.45%
garbage.BenchmarkParserPause-8         58310243     56940512   -2.35%
garbage.BenchmarkTree2                 31471700     31289400   -0.58%
garbage.BenchmarkTree2-2               21536800     21086300   -2.09%
garbage.BenchmarkTree2-4               11074700     10880000   -1.76%
garbage.BenchmarkTree2-8                7568600      7351400   -2.87%
garbage.BenchmarkTree2LastPause       314664000    312840000   -0.58%
garbage.BenchmarkTree2LastPause-2     215319000    210815000   -2.09%
garbage.BenchmarkTree2LastPause-4     110698000    108751000   -1.76%
garbage.BenchmarkTree2LastPause-8      75635000     73463000   -2.87%
garbage.BenchmarkTree2Pause           174280857    173147571   -0.65%
garbage.BenchmarkTree2Pause-2         131332714    129665761   -1.27%
garbage.BenchmarkTree2Pause-4          93803095     93422904   -0.41%
garbage.BenchmarkTree2Pause-8          86242333     85146761   -1.27%

R=rsc
CC=golang-dev
https://golang.org/cl/5987045
2012-04-05 20:48:28 +04:00
Dmitriy Vyukov
fd04f05f2f runtime: replace XOR AX, AX with MOV $0, AX
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5985048
2012-04-05 18:59:50 +04:00
Dmitriy Vyukov
4667571619 runtime: add 64-bit atomics
This is factored out part of:
https://golang.org/cl/5279048/
(Parallel GC)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5985047
2012-04-05 18:47:43 +04:00
Dmitriy Vyukov
a28a10e1a2 runtime: remove redundant code
R=rsc
CC=golang-dev
https://golang.org/cl/5987046
2012-04-05 18:37:46 +04:00
Alex Brainman
4b943bded8 path/filepath: move out of temp directory before deleting it in TestAbs
Fixes #3476.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5986045
2012-04-05 15:17:24 +10:00
Ian Lance Taylor
35bc9d17df syscall, net: use native endianness for Linux netlink messages
Tested using 6g and gccgo on x86_64 GNU/Linux and using gccgo
on PowerPC GNU/Linux (which is big-endian).

R=golang-dev, bradfitz, mikioh.mikioh, iant
CC=golang-dev
https://golang.org/cl/5975073
2012-04-04 17:41:36 -07:00
Adam Langley
22690e6621 crypto/rsa: only enforce that de ≡ 1 mod |(ℤ/nℤ)*| in order to load private keys generated by GnuTLS.
Previously we checked that de ≡ 1 mod φ(n). Since φ(n) is a multiple
of |(ℤ/nℤ)*|, this encompassed the new check, but it was too strict as
keys generated by GnuTLS would be rejected when gcd(p-1,q-1)≠1.

(Also updated the error strings in crypto/rsa to contain the package name, which some were missing.)

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5867043
2012-04-04 12:53:59 -04:00
Shenghou Ma
34ace1043e build: unset GOROOT_FINAL before tests
Fix the builders.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5976068
2012-04-04 23:14:54 +08:00
Brad Fitzpatrick
a8197456b1 cmd/go: in go get, don't try to perform discovery on non-hosts
Before, "go get -v foo/bar" was assuming "foo" was a hostname
and trying to perform discovery on it. Now, require a dot in
the first path component (the hostname).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5981057
2012-04-04 07:24:13 -07:00
Dmitry Chestnykh
ac51c1384a encoding/ascii85: fix panic caused by special case
Special case for encoding 4 zeros as 'z' didn't
update source slice, causing 'index out of bounds'
panic in destination slice.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5970078
2012-04-04 09:52:42 -04:00
Charles L. Dorian
5496e94187 math: update Gamma special cases
Match new C99 values for special cases.

Fixes #2977.

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5972058
2012-04-04 09:45:22 -04:00
Michael Lewis
86092b3d45 sql: Propagate error from subsetTypeArgs in Exec
Fixes #3449

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/5970076
2012-04-03 15:36:48 -07:00
Rob Pike
7a33265ccd time.RFC822: make the string standard-compliant
For mysterious reasons, the existing string was just wrong: it was missing a colon.
There is no apparent reason for this discrepancy.

This should be safe to fix because existing uses would not be RFC822-compliant;
people cannot be depending on it to generate correct mail headers.

Fixes #3444.

R=golang-dev, dsymonds, iant, rsc
CC=golang-dev
https://golang.org/cl/5969072
2012-04-04 06:54:39 +10:00
Shenghou Ma
bcdafaa582 5c, 6c, 8c: take GOROOT_FINAL into consideration
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5936050
2012-04-04 00:04:36 +08:00
Shenghou Ma
6af069f3e1 5a, 6a, 8a: take GOROOT_FINAL into consideration
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5940052
2012-04-04 00:03:42 +08:00
Shenghou Ma
96da953d86 godoc: update appinit.go, apply !appengine build constrain to main.go
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/5969063
2012-04-04 00:00:26 +08:00
Dave Cheney
951a97e42f encoding/base64: fix panic when input len is not a multiple of 4
Fixes #3442.

R=for.go.yong, dsymonds, sougou, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5975052
2012-04-03 12:14:02 +10:00
Rob Pike
065db4ea99 text/template: pipelined arg was not typechecked
Without this fix, an erroneous template causes a panic; should be caught safely.
The bug did not affect correct templates.

Fixes #3267.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5900065
2012-04-03 11:44:52 +10:00
Alex Brainman
d3c92b7c90 time: fix handling of locations with no dst on windows
Fixes #3437.

R=rsc
CC=golang-dev
https://golang.org/cl/5967063
2012-04-03 11:39:38 +10:00
Benny Siegert
512aeb305e exp/utf8string: Correct package name in error messages
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5969051
2012-04-02 12:06:05 -04:00
Maxim Pimenov
6727a2ad78 runtime: fix a comment
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5975043
2012-04-02 11:27:50 -04:00
Ryan Hitchman
8a686792e0 gc: improve error message for composite literals with unexpected newlines
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5857045
2012-04-02 11:00:55 -04:00
Shenghou Ma
a9de5bb3eb cmd/dist, sudo.bash: don't mention sudo.bash if cov or prof is not present
Fixes #3422.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5967057
2012-04-02 22:33:38 +08:00
Robert Griesemer
5b5b42ea84 godoc: replace servePage's positional argument list
R=golang-dev, adg, bradfitz
CC=golang-dev
https://golang.org/cl/5869050
2012-03-30 10:42:56 -07:00
David Symonds
dc640ebd1a exp/terminal: delete.
This is now known as code.google.com/p/go.crypto/ssh/terminal.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5970044
2012-03-30 15:27:39 +11:00
Rob Pike
efb134f8bf cmd/go: update docs about tags for get command
"go1" dominates. Delete the text about weekly and release.
We can revisit this once the situation changes.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5969043
2012-03-30 13:07:10 +11:00
Francisco Souza
18f1a71dc2 doc: added The Go image package article
Orignally published on The Go Programming Language, September 21, 2011.

http://blog.golang.org/2011/09/go-image-package.html

Update #2547

R=adg, nigeltao
CC=golang-dev
https://golang.org/cl/5933049
2012-03-28 14:20:51 +11:00
Alex Brainman
48a2c50a18 path/filepath: correct comment in EvalSymlinks
R=golang-dev, r
CC=golang-dev, hcwfrichter
https://golang.org/cl/5934046
2012-03-28 12:27:36 +11:00
Andrew Gerrand
d71d11fa93 cmd/godoc: use virtual filesystem to implement -templates flag
R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/5921045
2012-03-28 09:13:48 +11:00
Russ Cox
5eb007dede runtime: work around false negative in deadlock detection
Not a complete fix for issue 3342, but fixes the trivial case.
There may still be a race in the instants before and after
a scavenger-induced garbage collection.

Intended to be "obviously safe": a call to runtime·gosched
before main.main is no different than a call to runtime.Gosched
at the beginning of main.main, and it is (or had better be)
safe to call runtime.Gosched at any point during main.

Update #3342.

R=iant
CC=golang-dev
https://golang.org/cl/5919052
2012-03-27 12:22:19 -04:00
Russ Cox
9d7076b178 cmd/go: respect $GOBIN always
Another attempt at https://golang.org/cl/5754088.

Before, we only consulted $GOBIN for source code
found in $GOROOT, but that's confusing to explain
and less useful.  The new behavior lets users set
GOBIN=$HOME/bin and have all go-compiled binaries
installed there.

Tested a few cases in test.bash.

Ran all.bash with and without $GOBIN and it works.
Even so, I expect it to break the builders,
like it did last time, we can debug from there.

Fixes #3269 (again).
Fixes #3396.
Fixes #3397.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5927051
2012-03-27 11:57:39 -04:00
Russ Cox
671862747e go/build: fix import check
When we find a package in DIR/src/foo, we only let it
be known as foo if there is no other foo in an earlier
GOPATH directory or the GOROOT directory.
The GOROOT check was looking in GOROOT/src/foo
instead of GOROOT/src/pkg/foo, which meant that
the import paths "lib9", "libbio", "libmach", and so
on were unavailable, and the import paths "math",
"errors", and so on were available.  Correct this.

Fixes #3390.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/5927050
2012-03-27 11:16:10 -04:00
Russ Cox
6b0929505b cmd/go: fix two bugs
Issue 3207 was caused by setting GOPATH=GOROOT.
This is a common mistake, so diagnose it at command start
and also correct the bug that it caused in get (downloading
to GOROOT/src/foo instead of GOROOT/src/pkg/foo).

Issue 3268 was caused by recognizing 'packages' that
had installed binaries but no source.  This behavior is not
documented and causes trouble, so remove it.  We can
revisit the concept of binary-only packages after Go 1.

Fixes #3207.
Fixes #3268.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5930044
2012-03-27 10:41:44 -04:00
Alex Brainman
7a39654174 path/filepath: use windows GetShortPathName api to force GetLongPathName to do its work
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5928043
2012-03-27 15:53:08 +11:00
Russ Cox
d6c9af6a4e cmd/go: update for go1 tag format
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5919048
2012-03-27 00:17:50 -04:00
Russ Cox
901ee5c151 cmd/dist: fix detection of go1 version
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5924044
2012-03-27 00:17:35 -04:00
Devon H. O'Dell
a63c37b91e net: ignore ECONNABORTED from syscall.Accept
Fixes #3395.

R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5905063
2012-03-27 00:06:14 -04:00
Mikio Hara
4c2614c57c undo CL 5844051 / 5d0322034aa8
Breaks closure test when GOMAXPROCS=2 or more.

««« original CL description
runtime: restore deadlock detection in the simplest case.

Fixes #3342.

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

»»»

R=rsc
CC=golang-dev
https://golang.org/cl/5924045
2012-03-27 13:05:17 +09:00
Russ Cox
a3498f4be4 cmd/go: copy tag_test.go from goinstall
hg cat -r 11846 src/cmd/goinstall/tag_test.go >tag_test.go
No changes.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5919047
2012-03-26 23:44:30 -04:00
Rémy Oudompheng
84bb2547fb runtime: restore deadlock detection in the simplest case.
Fixes #3342.

R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051
2012-03-26 23:06:20 -04:00
Alex Brainman
cf13bd3fab path/filepath: convert drive letter to upper case in windows EvalSymlinks
Fixes #3347.

R=golang-dev, aram, r, rsc
CC=golang-dev
https://golang.org/cl/5918043
2012-03-27 12:56:56 +11:00
Andrew Gerrand
849ad2d0ca cmd/godoc: canonicalize custom path redirects
For example, /ref and /doc/reference.html now both redirect to /ref/.

Fixes #3401.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5916044
2012-03-27 12:44:17 +11:00
Andrew Gerrand
fd9c206718 cmd/godoc: fix app engine version
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5902060
2012-03-27 10:10:25 +11:00
Robert Griesemer
5390722100 exp/types: generalized GCImporter API.
- Renamed ExportData -> FindGcExportData
  and base it on an a bufio.Reader rather
  than a filename so it can be used in
  environments where object files are
  stored elsewhere.

- Factor former GcImporter into GcImportData
  and GcImport. Implementations with different
  storage locations for object files can build
  a customized GcImport using GcImportData.

This is pkg/exp only - no impact on Go 1.

R=golang-dev, lvd, rsc
CC=golang-dev
https://golang.org/cl/5574069
2012-03-26 11:26:05 -07:00
Rob Pike
6421bdeb71 cmd/go: explain versions better
Summarize the desiderata for selecting versions of remote packages to get.
Fixes #3394.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5902058
2012-03-26 17:47:39 +11:00
Rob Pike
072646cd17 run.bash: set -e in new codewalk block
Otherwise we won't fail if something goes wrong.
This shell programming stuff is tricky.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5905062
2012-03-26 17:03:04 +11:00
Rob Pike
6492cac6dd run.bash: compile the codewalks
They could be tested but that requires more than seems wise right now.

Update #2648.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5908054
2012-03-26 16:08:21 +11:00
Shenghou Ma
304404895d cmd/go: allow underscores in tool name
Otherwise we can't invoke go_bootstrap directly.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5900061
2012-03-26 10:01:17 +08:00
Shenghou Ma
d1f6e27880 go/build: cgoEnabled is not known to cmd/dist anymore
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5901051
2012-03-26 10:00:06 +08:00
Evan Shaw
c26b504b0d cmd/go: add missing error check
R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5874055
2012-03-26 09:52:29 +08:00
Stefan Nilsson
2dfcbd0a3b os: add missing byte to FileMode buffer
32 bytes is enough for all FileMode bits.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5853044
2012-03-24 08:16:57 +11:00
Robert Griesemer
43ad726f34 text/template: fix typo in package comment
Fixes #3383.

R=iant, bradfitz
CC=golang-dev
https://golang.org/cl/5891045
2012-03-23 11:31:29 -07:00
Adam Langley
1d8ec87135 crypto/tls: don't select ECC ciphersuites with no mutual curve.
The existing code that tried to prevent ECC ciphersuites from being
selected when there were no mutual curves still left |suite| set.
This lead to a panic on a nil pointer when there were no acceptable
ciphersuites at all.

Thanks to George Kadianakis for pointing it out.

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5857043
2012-03-23 10:48:51 -04:00
Alex Brainman
f39ff80bea path/filepath: windows drive letter cannot be a digit
R=golang-dev, r
CC=golang-dev, mattn.jp
https://golang.org/cl/5885056
2012-03-23 15:57:19 +11:00
Ian Lance Taylor
209b2e55f7 cmd/gc: fix comment typo, assignment spacing
R=bradfitz, gri, lvd
CC=golang-dev
https://golang.org/cl/5874053
2012-03-22 11:40:12 -07:00
Ian Lance Taylor
47b6197a01 cmd/gc: when expanding append inline, preserve arguments
Fixes #3369.

R=golang-dev, gri, lvd, r
CC=golang-dev
https://golang.org/cl/5876044
2012-03-22 09:44:31 -07:00
Stefan Nilsson
08959defa8 sort: add time complexity to doc
Let's tell the world that Go's sort is O(n log n).
Surely this is a feature we intend to keep.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5867045
2012-03-22 09:27:02 -07:00
Francisco Souza
289a357104 doc: add JSON and Go article
Originally published on The Go Programming Language Blog, January 25, 2011.

http://blog.golang.org/2011/01/json-and-go.html

R=adg
CC=golang-dev
https://golang.org/cl/5846044
2012-03-22 18:25:40 +11:00
Rob Pike
07e887f433 flag: add examples
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5867049
2012-03-22 11:15:43 +11:00
Robert Griesemer
f5f80368c4 exp/norm/normalize.go: fix typo
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/5874045
2012-03-21 14:55:05 -07:00
Shenghou Ma
7186e56573 go/build: clarify why we exclude files starting with '_' or '.'
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5864053
2012-03-22 03:18:47 +08:00
Robert Griesemer
cfd8b84f07 godoc: use shorter titles for tabs
In a browser with many open tabs, the tab titles become short
and uninformative because they all start with the same prefix
("Package ", "Directory ", etc.).

Permit use of shorter tab titles that start with the relevant
information first.

Fixes #3365.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5865056
2012-03-21 11:29:30 -07:00
Ian Lance Taylor
3a3c5aad4e cmd/cgo: fix handling of errno for gccgo
Fixes #3332.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5868047
2012-03-21 10:38:58 -07:00
Shenghou Ma
2ceb653b8b build: lengthen timeout for the lengthy runtime test
To fix build on (overheated) Linux/ARM builder.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/5865051
2012-03-21 16:19:37 +08:00
David Symonds
4a59be0091 html/template: fix typo and make grammar consistent in comments.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5866044
2012-03-21 10:10:44 +11:00
Stefan Nilsson
c5488d4f00 sort: fix computation of maxDepth to avoid infinite loop
The current computation loops indefinitely if n > 1<<30 (for 32-bit ints).

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5848067
2012-03-20 14:23:12 -07:00
Ian Lance Taylor
c5b45aa991 cmd/go: use .o, not .{5,6,8}, for gccgo created object files
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5861044
2012-03-20 14:17:06 -07:00
Brad Fitzpatrick
65dc7dc90b sort: document two undocumented functions
They looked out of place in godoc.
Includes documenting sort stability.

Fixes #3356

R=golang-dev, gri, trolleriprofessorn
CC=golang-dev
https://golang.org/cl/5855044
2012-03-20 11:40:41 -07:00
Shenghou Ma
4b1933dfb2 runtime: remove unused goc2c.c
Its functionality has been moved into cmd/dist.

R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5843062
2012-03-21 00:49:45 +08:00
Shenghou Ma
23322ab841 build: unset GOPATH before tests
This is because we disallow local import for non-local packages, if
GOROOT happens to be under one of GOPATH, then some tests will fail
to build.
Fixes #3337.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5852043
2012-03-21 00:47:27 +08:00
Alex Brainman
8521811cde run.bat: disable test in test\bench\go1 to fix build
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5848066
2012-03-20 14:59:51 +11:00
Rob Pike
49be7f7d0d html/template: add Templates and *Escape functions
to bring it in line with text/template's interface.
Fixes #3296.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5843066
2012-03-20 14:38:07 +11:00
Andrew Gerrand
abdb4dbe2c cmd/godoc: inform users that the playground doesn't work via local godoc
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5843065
2012-03-20 14:11:38 +11:00
Alex Brainman
7fbef930a6 build: do more during windows build
- use GO_GCFLAGS and GO_LDFLAGS if supplied
- build misc\dashboard\builder and misc\goplay
- run tests in test\bench\go1
- check api compatibility

R=golang-dev, r, kardianos, bradfitz
CC=golang-dev
https://golang.org/cl/5847063
2012-03-20 14:04:20 +11:00
Mikio Hara
7905faaee2 net: drop unnecessary type assertions and fix leak in test
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5847064
2012-03-20 10:57:54 +09:00
Anthony Martin
e1f22bdcc5 gc: fix struct and array comparisons for new bool rules
The two optimizations for small structs and arrays
were missing the implicit cast from ideal bool.

Fixes #3351.

R=rsc, lvd
CC=golang-dev
https://golang.org/cl/5848062
2012-03-19 15:57:28 -07:00
Adam Langley
aa1d4170a4 crypto/tls: always send a Certificate message if one was requested.
If a CertificateRequest is received we have to reply with a
Certificate message, even if we don't have a certificate to offer.

Fixes #3339.

R=golang-dev, r, ality
CC=golang-dev
https://golang.org/cl/5845067
2012-03-19 12:34:35 -04:00
Alex Brainman
2ef4a84022 path/filepath: implement Match and Glob on windows
As discussed on golang-dev, windows will use
"\" as path separator. No escaping allowed.

R=golang-dev, r, mattn.jp, rsc, rogpeppe, bsiegert, r
CC=golang-dev
https://golang.org/cl/5825044
2012-03-19 16:51:06 +11:00
Rob Pike
1f6fc949f6 sysycall: remove creds_linux_test.go
It is unprecedented to add tests to package syscall, especially
system-specific ones. Not a policy worth changing right before Go 1
is cut.

The sole existing test, passfd_test.go, contains the line
        // +build linux darwin probablyfreebsd probablyopenbsd
which argues that this is not a subject to be undertaking likely.
Note that passfd_test.go also went in just now. It's the only test
in syscall.

Deleting for now, will reconsider after Go 1.

R=golang-dev, bradfitz, r, dsymonds
CC=golang-dev
https://golang.org/cl/5846063
2012-03-19 11:15:28 +11:00
Rob Pike
4161dfc4fe syscall: delete passfd_test.go
We can revisit the issue of testing in syscall after Go 1.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5844057
2012-03-19 11:12:32 +11:00
Albert Strasheim
6a0544091e syscall: Test SCM_CREDENTIALS, SO_PASSCRED on Linux.
R=bradfitz, iant
CC=golang-dev
https://golang.org/cl/5846059
2012-03-18 10:03:00 -07:00