]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agodatabase/sql: use driver.ColumnConverter everywhere consistently
Brad Fitzpatrick [Tue, 29 May 2012 18:09:09 +0000 (11:09 -0700)]
database/sql: use driver.ColumnConverter everywhere consistently

It was only being used for (*Stmt).Exec, not Query, and not for
the same two methods on *DB.

This unifies (*Stmt).Exec's old inline code into the old
subsetArgs function, renaming it in the process (changing the
old word "subset" to "driver", mostly converted earlier)

Fixes #3640

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

12 years agoruntime: replace runtime·rnd function with ROUND macro
Russ Cox [Tue, 29 May 2012 18:02:29 +0000 (14:02 -0400)]
runtime: replace runtime·rnd function with ROUND macro

It's sad to introduce a new macro, but rnd shows up consistently
in profiles, and the function call overwhelms the two arithmetic
instructions it performs.

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

12 years agotest/bench/shootout/timing.log: update after recent compiler changes
Rob Pike [Tue, 29 May 2012 18:01:50 +0000 (11:01 -0700)]
test/bench/shootout/timing.log: update after recent compiler changes
Moving panic out of line speeds up fannkuch almost a factor of two.
Changes to bitwhacking code affect mandelbrot badly.

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

12 years agoexp/types: disable test
Russ Cox [Tue, 29 May 2012 17:33:37 +0000 (13:33 -0400)]
exp/types: disable test

It's broken and seems to be exp/types's fault.

Update #3682.

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

12 years agonet: fix comment on FileListener
Mikio Hara [Tue, 29 May 2012 16:52:50 +0000 (01:52 +0900)]
net: fix comment on FileListener

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

12 years agocrypto: housekeeping
Russ Cox [Tue, 29 May 2012 16:45:40 +0000 (12:45 -0400)]
crypto: housekeeping

Rename _Block to block, don't bother making it compute count.
Add benchmarks.

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

12 years agoundo CL 6248054 / 0f418a63cdf9
Mikio Hara [Tue, 29 May 2012 16:42:36 +0000 (01:42 +0900)]
undo CL 6248054 / 0f418a63cdf9

breaks public API document style

««« original CL description
net: fix comment on FileListener

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

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

12 years agoEmacs go-mode: fix Emacs freeze-up when copy/pasting from string or comment.
Peter Kleiweg [Tue, 29 May 2012 16:40:12 +0000 (12:40 -0400)]
Emacs go-mode: fix Emacs freeze-up when copy/pasting from string or comment.

Fixes #3509.
Fixes #2767.

R=golang-dev, sameer
CC=golang-dev
https://golang.org/cl/6139066

12 years agocmd/6l: Fixes for 64-bit Plan 9
Akshat Kumar [Tue, 29 May 2012 16:32:42 +0000 (12:32 -0400)]
cmd/6l: Fixes for 64-bit Plan 9

Plan 9 versions for amd64 have 2 megabyte pages.
This also fixes the logic for 32-bit vs 64-bit Plan 9,
making 64-bit the default, and adds logic to generate
a symbols table.

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

12 years agocmd/6g, cmd/8g: move panicindex calls out of line
Russ Cox [Tue, 29 May 2012 16:09:27 +0000 (12:09 -0400)]
cmd/6g, cmd/8g: move panicindex calls out of line

The old code generated for a bounds check was
                CMP
                JLT ok
                CALL panicindex
        ok:
                ...

The new code is (once the linker finishes with it):
                CMP
                JGE panic
                ...
        panic:
                CALL panicindex

which moves the calls out of line, putting more useful
code in each cache line.  This matters especially in tight
loops, such as in Fannkuch.  The benefit is more modest
elsewhere, but real.

From test/bench/go1, amd64:

benchmark                old ns/op    new ns/op    delta
BenchmarkBinaryTree17   6096092000   6088808000   -0.12%
BenchmarkFannkuch11     6151404000   4020463000  -34.64%
BenchmarkGobDecode        28990050     28894630   -0.33%
BenchmarkGobEncode        12406310     12136730   -2.17%
BenchmarkGzip               179923       179903   -0.01%
BenchmarkGunzip              11219        11130   -0.79%
BenchmarkJSONEncode       86429350     86515900   +0.10%
BenchmarkJSONDecode      334593800    315728400   -5.64%
BenchmarkRevcomp25M     1219763000   1180767000   -3.20%
BenchmarkTemplate        492947600    483646800   -1.89%

And 386:

benchmark                old ns/op    new ns/op    delta
BenchmarkBinaryTree17   6354902000   6243000000   -1.76%
BenchmarkFannkuch11     8043769000   7326965000   -8.91%
BenchmarkGobDecode        19010800     18941230   -0.37%
BenchmarkGobEncode        14077500     13792460   -2.02%
BenchmarkGzip               194087       193619   -0.24%
BenchmarkGunzip              12495        12457   -0.30%
BenchmarkJSONEncode      125636400    125451400   -0.15%
BenchmarkJSONDecode      696648600    685032800   -1.67%
BenchmarkRevcomp25M     2058088000   2052545000   -0.27%
BenchmarkTemplate        602140000    589876800   -2.04%

To implement this, two new instruction forms:

        JLT target      // same as always
        JLT $0, target  // branch expected not taken
        JLT $1, target  // branch expected taken

The linker could also emit the prediction prefixes, but it
does not: expected taken branches are reversed so that the
expected case is not taken (as in example above), and
the default expectaton for such a jump is not taken
already.

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

12 years agoA+C: Peter Kleiweg (individual CLA)
Sameer Ajmani [Tue, 29 May 2012 15:12:31 +0000 (11:12 -0400)]
A+C: Peter Kleiweg (individual CLA)

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

12 years agoexp/html: implement Noah's Ark clause
Andrew Balholm [Tue, 29 May 2012 03:39:54 +0000 (13:39 +1000)]
exp/html: implement Noah's Ark clause

Implement the (3-per-family) Noah's Ark clause (i.e. don't put
more than three identical elements on the list of active formatting
elements.

Also, when running tests, sort attributes by name before dumping
them.

Pass 4 additional tests with Noah's Ark clause (including one
that needs attributes to be sorted).

Pass 5 additional, unrelated tests because of sorting attributes.

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

12 years agonet: fix comment on FileListener
Mikio Hara [Mon, 28 May 2012 21:13:56 +0000 (06:13 +0900)]
net: fix comment on FileListener

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

12 years agonet: make parsePort as a function
Mikio Hara [Mon, 28 May 2012 21:12:06 +0000 (06:12 +0900)]
net: make parsePort as a function

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

12 years agonet/http: avoid fmt.Fprintf in Header.WriteSubset
Brad Fitzpatrick [Mon, 28 May 2012 18:26:45 +0000 (11:26 -0700)]
net/http: avoid fmt.Fprintf in Header.WriteSubset

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

12 years agonet/http: avoid a bunch of unnecessary CanonicalHeaderKey calls
Brad Fitzpatrick [Mon, 28 May 2012 18:07:24 +0000 (11:07 -0700)]
net/http: avoid a bunch of unnecessary CanonicalHeaderKey calls

CanonicalHeaderKey didn't allocate, but it did use unnecessary
CPU in the hot path, deciding it didn't need to allocate.

I considered using constants for all these common header keys
but I didn't think it would be prettier. "Content-Length" looks
better than contentLength or hdrContentLength, etc.

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

12 years agonet/http: speed up ServeMux when no patterns contain hostnames
Brad Fitzpatrick [Mon, 28 May 2012 17:58:49 +0000 (10:58 -0700)]
net/http: speed up ServeMux when no patterns contain hostnames

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

12 years agonet/http: correct and faster hasToken
Brad Fitzpatrick [Mon, 28 May 2012 17:55:39 +0000 (10:55 -0700)]
net/http: correct and faster hasToken

Fixes #3535

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

12 years agonet/http: reuse http proxy connections for different http requests
Alexey Borzenkov [Mon, 28 May 2012 17:46:51 +0000 (10:46 -0700)]
net/http: reuse http proxy connections for different http requests

Comment on cache keys above connectMethod says "http to proxy, http
anywhere after that", however in reality target address was always
included, which prevented http requests to different target
addresses to reuse the same http proxy connection.

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

12 years agosyscall: simplify text returned by Errno.Error() when FormatMessage fails
Alex Brainman [Sun, 27 May 2012 08:57:16 +0000 (18:57 +1000)]
syscall: simplify text returned by Errno.Error() when FormatMessage fails

Fixes #3623.

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

12 years agonet/rpc: improve response reading logic
Alexey Borzenkov [Sat, 26 May 2012 21:27:36 +0000 (14:27 -0700)]
net/rpc: improve response reading logic

CL 5956051 introduced too many call != nil checks, so
attempt to improve this by splitting logic into three
distinct parts.

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

12 years agoimage/png: optimize the paeth filter implementation.
Nigel Tao [Fri, 25 May 2012 04:08:51 +0000 (14:08 +1000)]
image/png: optimize the paeth filter implementation.

image/png benchmarks:
benchmark                       old ns/op    new ns/op    delta
BenchmarkPaeth                         10            7  -29.21%
BenchmarkDecodeGray               2381745      2241620   -5.88%
BenchmarkDecodeNRGBAGradient      9535555      8835100   -7.35%
BenchmarkDecodeNRGBAOpaque        8189590      7611865   -7.05%
BenchmarkDecodePaletted           1300688      1301940   +0.10%
BenchmarkDecodeRGB                6760146      6317082   -6.55%
BenchmarkEncodePaletted           6048596      6122666   +1.22%
BenchmarkEncodeRGBOpaque         18891140     19474230   +3.09%
BenchmarkEncodeRGBA              78945350     78552600   -0.50%

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

The same program, but with a different PNG input file
(http://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png)
and only 100 iterations instead of 1000
Before: 4.78s
After:  4.42s
Delta:  -8%

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

12 years agocmd/8c: better fix for 64-bit register smash
Russ Cox [Fri, 25 May 2012 03:36:26 +0000 (23:36 -0400)]
cmd/8c: better fix for 64-bit register smash

Ken pointed out that CL 5998043 was ugly code.
This should be better.

Fixes #3501.

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

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

12 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

12 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

12 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