]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agocmd/gc: fix parallel assignment in range
Russ Cox [Fri, 25 May 2012 03:05:36 +0000 (23:05 -0400)]
cmd/gc: fix parallel assignment in range

for expr1, expr2 = range slice
was assigning to expr1 and expr2 in sequence
instead of in parallel.  Now it assigns in parallel,
as it should.  This matters for things like
for i, x[i] = range slice.

Fixes #3464.

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

12 years agoruntime: handle and test large map values
Russ Cox [Fri, 25 May 2012 02:41:07 +0000 (22:41 -0400)]
runtime: handle and test large map values

This is from CL 5451105 but was dropped from that CL.
See also CL 6137051.

The only change compared to 5451105 is to check for
h != nil in reflect·mapiterinit; allowing use of nil maps
must have happened after that original CL.

Fixes #3573.

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

12 years agomisc/dist: use archive/tar.FileInfoHeader
Brad Fitzpatrick [Fri, 25 May 2012 00:32:25 +0000 (17:32 -0700)]
misc/dist: use archive/tar.FileInfoHeader

Fixes #3299

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

12 years agoexp/html: adjust parseForeignContent to match spec
Andrew Balholm [Fri, 25 May 2012 00:03:59 +0000 (10:03 +1000)]
exp/html: adjust parseForeignContent to match spec

Remove redundant checks for integration points.

Ignore null bytes in text.

Don't break out of foreign content for a <font> tag unless it
has a color, face, or size attribute.

Check for MathML text integration points when breaking out of
foreign content.

Pass two new tests.

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

12 years agohash/adler32: optimize.
Nigel Tao [Thu, 24 May 2012 23:58:38 +0000 (09:58 +1000)]
hash/adler32: optimize.

The bulk of the gains come from hoisting the modulo ops outside of
the inner loop.

Reducing the digest type from 8 bytes to 4 bytes gains another 1% on
the hash/adler32 micro-benchmark.

Benchmarks for $GOOS,$GOARCH = linux,amd64 below.

hash/adler32 benchmark:
benchmark             old ns/op    new ns/op    delta
BenchmarkAdler32KB         1660         1364  -17.83%

image/png benchmark:
benchmark                       old ns/op    new ns/op    delta
BenchmarkDecodeGray               2466909      2425539   -1.68%
BenchmarkDecodeNRGBAGradient      9884500      9751705   -1.34%
BenchmarkDecodeNRGBAOpaque        8511615      8379800   -1.55%
BenchmarkDecodePaletted           1366683      1330677   -2.63%
BenchmarkDecodeRGB                6987496      6884974   -1.47%
BenchmarkEncodePaletted           6292408      6040052   -4.01%
BenchmarkEncodeRGBOpaque         19780680     19178440   -3.04%
BenchmarkEncodeRGBA              80738600     79076800   -2.06%

Wall time for Denis Cheremisov's PNG-decoding program given in
https://groups.google.com/group/golang-nuts/browse_thread/thread/22aa8a05040fdd49
Before: 2.44s
After:  2.26s
Delta:  -7%

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

12 years agostrconv: better documentation for FormatInt, FormatUint.
Robert Griesemer [Thu, 24 May 2012 23:24:39 +0000 (16:24 -0700)]
strconv: better documentation for FormatInt, FormatUint.

Fixes #3580.

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

12 years agonet/mail: more liberal parsing of Date headers.
Bill Thiede [Thu, 24 May 2012 23:19:21 +0000 (09:19 +1000)]
net/mail: more liberal parsing of Date headers.
Fixes #3639.

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

12 years agoC: Bill Thiede (Google CLA)
David Symonds [Thu, 24 May 2012 23:18:12 +0000 (09:18 +1000)]
C: Bill Thiede (Google CLA)

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

12 years agonet/rpc: fix race condition when request write partially fails
Alexey Borzenkov [Thu, 24 May 2012 23:07:08 +0000 (16:07 -0700)]
net/rpc: fix race condition when request write partially fails

When client fails to write a request is sends caller that error,
however server might have failed to read that request in the mean
time and replied with that error. When client then reads the
response the call would no longer be pending, so call will be nil

Handle this gracefully by discarding such server responses

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

12 years agoarchive/tar: fix windows test failure
Brad Fitzpatrick [Thu, 24 May 2012 21:32:18 +0000 (14:32 -0700)]
archive/tar: fix windows test failure

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

12 years agocmd/gc: faster code, mainly for rotate
Russ Cox [Thu, 24 May 2012 21:20:07 +0000 (17:20 -0400)]
cmd/gc: faster code, mainly for rotate

* Eliminate bounds check on known small shifts.
* Rewrite x<<s | x>>(32-s) as a rotate (constant s).
* More aggressive (but still minimal) range analysis.

R=ken, dave, iant
CC=golang-dev
https://golang.org/cl/6209077

12 years agoruntime: fix docs for Caller and Callers
Rob Pike [Thu, 24 May 2012 21:15:43 +0000 (14:15 -0700)]
runtime: fix docs for Caller and Callers
The previous attempt to explain this got it backwards (all the more reason to be
sad we couldn't make the two functions behave the same).

Fixes #3669.

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

12 years agoarchive/tar: add FileInfoHeader function
Brad Fitzpatrick [Thu, 24 May 2012 21:10:54 +0000 (14:10 -0700)]
archive/tar: add FileInfoHeader function

Fixes #3295

R=adg, rsc, mike.rosset
CC=golang-dev
https://golang.org/cl/5796073

12 years agoexp/locale/collate: avoid 16-bit math
Russ Cox [Thu, 24 May 2012 18:50:36 +0000 (14:50 -0400)]
exp/locale/collate: avoid 16-bit math

There's no need for the 16-bit arithmetic here,
and it tickles a long-standing compiler bug.
Fix the exp code not to use 16-bit math and
create an explicit test for the compiler bug.

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

12 years agocmd/gc: fix small integer bounds check bug
Russ Cox [Thu, 24 May 2012 18:01:39 +0000 (14:01 -0400)]
cmd/gc: fix small integer bounds check bug

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

12 years agospec: clarify evaluation order of "i, x[i] = range ..."
Robert Griesemer [Thu, 24 May 2012 17:59:48 +0000 (10:59 -0700)]
spec: clarify evaluation order of "i, x[i] = range ..."

Part of fix for issue 3464.

R=golang-dev, rsc, mirtchovski, iant, r
CC=golang-dev
https://golang.org/cl/6246045

12 years agogodoc: correctly categorize interface methods, performance tuning
Robert Griesemer [Thu, 24 May 2012 17:56:35 +0000 (10:56 -0700)]
godoc: correctly categorize interface methods, performance tuning

- interface methods appeared under VarDecl in search results
  (long-standing TODO)

- don't walk parts of AST which contain no indexable material
  (minor performance tuning)

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

12 years agomath/big: make Rat.Denom() always return a reference
Robert Griesemer [Thu, 24 May 2012 17:49:38 +0000 (10:49 -0700)]
math/big: make Rat.Denom() always return a reference

The documentation says so, but in the case of a normalized
integral Rat, the denominator was a new value. Changed the
internal representation to use an Int to represent the
denominator (with the sign ignored), so a reference to it
can always be returned.

Clarified documentation and added test cases.

Fixes #3521.

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

12 years agocmd/6g: peephole fixes/additions
Russ Cox [Thu, 24 May 2012 16:11:32 +0000 (12:11 -0400)]
cmd/6g: peephole fixes/additions

* Shift/rotate by constant doesn't have to stop subprop. (also in 8g)
* Remove redundant MOVLQZX instructions.
* An attempt at issuing loads early.
  Good for 0.5% on a good day, might not be worth keeping.
  Need to understand more about whether the x86
  looks ahead to what loads might be coming up.

R=ken2, ken
CC=golang-dev
https://golang.org/cl/6203091

12 years agocmd/cc: fix uint right shift in constant evaluation
Shenghou Ma [Thu, 24 May 2012 16:08:52 +0000 (00:08 +0800)]
cmd/cc: fix uint right shift in constant evaluation
        Fixes #3664.

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

12 years agoruntime: faster GC mark phase
Dmitriy Vyukov [Thu, 24 May 2012 06:55:50 +0000 (10:55 +0400)]
runtime: faster GC mark phase
Also bump MaxGcproc to 8.

benchmark             old ns/op    new ns/op    delta
Parser               3796323000   3763880000   -0.85%
Parser-2             3591752500   3518560250   -2.04%
Parser-4             3423825250   3334955250   -2.60%
Parser-8             3304585500   3267014750   -1.14%
Parser-16            3313615750   3286160500   -0.83%

Tree                  984128500    942501166   -4.23%
Tree-2                932564444    883266222   -5.29%
Tree-4                835831000    799912777   -4.30%
Tree-8                819238500    789717333   -3.73%
Tree-16               880837833    837840055   -5.13%

Tree2                 604698100    579716900   -4.13%
Tree2-2               372414500    356765200   -4.20%
Tree2-4               187488100    177455900   -5.56%
Tree2-8               136315300    102086700  -25.11%
Tree2-16               93725900     76705800  -22.18%

ParserPause           157441210    166202783   +5.56%
ParserPause-2          93842650     85199900   -9.21%
ParserPause-4          56844404     53535684   -5.82%
ParserPause-8          35739446     30767613  -16.15%
ParserPause-16         32718255     27212441  -16.83%

TreePause              29610557     29787725   +0.60%
TreePause-2            24001659     20674421  -13.86%
TreePause-4            15114887     12842781  -15.03%
TreePause-8            13128725     10741747  -22.22%
TreePause-16           16131360     12506901  -22.47%

Tree2Pause           2673350920   2651045280   -0.83%
Tree2Pause-2         1796999200   1709350040   -4.88%
Tree2Pause-4         1163553320   1090706480   -6.67%
Tree2Pause-8          987032520    858916360  -25.11%
Tree2Pause-16         864758560    809567480   -6.81%

ParserLastPause       280537000    289047000   +3.03%
ParserLastPause-2     183030000    166748000   -8.90%
ParserLastPause-4     105817000     91552000  -13.48%
ParserLastPause-8      65127000     53288000  -18.18%
ParserLastPause-16     45258000     38334000  -15.30%

TreeLastPause          45072000     51449000  +12.39%
TreeLastPause-2        39269000     37866000   -3.57%
TreeLastPause-4        23564000     20649000  -12.37%
TreeLastPause-8        20881000     15807000  -24.30%
TreeLastPause-16       23297000     17309000  -25.70%

Tree2LastPause       6046912000   5797120000   -4.13%
Tree2LastPause-2     3724034000   3567592000   -4.20%
Tree2LastPause-4     1874831000   1774524000   -5.65%
Tree2LastPause-8     1363108000   1020809000  -12.79%
Tree2LastPause-16     937208000    767019000  -22.18%

R=rsc, 0xe2.0x9a.0x9b
CC=golang-dev
https://golang.org/cl/6223050

12 years agoexp/html: detect "integration points" in SVG and MathML content
Andrew Balholm [Thu, 24 May 2012 03:46:41 +0000 (13:46 +1000)]
exp/html: detect "integration points" in SVG and MathML content

Detect HTML integration points and MathML text integration points.
At these points, process tokens as HTML, not as foreign content.

Pass 33 more tests.

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

12 years agoflag: include flag name in redefinition panic.
David Symonds [Thu, 24 May 2012 03:42:02 +0000 (13:42 +1000)]
flag: include flag name in redefinition panic.

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

12 years agoruntime: make go work on netbsd/amd64
Joel Sing [Thu, 24 May 2012 01:33:11 +0000 (11:33 +1000)]
runtime: make go work on netbsd/amd64

R=golang-dev, rsc, devon.odell
CC=golang-dev
https://golang.org/cl/6222044

12 years agoexp/html: update test data
Andrew Balholm [Thu, 24 May 2012 00:35:31 +0000 (10:35 +1000)]
exp/html: update test data

Import updated test data from the WebKit Subversion repository (SVN revision 118111).

Some of the old tests were failing because we were HTML5 compliant, but the tests weren't.

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

12 years agoencoding/json: documentation fix
Brad Fitzpatrick [Thu, 24 May 2012 00:18:05 +0000 (17:18 -0700)]
encoding/json: documentation fix

Fixes #3650

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

12 years agogo/parser: resolve all parameter types
Robert Griesemer [Wed, 23 May 2012 23:12:45 +0000 (16:12 -0700)]
go/parser: resolve all parameter types

Fixes #3655.

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

12 years agocmd/api: add flag to specify contexts
Brad Fitzpatrick [Wed, 23 May 2012 20:45:53 +0000 (13:45 -0700)]
cmd/api: add flag to specify contexts

I needed this to explore per-GOOS/GOARCH differences in pkg
syscall for a recent CL.  Others may find it useful too.

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

12 years agonet/http: fix response Connection: close, close client connections
Brad Fitzpatrick [Wed, 23 May 2012 18:19:38 +0000 (11:19 -0700)]
net/http: fix response Connection: close, close client connections

Fixes #3663
Updates #3540 (fixes it more)
Updates #1967 (fixes it more, re-enables a test)

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

12 years agogo/parser: minor cleanup
Robert Griesemer [Wed, 23 May 2012 16:37:48 +0000 (09:37 -0700)]
go/parser: minor cleanup

- there is no label scope at package level
- open/close all scopes symmetrically now
  that there is only one parse entry point
  (parseFile)

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

12 years agonet/http: clarify ErrBodyNotAllowed error message
Brad Fitzpatrick [Wed, 23 May 2012 16:31:24 +0000 (09:31 -0700)]
net/http: clarify ErrBodyNotAllowed error message

It's usually due to writing on HEAD requests.

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

12 years agocmd/ld: fix Linux/ARM build
Shenghou Ma [Wed, 23 May 2012 03:36:24 +0000 (11:36 +0800)]
cmd/ld: fix Linux/ARM build
        CL 5823055 removed a line introduced in Linux/ARM cgo support.
        Because readsym() now returns nil for "$a", "$d" mapping symbols,
        no matter the settings of `needSym', we still have to guard against
        them in ldelf().

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

12 years agosyscall: implement SetsockoptLinger for windows
Alex Brainman [Wed, 23 May 2012 03:05:05 +0000 (13:05 +1000)]
syscall: implement SetsockoptLinger for windows

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

12 years agocmd/api: add api/next.txt
Brad Fitzpatrick [Wed, 23 May 2012 01:41:20 +0000 (18:41 -0700)]
cmd/api: add api/next.txt

This quiets all.bash noise for upcoming features we know about.

The all.bash warnings will now only print for things not in next.txt
(or in next.txt but not in the API).

Once an API is frozen, we rename next.txt to a new frozen file
(like go1.txt)

Fixes #3651

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

12 years agoexp/html: adjust the last few insertion modes to match the spec
Andrew Balholm [Wed, 23 May 2012 01:11:34 +0000 (11:11 +1000)]
exp/html: adjust the last few insertion modes to match the spec

Handle text, comment, and doctype tokens in afterBodyIM, afterAfterBodyIM,
and afterAfterFramesetIM.

Pass three more tests.

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

12 years agomath/big: implement JSON un/marshaling support for Ints
Robert Griesemer [Wed, 23 May 2012 00:20:37 +0000 (17:20 -0700)]
math/big: implement JSON un/marshaling support for Ints

Also: simplified some existing tests.

No support for Rats for now because the precision-preserving
default notation (fractions of the form a/b) is not a valid
JSON value.

Fixes #3657.

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

12 years agotext/template: exec should accept interface value as valid.
Ugorji Nwoke [Tue, 22 May 2012 22:21:35 +0000 (15:21 -0700)]
text/template: exec should accept interface value as valid.

Currently, if you pass some data to a template as an interface (e.g. interface{})
and extract that value that value as a parameter for a function, it fails, saying
wrong type.

This is because it is only looking at the interface type, not the interface content.

This CL uses the underlying content as the parameter to the func.

Fixes #3642.

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

12 years agocmd/ld, cmd/6l, cmd/8l, cmd/5l: fix hidden/local symbol import for ELF systems
Shenghou Ma [Tue, 22 May 2012 18:32:27 +0000 (02:32 +0800)]
cmd/ld, cmd/6l, cmd/8l, cmd/5l: fix hidden/local symbol import for ELF systems
   Introduce a newsym() to cmd/lib.c to add a symbol but don't add
them to hash table.
   Introduce a new bit flag SHIDDEN and bit mask SMASK to handle hidden
and/or local symbols in ELF symbol tables. Though we still need to order
the symbol table entries correctly.
   Fix for issue 3261 comment #9.
   For CL 5822049.

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

12 years agocmd/ld: take section symbols' value into account for PE
Shenghou Ma [Tue, 22 May 2012 18:27:44 +0000 (02:27 +0800)]
cmd/ld: take section symbols' value into account for PE
    ld -r could generate multiple section symbols for the same section,
but with different values, we have to take that into account.
    Fixes #3322.
    Part of issue 3261.
    For CL 5822049.

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

12 years agosync/atomic: use cas64 to implement {Load,Store,Add}{Uint,Int}64 on Linux/ARM
Shenghou Ma [Tue, 22 May 2012 18:02:01 +0000 (02:02 +0800)]
sync/atomic: use cas64 to implement {Load,Store,Add}{Uint,Int}64 on Linux/ARM
        Now with GOARM=5 our all.bash should pass on ARMv5 systems.
        Fixes #3331.

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

12 years agoruntime: support conditional execution in ARM softfloat
Shenghou Ma [Tue, 22 May 2012 18:00:40 +0000 (02:00 +0800)]
runtime: support conditional execution in ARM softfloat
        Fixes #3638.

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

12 years agoundo CL 6112054 / 2eec2501961c
Russ Cox [Tue, 22 May 2012 17:56:40 +0000 (13:56 -0400)]
undo CL 6112054 / 2eec2501961c

Now that we've fixed the Expect: test, this CL should be okay.

««« original CL description
net/http: revert 97d027b3aa68

Revert the following change set:

        changeset:   13018:97d027b3aa68
        user:        Gustavo Niemeyer <gustavo@niemeyer.net>
        date:        Mon Apr 23 22:00:16 2012 -0300
        summary:     net/http: allow clients to disable keep-alive

This broke a test on Windows 64 and somebody else
will have to check.

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

Fixes #3540.

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

12 years agounicode: fix comment about variable types
Russ Cox [Tue, 22 May 2012 17:53:57 +0000 (13:53 -0400)]
unicode: fix comment about variable types

In both the web and command line tool,
the comment is shown after the declaration.
But in the code the comment is obviously before.
Make the text not refer to a specific order.

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

12 years agocmd/gc: export constants in hexadecimal
Jan Ziak [Tue, 22 May 2012 17:53:38 +0000 (13:53 -0400)]
cmd/gc: export constants in hexadecimal

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

12 years agocrypto/md5: faster inner loop, 3x faster overall
Russ Cox [Tue, 22 May 2012 17:53:27 +0000 (13:53 -0400)]
crypto/md5: faster inner loop, 3x faster overall

The speedup is a combination of unrolling/specializing
the actual code and also making the compiler generate better code.

Go 1.0.1 (size: 1239 code + 320 data = 1559 total)
md5.BenchmarkHash1K   1000000    7178 ns/op  142.64 MB/s
md5.BenchmarkHash8K    200000   56834 ns/op  144.14 MB/s

Partial unroll  (size: 1115 code + 256 data = 1371 total)
md5.BenchmarkHash1K   5000000    2513 ns/op  407.37 MB/s
md5.BenchmarkHash8K    500000   19406 ns/op  422.13 MB/s

Complete unroll  (size: 1900 code + 0 data = 1900 code)
md5.BenchmarkHash1K   5000000    2442 ns/op  419.18 MB/s
md5.BenchmarkHash8K    500000   18957 ns/op  432.13 MB/s

Comparing Go 1.0.1 and the complete unroll (this CL):

benchmark               old MB/s     new MB/s  speedup
md5.BenchmarkHash1K       142.64       419.18    2.94x
md5.BenchmarkHash8K       144.14       432.13    3.00x

On the same machine, 'openssl speed md5' reports 441 MB/s
and 531 MB/s for our two cases, so this CL is at 90% and 80% of
those speeds, which is at least in the right ballpark.
OpenSSL is using carefully engineered assembly, so we are
unlikely to catch up completely.

Measurements on a Mid-2010 MacPro5,1.

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

12 years agonet/http: refactor body logic in test
Russ Cox [Tue, 22 May 2012 17:46:53 +0000 (13:46 -0400)]
net/http: refactor body logic in test

This just eliminates some duplication.
Also add a pointer to RFC 1122, in case
this comes up again.

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

12 years agoruntime: faster GC sweep phase
Dmitriy Vyukov [Tue, 22 May 2012 17:35:52 +0000 (13:35 -0400)]
runtime: faster GC sweep phase
benchmark                              old ns/op    new ns/op    delta

garbage.BenchmarkParser               3731065750   3715543750   -0.41%
garbage.BenchmarkParser-2             3631299750   3495248500   -3.75%
garbage.BenchmarkParser-4             3386486000   3339353000   -1.39%
garbage.BenchmarkParser-8             3267632000   3286422500   +0.58%
garbage.BenchmarkParser-16            3299203000   3316081750   +0.51%

garbage.BenchmarkTree                  977532888    919453833   -5.94%
garbage.BenchmarkTree-2                919948555    853478000   -7.23%
garbage.BenchmarkTree-4                841329000    790207000   -6.08%
garbage.BenchmarkTree-8                787792777    740380666   -6.01%
garbage.BenchmarkTree-16               899257166    846594555   -5.86%

garbage.BenchmarkTree2                 574876300    571885800   -0.52%
garbage.BenchmarkTree2-2               348162700    345888900   -0.65%
garbage.BenchmarkTree2-4               184912500    179137000   -3.22%
garbage.BenchmarkTree2-8               104243900    103485600   -0.73%
garbage.BenchmarkTree2-16               97269500     85137100  -14.25%

garbage.BenchmarkParserPause           141101976    157746974  +11.80%
garbage.BenchmarkParserPause-2         103096051     83043048  -19.45%
garbage.BenchmarkParserPause-4          52153133     45951111  -11.89%
garbage.BenchmarkParserPause-8          36730190     38901024   +5.91%
garbage.BenchmarkParserPause-16         32678875     29578585   -9.49%

garbage.BenchmarkTreePause              29487065     29648439   +0.55%
garbage.BenchmarkTreePause-2            22443494     21306159   -5.07%
garbage.BenchmarkTreePause-4            15799691     14985647   -5.15%
garbage.BenchmarkTreePause-8            10768112     9531420   -12.97%
garbage.BenchmarkTreePause-16           16329891     15205158   -6.89%

garbage.BenchmarkTree2Pause           2586957240   2577533200   -0.36%
garbage.BenchmarkTree2Pause-2         1683383760   1673923800   -0.56%
garbage.BenchmarkTree2Pause-4         1102860320   1074040280   -2.68%
garbage.BenchmarkTree2Pause-8          902627920    886122400   -1.86%
garbage.BenchmarkTree2Pause-16         856470920    804152320   -6.50%

garbage.BenchmarkParserLastPause       277316000    280839000   +1.25%
garbage.BenchmarkParserLastPause-2     179446000    163687000   -8.78%
garbage.BenchmarkParserLastPause-4     106752000     94144000  -11.81%
garbage.BenchmarkParserLastPause-8      57758000     61640000   +6.72%
garbage.BenchmarkParserLastPause-16     51235000     42552000  -16.95%

garbage.BenchmarkTreeLastPause          45244000     50786000  +12.25%
garbage.BenchmarkTreeLastPause-2        37163000     34654000   -6.75%
garbage.BenchmarkTreeLastPause-4        24178000     21967000   -9.14%
garbage.BenchmarkTreeLastPause-8        20390000     15648000  -30.30%
garbage.BenchmarkTreeLastPause-16       22398000     20180000   -9.90%

garbage.BenchmarkTree2LastPause       5748706000   5718809000   -0.52%
garbage.BenchmarkTree2LastPause-2     3481570000   3458844000   -0.65%
garbage.BenchmarkTree2LastPause-4     1849073000   1791330000   -3.22%
garbage.BenchmarkTree2LastPause-8     1042375000   1034811000   -0.73%
garbage.BenchmarkTree2LastPause-16     972637000    851323000  -14.25%

There is also visible improvement in consumed CPU time:
tree2 -heapsize=8000000000 -cpus=12
before: 248.74user 6.36system 0:52.74elapsed 483%CPU
after:  229.86user 6.33system 0:51.08elapsed 462%CPU
-1.66s of real time, but -18.91s of consumed CPU time

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

12 years agogo/ast: document CommentGroup.Text and add test case.
Robert Griesemer [Tue, 22 May 2012 17:30:35 +0000 (10:30 -0700)]
go/ast: document CommentGroup.Text and add test case.

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

12 years agonet/http: improve TestServerExpect
Brad Fitzpatrick [Tue, 22 May 2012 17:27:34 +0000 (10:27 -0700)]
net/http: improve TestServerExpect

Fail more usefully, and Logf in one place instead of Errorf where
an error is acceptable.

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

13 years agogo/parser: fix comment grouping (day 1 bug)
Robert Griesemer [Tue, 22 May 2012 17:04:34 +0000 (10:04 -0700)]
go/parser: fix comment grouping (day 1 bug)

Comment groups must end at the end of a line (or the
next non-comment token) if the group started on a line
with non-comment tokens.

This is important for correct computation of "lead"
and "line" comments (Doc and Comment fields in AST nodes).

Without this fix, the "line" comment for F1 in the
following example:

type T struct {
     F1 int // comment1
     // comment2
     F2 int
}

is "// comment1// comment2" rather than just "// comment1".

This bug was present from Day 1 but only visible when
looking at export-filtered ASTs where only comments
associated with AST nodes are printed, and only in rare
cases (e.g, in the case above, if F2 where not exported,
godoc would show "// comment2" anyway because it was
considered part of the "line" comment for F1).

The bug fix is very small (parser.go). The bulk of the
changes are additional test cases (parser_test.go).

The fix exposed a caching bug in go/printer via one of the
existing tests, hence the changes to printer.go.

As an aside, the fix removes the the need for empty lines
before an "// Output" comment for some special cases of
code examples (e.g.: src/pkg/strings/example_test.go, Count
example).

No impact on gofmt formatting of src, misc.

Fixes #3139.

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

13 years agogodoc: slightly smarter synopsis extraction
Robert Griesemer [Tue, 22 May 2012 17:04:13 +0000 (10:04 -0700)]
godoc: slightly smarter synopsis extraction

Ignore synopses that start with
"Copyright", "All rights", and "Author".

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

13 years agogo/scanner: strip carriage returns from commments
Robert Griesemer [Tue, 22 May 2012 17:03:53 +0000 (10:03 -0700)]
go/scanner: strip carriage returns from commments

Also:
- cleaned up and simplified TestScan
- added tests for comments containing carriage returns

Fixes #3647.

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

13 years agonet/url: better parsing of urls with @ symbol in authority
Alexey Borzenkov [Tue, 22 May 2012 16:44:24 +0000 (12:44 -0400)]
net/url: better parsing of urls with @ symbol in authority

Fixes #3439

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

13 years agocmd/6a: delete dead code
Russ Cox [Tue, 22 May 2012 15:42:44 +0000 (11:42 -0400)]
cmd/6a: delete dead code

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

13 years agosyscall: implement nametomib() on netbsd
Joel Sing [Tue, 22 May 2012 15:33:48 +0000 (01:33 +1000)]
syscall: implement nametomib() on netbsd

Implement nametomib() on NetBSD using the CTL_QUERY node discovery
mechanism.

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

13 years agocrypto/x509: Add ECDSA support
Benjamin Black [Tue, 22 May 2012 15:03:59 +0000 (11:03 -0400)]
crypto/x509: Add ECDSA support

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

13 years agocrypto/ecdsa: add full set of NIST test vectors.
Adam Langley [Tue, 22 May 2012 14:33:14 +0000 (10:33 -0400)]
crypto/ecdsa: add full set of NIST test vectors.

This includes the NIST test suite for ECDSA and alters the test to
parse and evaluate it.

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

13 years agocrypto/ecdsa: fix case where p != 0 mod 8 and the hash length < p.
Adam Langley [Tue, 22 May 2012 14:17:39 +0000 (10:17 -0400)]
crypto/ecdsa: fix case where p != 0 mod 8 and the hash length < p.

I made a typo which breaks P-521.

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

13 years agoexp/html: adjust inSelectIM to match spec
Andrew Balholm [Tue, 22 May 2012 05:30:13 +0000 (15:30 +1000)]
exp/html: adjust inSelectIM to match spec

Simplify the flow of control.

Handle EOF, null bytes, <html>, <input>, <keygen>, <textarea>, <script>.

Pass 5 more tests.

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

13 years agocmd/8a, cmd/8l: add BSWAPL
Russ Cox [Tue, 22 May 2012 04:29:07 +0000 (00:29 -0400)]
cmd/8a, cmd/8l: add BSWAPL

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

13 years agocmd/6a, cmd/6l: add BSWAPL, BSWAPQ
Russ Cox [Tue, 22 May 2012 04:12:58 +0000 (00:12 -0400)]
cmd/6a, cmd/6l: add BSWAPL, BSWAPQ

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

13 years agoruntime: relax TestGcSys
Russ Cox [Tue, 22 May 2012 04:07:13 +0000 (00:07 -0400)]
runtime: relax TestGcSys

This fixes occasional 64-bit failures.
Maybe it will fix the 32-bit failures too,
so re-enable on 32-bit for now.

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

13 years agodebug/elf: Expose entry point from Header in File struct.
Matthew Horsnell [Tue, 22 May 2012 03:29:30 +0000 (23:29 -0400)]
debug/elf: Expose entry point from Header in File struct.
Fixes #3470.

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

13 years agoexp/html: adjust inCellIM to match spec
Andrew Balholm [Tue, 22 May 2012 00:31:08 +0000 (10:31 +1000)]
exp/html: adjust inCellIM to match spec

Clean up flow of control.

Ignore </table>, </tbody>, </tfoot>, </thead>, </tr> if there is not
an appropriate element in table scope.

Pass 3 more tests.

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

13 years agocrypto/rsa: add SHA-224 hash prefix
Russ Cox [Mon, 21 May 2012 18:10:16 +0000 (14:10 -0400)]
crypto/rsa: add SHA-224 hash prefix

http://www.rsa.com/rsalabs/node.asp?id=2125:

NOTE: A new OID has been defined for the combination
of the v1.5 signature scheme and the SHA-224 hash function:
        sha224WithRSAEncryption OBJECT IDENTIFIER ::=
Like the other sha*WithRSAEncryption OIDs in PKCS #1 v2.1,
this OID has NULL parameters.
The DigestInfo encoding for SHA-224 (see Section 9.2, Note 1) is:
        (0x)30 2d 30 0d 06 09 60 86 48 01 65 03 04 02 04 05 00 04 1c || H

R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/6208076

13 years agonet/http: fix duplicate status code in Response.Write
Brad Fitzpatrick [Mon, 21 May 2012 18:07:27 +0000 (11:07 -0700)]
net/http: fix duplicate status code in Response.Write

Fixes #3636

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

13 years agonet/http: add cookies from jar to POST request.
Volker Dobler [Mon, 21 May 2012 17:57:15 +0000 (10:57 -0700)]
net/http: add cookies from jar to POST request.

The main content of this CL is a test case checking the reported
issue 3511 and a tiny fix for it.  A subsequent CL will refactor
the fix as proposed issue 3511.

Fixes #3511.

R=golang-dev, steven.hartland, bradfitz
CC=golang-dev
https://golang.org/cl/6013049

13 years agonet/http: fix regression and mute known test failure for now
Brad Fitzpatrick [Mon, 21 May 2012 17:39:31 +0000 (10:39 -0700)]
net/http: fix regression and mute known test failure for now

Two tests added in 820ffde8c are expected to fail until the fix
for Issue 3540 goes back in (pending Windows net fixes), so
make those tests just Logf for now, with a TODO to re-enable.

Add a new client test.

Rearrange the transport code to be more readable, and fix the
bug from 820ffde8c where the persistConn was being closed before
the body was fully ready.

Fixes #3644
Updates #1967 (not yet fixed, but should be after Issue 3540)

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

13 years agocmd/6g: allow use of R14, R15 now
Russ Cox [Mon, 21 May 2012 16:59:26 +0000 (12:59 -0400)]
cmd/6g: allow use of R14, R15 now

We stopped reserving them in 2009 or so.

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

13 years agonet: reduce dial tests on netbsd
Joel Sing [Sun, 20 May 2012 14:38:14 +0000 (00:38 +1000)]
net: reduce dial tests on netbsd

Add NetBSD to the list of operating systems that have a reduced set
of dial tests.

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

13 years agosyscall: fix SockaddrDatalink on netbsd
Joel Sing [Sun, 20 May 2012 14:13:22 +0000 (00:13 +1000)]
syscall: fix SockaddrDatalink on netbsd

RawSockaddrDatalink and SockaddrDatalink need to match - make Data
have length 12 for both.

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

13 years agoexp/html: adjust inRowIM to match spec
Andrew Balholm [Sun, 20 May 2012 04:26:20 +0000 (14:26 +1000)]
exp/html: adjust inRowIM to match spec

Delete cases that just fall down to "anything else" action.

Handle </tbody>, </tfoot>, and </thead>.

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

13 years agonet: fix leak in test
Mikio Hara [Sat, 19 May 2012 01:42:54 +0000 (10:42 +0900)]
net: fix leak in test

Also change the Listner variable name from l to ln.

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

13 years agosyscall: add comment
Mikio Hara [Fri, 18 May 2012 23:35:51 +0000 (08:35 +0900)]
syscall: add comment

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

13 years agonet/http: non-keepalive connections close successfully
James Gray [Fri, 18 May 2012 17:34:37 +0000 (10:34 -0700)]
net/http: non-keepalive connections close successfully

Connections did not close if Request.Close or Response.Close was true. This meant that if the user wanted the connection to close, or if the server requested it via "Connection: close", the connection would not be closed.

Fixes #1967.

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

13 years agoA+C: add James Gray (Individual CLA)
Brad Fitzpatrick [Fri, 18 May 2012 17:32:54 +0000 (10:32 -0700)]
A+C: add James Gray (Individual CLA)

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

13 years agotls: add AES256 ciphers
Benjamin Black [Fri, 18 May 2012 15:06:58 +0000 (11:06 -0400)]
tls: add AES256 ciphers

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

13 years agoA+C: b@b3k.us
Adam Langley [Fri, 18 May 2012 15:04:32 +0000 (11:04 -0400)]
A+C: b@b3k.us

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

13 years agogo/build: fix some comments
Maxim Pimenov [Thu, 17 May 2012 18:19:19 +0000 (11:19 -0700)]
go/build: fix some comments

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

13 years agoexp/locale/collate: implementation of main collation functionality for
Marcel van Lohuizen [Thu, 17 May 2012 17:48:56 +0000 (19:48 +0200)]
exp/locale/collate: implementation of main collation functionality for
key and simple comparisson. Search is not yet implemented in this CL.
Changed some of the types of table_test.go to allow reuse in the new test.
Also reduced number of primary values for illegal runes to 1 (both map to
the same).

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

13 years ago api: undo go1.txt additions made by 27d0a516b7eb
Andrew Gerrand [Thu, 17 May 2012 08:08:28 +0000 (18:08 +1000)]
  api: undo go1.txt additions made by 27d0a516b7eb

We don't change go1.txt.

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

13 years agonet: avoid the Mac firewall (again)
Russ Cox [Thu, 17 May 2012 06:01:03 +0000 (02:01 -0400)]
net: avoid the Mac firewall (again)

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

13 years agocmd/go: fix typo
Russ Cox [Thu, 17 May 2012 06:00:40 +0000 (02:00 -0400)]
cmd/go: fix typo

Fixes #3619.

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

13 years agoencoding/xml: fix decoding of unknown entities in non-strict mode
Gustavo Niemeyer [Thu, 17 May 2012 03:04:00 +0000 (00:04 -0300)]
encoding/xml: fix decoding of unknown entities in non-strict mode

Fixes #3447.

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

13 years agoencoding/xml: handle anonymous pointer fields
Gustavo Niemeyer [Thu, 17 May 2012 02:21:31 +0000 (23:21 -0300)]
encoding/xml: handle anonymous pointer fields

This CL makes

    type T struct { *U }

behave in a similar way to:

    type T struct { U }

Fixes #3108.

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

13 years agoruntime: disable gc test on non-amd64 systems
Andrew Gerrand [Thu, 17 May 2012 01:34:28 +0000 (11:34 +1000)]
runtime: disable gc test on non-amd64 systems

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

13 years agopkg/runtime: Fix semasleep on Plan 9
Akshat Kumar [Wed, 16 May 2012 22:09:28 +0000 (15:09 -0700)]
pkg/runtime: Fix semasleep on Plan 9

With the timed semacquire patch
(kernel-tsemacquire) for Plan 9,
we can now properly do a timed
wait for the semaphore, in
semasleep.

R=golang-dev, rsc, rminnich, ality, r
CC=0intro, golang-dev, john, mirtchovski
https://golang.org/cl/6197046

13 years agomisc/chrome/gophertool: lower CL number's lower bound and fix input focus on Mac
Shenghou Ma [Wed, 16 May 2012 20:22:44 +0000 (04:22 +0800)]
misc/chrome/gophertool: lower CL number's lower bound and fix input focus on Mac
As our CL number could be as small as 152046, changed CL number's lower bound
to 150000. Hopefully our issue count won't reach 150000 any time soon.
Chrome on Mac OS X has very strange behavior regarding the focus, although we
force the focus to the input box on load, the page still come up with focus on
"issue". Set the tabindex of the input box as a workaround.

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

13 years agocmd/5c: re-enable regopt()
Shenghou Ma [Wed, 16 May 2012 18:58:14 +0000 (02:58 +0800)]
cmd/5c: re-enable regopt()
        After CL 6185047, ./all.bash passed.

benchmark                       old ns/op    new ns/op    delta
BenchmarkAppend                      5558         4894  -11.95%
BenchmarkAppendSpecialCase           5242         4572  -12.78%
BenchmarkSelectUncontended           3719         2821  -24.15%
BenchmarkSelectContended             3776         2832  -25.00%
BenchmarkSelectNonblock              1030         1089   +5.73%
BenchmarkChanUncontended              530          422  -20.38%
BenchmarkChanContended                534          444  -16.85%
BenchmarkChanSync                    1613         1492   -7.50%
BenchmarkChanProdCons0               1520         1351  -11.12%
BenchmarkChanProdCons10               785          668  -14.90%
BenchmarkChanProdCons100              564          473  -16.13%
BenchmarkChanProdConsWork0          11205        10337   -7.75%
BenchmarkChanProdConsWork10          9806         9567   -2.44%
BenchmarkChanProdConsWork100         9413         9398   -0.16%
BenchmarkChanCreation               11687         8715  -25.43%
BenchmarkChanSem                      553          453  -18.08%
BenchmarkCallClosure                   22           22   +0.44%
BenchmarkCallClosure1                  28           28   +0.71%
BenchmarkCallClosure2                2224         1668  -25.00%
BenchmarkCallClosure3                2217         1629  -26.52%
BenchmarkCallClosure4                2240         1684  -24.82%
BenchmarkComplex128DivNormal          930          912   -1.94%
BenchmarkComplex128DivNisNaN          862          866   +0.46%
BenchmarkComplex128DivDisNaN          849          852   +0.35%
BenchmarkComplex128DivNisInf          556          583   +4.86%
BenchmarkComplex128DivDisInf          522          512   -1.92%
BenchmarkConvT2E                      175          159   -9.14%
BenchmarkConvT2EBig                  2418         1823  -24.61%
BenchmarkConvT2I                      545          549   +0.73%
BenchmarkConvI2E                       35           32   -9.58%
BenchmarkConvI2I                      404          391   -3.22%
BenchmarkAssertE2T                     75           62  -16.25%
BenchmarkAssertE2TBig                  76           63  -16.80%
BenchmarkAssertE2I                    427          409   -4.22%
BenchmarkAssertI2T                     82           66  -20.29%
BenchmarkAssertI2I                    430          416   -3.26%
BenchmarkAssertI2E                     36           32  -12.50%
BenchmarkAssertE2E                     35           35   +0.57%
BenchmarkFinalizer                   3224         2941   -8.78%
BenchmarkFinalizerRun              117392        84772  -27.79%
BenchmarkStackGrowth                 5267         5930  +12.59%
BenchmarkSyscall                      191          167  -12.57%
BenchmarkSyscallWork                 9918         7713  -22.23%
BenchmarkIfaceCmp100                 1645         1652   +0.43%
BenchmarkIfaceCmpNil100              1433         1440   +0.49%

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

13 years agocodereview: support mercurial 2.2.1
Shenghou Ma [Wed, 16 May 2012 18:54:03 +0000 (02:54 +0800)]
codereview: support mercurial 2.2.1
        We explicitly use plainformatter to avoid the
        user's debug setting changing our behavior.
        Fixes #3603.

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

13 years agolog: fix typo in comment
Benny Siegert [Wed, 16 May 2012 12:56:18 +0000 (22:56 +1000)]
log: fix typo in comment

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

13 years agodoc/install: document minimum system requirements
Shenghou Ma [Wed, 16 May 2012 04:54:48 +0000 (14:54 +1000)]
doc/install: document minimum system requirements
        Partly copied from CL 5685076.

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

13 years agotest: add bug439, valid code that caused a gccgo crash
Ian Lance Taylor [Tue, 15 May 2012 20:29:46 +0000 (13:29 -0700)]
test: add bug439, valid code that caused a gccgo crash

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

13 years agogo/printer: don't print newlines for empty statements
Robert Griesemer [Tue, 15 May 2012 19:21:21 +0000 (12:21 -0700)]
go/printer: don't print newlines for empty statements

Fixes #3466.

gofmt -w src misc causes no changes.

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

13 years agoruntime: implement getcontext and sigprocmask for netbsd
Joel Sing [Tue, 15 May 2012 18:32:49 +0000 (04:32 +1000)]
runtime: implement getcontext and sigprocmask for netbsd

Implement getcontext and sigprocmask for NetBSD - these will soon be
used by the thread handling code.

Also fix netbsd/386 signal handling - there is no sigreturn, just
return so that we hit the trampoline.

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

13 years agoruntime: fix netbsd syscalls
Joel Sing [Tue, 15 May 2012 17:33:37 +0000 (03:33 +1000)]
runtime: fix netbsd syscalls

Use correct system calls/syscall numbers for NetBSD.

R=golang-dev, for.go.yong, rsc
CC=golang-dev
https://golang.org/cl/6200070

13 years agocmd/go: invoke godoc with import path when possible
Russ Cox [Tue, 15 May 2012 16:53:57 +0000 (12:53 -0400)]
cmd/go: invoke godoc with import path when possible
Also add -n -x flags to doc, fmt, vet.
Also shorten unknown command error.

Fixes #3612.
Fixes #3613.

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

13 years ago8l,5l: 2% faster
Jan Ziak [Tue, 15 May 2012 16:52:18 +0000 (12:52 -0400)]
8l,5l: 2% faster

R=golang-dev, for.go.yong
CC=golang-dev
https://golang.org/cl/6197080

13 years agocmd/gc: make append(nil, x) error more precise
Russ Cox [Tue, 15 May 2012 16:51:58 +0000 (12:51 -0400)]
cmd/gc: make append(nil, x) error more precise

Before:
./x.go:6: first argument to append must be slice; have nil

After:
./x.go:6: first argument to append must be typed slice; have untyped nil

Fixes #3616.

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

13 years agoruntime: fix netbsd signal handling
Joel Sing [Tue, 15 May 2012 15:53:26 +0000 (01:53 +1000)]
runtime: fix netbsd signal handling

Update/correct NetBSD signal handling - most of this is needed due to
the correctly generated runtime definitions.

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