]> Cypherpunks repositories - gostls13.git/log
gostls13.git
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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 years agoruntime: fix netbsd runtime defs
Joel Sing [Tue, 15 May 2012 15:52:20 +0000 (01:52 +1000)]
runtime: fix netbsd runtime defs

Fix and regenerate runtime defs for NetBSD.

Whilst the mcontext struct can be handled across architectures,
the registers are provided as defines that index an array, rather
than as members of the struct. Since these are architecture
dependent, include them via a defs_netbsd_<arch>.go file.

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

13 years agoruntime: fix counting of free objects
Jan Ziak [Tue, 15 May 2012 15:48:58 +0000 (11:48 -0400)]
runtime: fix counting of free objects

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

13 years agoruntime: refactor helpgc functionality in preparation for parallel GC
Dmitriy Vyukov [Tue, 15 May 2012 15:10:16 +0000 (19:10 +0400)]
runtime: refactor helpgc functionality in preparation for parallel GC
Parallel GC needs to know in advance how many helper threads will be there.
Hopefully it's the last patch before I can tackle parallel sweep phase.
The benchmarks are unaffected.

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

13 years agoos/syscall: correct netbsd types/names
Joel Sing [Tue, 15 May 2012 02:00:13 +0000 (12:00 +1000)]
os/syscall: correct netbsd types/names

Fix types/names so that these functions work with the generated
syscall/z* files.

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

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

Set the TLS base using the _lwp_setprivate() syscall, instead of via
sysarch(). NetBSD tracks the pointer passed to _lwp_setprivate() and
restores this value when restoring mcontext. If sysarch() is used
directly, restoring an mcontext trashes the FS/GS value, resulting
in a segfault when we next try to access the TLS.

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

13 years agomime/multipart: fix handling of empty parts without CRLF before next part
Brad Fitzpatrick [Tue, 15 May 2012 01:16:47 +0000 (18:16 -0700)]
mime/multipart: fix handling of empty parts without CRLF before next part

Empty parts can be either of the form:

a) "--separator\r\n", header (w/ trailing 2xCRLF), \r\n "--separator"...
or
b) "--separator\r\n", header (w/ trailing 2xCRLF), "--separator"...

We never handled case b).  In fact the RFC seems kinda vague about
it, but browsers seem to do a), and App Engine's synthetic POST
bodies after blob uploads is of form b).

So handle them both, and add a bunch of tests.

(I can't promise these are the last fixes to multipart, especially
considering its history, but I'm growing increasingly confident at
least, and I've never submitted a multipart CL with known bugs
outstanding, including this time.)

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

13 years agomisc/dashboard/codereview: add sameer.
David Symonds [Mon, 14 May 2012 22:38:05 +0000 (08:38 +1000)]
misc/dashboard/codereview: add sameer.

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

13 years agoregexp/syntax: replace internal error on unexpected ) w/ ErrUnexpectedParen
Jan Mercl [Mon, 14 May 2012 18:50:25 +0000 (11:50 -0700)]
regexp/syntax: replace internal error on unexpected ) w/ ErrUnexpectedParen

Unbalanced extra right parenthesis produced an internal error instead of
a more descriptive one.

Fixes #3406.

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

13 years agosyscall: regenerate z* files for netbsd
Joel Sing [Mon, 14 May 2012 17:40:13 +0000 (10:40 -0700)]
syscall: regenerate z* files for netbsd

Fix mkerrors.sh so that it works on NetBSD.

Remove directory mode bits from types - this already appears in errors.

Regenerate the z* files now that cgo is working.

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

13 years agocrypto/tls: fix decoding of certLen in certificateMsg.unmarshal
Michael Gehring [Mon, 14 May 2012 16:26:29 +0000 (12:26 -0400)]
crypto/tls: fix decoding of certLen in certificateMsg.unmarshal

certLen was decoded incorrectly if length > 2^16-1.

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

13 years agoA+C: add Michael Gehring (individual CLA)
Adam Langley [Mon, 14 May 2012 15:28:55 +0000 (11:28 -0400)]
A+C: add Michael Gehring (individual CLA)

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

13 years agosync: use atomic.Store in Once.Do
Dmitriy Vyukov [Mon, 14 May 2012 15:27:29 +0000 (19:27 +0400)]
sync: use atomic.Store in Once.Do
No perf/semantic changes, merely improves code health.
There were several questions as to why Once.Do uses
atomic.CompareAndSwap to do a store.

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

13 years agomisc/dashboard/codereview: set In-Reply-To header to properly thread mail.
David Symonds [Mon, 14 May 2012 00:05:39 +0000 (10:05 +1000)]
misc/dashboard/codereview: set In-Reply-To header to properly thread mail.

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

13 years agoA+C: Jan Ziak (individual CLA)
David Symonds [Sun, 13 May 2012 11:20:39 +0000 (21:20 +1000)]
A+C: Jan Ziak (individual CLA)

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

13 years agoruntime: revert MaxGcproc from 16 to 4
Dmitriy Vyukov [Fri, 11 May 2012 09:30:34 +0000 (13:30 +0400)]
runtime: revert MaxGcproc from 16 to 4
The change accidentally come in with this revision:
https://code.google.com/p/go/source/detail?spec=svn345cbca96c5550f2e89bc727703301933802923c&r=14c38c23c819a17021b1808cf4a34ef3a1a17db5

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

13 years agoruntime: add parallel for algorithm
Dmitriy Vyukov [Fri, 11 May 2012 06:50:03 +0000 (10:50 +0400)]
runtime: add parallel for algorithm
This is factored out part of:
https://golang.org/cl/5279048/
(parallel GC)

R=bsiegert, mpimenov, rsc, minux.ma, r
CC=golang-dev
https://golang.org/cl/5986054

13 years agoruntime: fix complex division benchmarks
Shenghou Ma [Thu, 10 May 2012 19:09:14 +0000 (03:09 +0800)]
runtime: fix complex division benchmarks
we can't add the division result to n during iteration, because it might
turn n into NaN or Inf.

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

13 years agoruntime: fix syscalls for netbsd
Joel Sing [Thu, 10 May 2012 17:48:43 +0000 (03:48 +1000)]
runtime: fix syscalls for netbsd

Use correct syscall numbers and arguments for NetBSD.
Provide a trampoline for signal returns (using signal API 3).

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