]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agocmd/ld: handle a special case of scattered relocation 2/1 on Darwin/386
Shenghou Ma [Wed, 29 Aug 2012 15:42:05 +0000 (23:42 +0800)]
cmd/ld: handle a special case of scattered relocation 2/1 on Darwin/386
        Fixes #1635.

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

12 years agosyscall: extract an ExampleLoadLibrary from comment
Shenghou Ma [Wed, 29 Aug 2012 13:44:46 +0000 (21:44 +0800)]
syscall: extract an ExampleLoadLibrary from comment
   while we are at it, fix some out-of-date comments.

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

12 years agoA+C: add Patrick Crosby (individual contributor)
Andrew Gerrand [Wed, 29 Aug 2012 03:24:53 +0000 (13:24 +1000)]
A+C: add Patrick Crosby (individual contributor)

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

12 years agonet/http/httputil: fix race in DumpRequestOut
Dave Cheney [Tue, 28 Aug 2012 23:05:30 +0000 (09:05 +1000)]
net/http/httputil: fix race in DumpRequestOut

Fixes #3892.

Swapping the order of the writers inside the MultiWriter ensures
the request will be written to buf before http.ReadRequest completes.

The fencedBuffer is not required to make the test pass on
any machine that I have access too, but as the buf is shared
across goroutines, I think it is necessary for correctness.

R=bradfitz, fullung, franciscossouza
CC=golang-dev
https://golang.org/cl/6483061

12 years agotest/bench/shootout: pidigits is much faster
Rob Pike [Tue, 28 Aug 2012 22:33:05 +0000 (15:33 -0700)]
test/bench/shootout: pidigits is much faster
Also fix a bug in the script (s/runonly/run/)

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

12 years agonet: delete unused socket-level option helpers
Mikio Hara [Tue, 28 Aug 2012 21:54:00 +0000 (06:54 +0900)]
net: delete unused socket-level option helpers

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

12 years agomath/big: Replace RCLQ + ANDQ with SETCS in unrolled arithmetic assembly.
Christopher Swenson [Tue, 28 Aug 2012 16:29:45 +0000 (09:29 -0700)]
math/big: Replace RCLQ + ANDQ with SETCS in unrolled arithmetic assembly.

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVW_1              8            8   +0.60%
BenchmarkAddVW_2             10            9   -8.64%
BenchmarkAddVW_3             10           10   -4.63%
BenchmarkAddVW_4             10           11   +3.67%
BenchmarkAddVW_5             11           12   +5.98%
BenchmarkAddVW_1e1           18           20   +6.38%
BenchmarkAddVW_1e2          129          115  -10.85%
BenchmarkAddVW_1e3         1270         1089  -14.25%
BenchmarkAddVW_1e4        13376        12145   -9.20%
BenchmarkAddVW_1e5       130392       125260   -3.94%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVW_1        7709.10      7661.92    0.99x
BenchmarkAddVW_2       12451.10     13604.00    1.09x
BenchmarkAddVW_3       17727.81     18721.54    1.06x
BenchmarkAddVW_4       23552.64     22708.81    0.96x
BenchmarkAddVW_5       27411.40     25816.22    0.94x
BenchmarkAddVW_1e1     34063.19     32023.06    0.94x
BenchmarkAddVW_1e2     49529.97     55360.55    1.12x
BenchmarkAddVW_1e3     50380.44     58764.18    1.17x
BenchmarkAddVW_1e4     47843.59     52696.10    1.10x
BenchmarkAddVW_1e5     49082.60     51093.66    1.04x

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

12 years agocmd/api: recognize version "devel" as dev. branch and apply -next
Shenghou Ma [Mon, 27 Aug 2012 20:03:27 +0000 (04:03 +0800)]
cmd/api: recognize version "devel" as dev. branch and apply -next

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

12 years agomisc/vim: fix for autocompletion
Tobias Columbus [Mon, 27 Aug 2012 19:59:16 +0000 (03:59 +0800)]
misc/vim: fix for autocompletion

    Vim autocompletion respects the $GOPATH variable and does not
    ignore dashes ('-'), dots ('.') and underscores ('_') like found
    in many remote packages.
    Environment variable $GOROOT is determined by calling
    'go env GOROOT' instead of relying on the user's environment
    variables.

    Fixes #3876
    Fixes #3882

R=golang-dev, franciscossouza, dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6443151

12 years agoC: add Tobias Columbus's email used in Rietveld
Shenghou Ma [Mon, 27 Aug 2012 19:57:27 +0000 (03:57 +0800)]
C: add Tobias Columbus's email used in Rietveld

R=golang-dev, tobias.columbus, bradfitz
CC=golang-dev
https://golang.org/cl/6483058

12 years agonet/http: send an explicit zero Content-Length when Handler never Writes
Brad Fitzpatrick [Sun, 26 Aug 2012 18:17:55 +0000 (11:17 -0700)]
net/http: send an explicit zero Content-Length when Handler never Writes

Fixes #4004

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

12 years agoruntime: use netbsd signal ABI v2
Joel Sing [Sun, 26 Aug 2012 10:57:47 +0000 (20:57 +1000)]
runtime: use netbsd signal ABI v2

Use version 2 of the NetBSD signal ABI - both version 2 and version 3
are supported by the kernel, with near identical behaviour. However,
the netbsd32 compat code does not allow version 3 to be used, which
prevents Go netbsd/386 binaries from running in compat mode on a
NetBSD amd64 kernel. Switch to version 2 of the ABI, which is the
same version currently used by NetBSD's libc.

R=minux.ma
CC=golang-dev
https://golang.org/cl/6476068

12 years agotest: use run.go for more tests.
Rémy Oudompheng [Sat, 25 Aug 2012 08:16:02 +0000 (10:16 +0200)]
test: use run.go for more tests.

R=golang-dev, alex.brainman, minux.ma
CC=golang-dev
https://golang.org/cl/6443110

12 years agomath/big: fix broken comment
Robert Griesemer [Fri, 24 Aug 2012 20:50:09 +0000 (13:50 -0700)]
math/big: fix broken comment

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

12 years agoVERSION: check in a version file for the development branch
Rob Pike [Fri, 24 Aug 2012 20:01:50 +0000 (13:01 -0700)]
VERSION: check in a version file for the development branch
That way "go version" will talk about "devel" rather than weekly.2012-03-27

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

12 years agotext/template: catch (A).X as a parse error
Rob Pike [Fri, 24 Aug 2012 20:00:24 +0000 (13:00 -0700)]
text/template: catch (A).X as a parse error
This shouldn't be an error (see issue 3999), but until it's handled
correctly, treat it as one to avoid confusion. Without this CL,
(A).X parses as two arguments.

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

12 years agotext/template: allow grouping of pipelines using parentheses
Rob Pike [Fri, 24 Aug 2012 19:37:23 +0000 (12:37 -0700)]
text/template: allow grouping of pipelines using parentheses

Based on work by Russ Cox. From his CL:

        This is generally useful but especially helpful when trying
        to use the built-in boolean operators.  It lets you write:

        {{if not (f 1)}} foo {{end}}
        {{if and (f 1) (g 2)}} bar {{end}}
        {{if or (f 1) (g 2)}} quux {{end}}

        instead of

        {{if f 1 | not}} foo {{end}}
        {{if f 1}}{{if g 2}} bar {{end}}{{end}}
        {{$do := 0}}{{if f 1}}{{$do := 1}}{{else if g 2}}{{$do := 1}}{{end}}{{if $do}} quux {{end}}

The result can be a bit LISPy but the benefit in expressiveness and readability
for such a small change justifies it.

I believe no changes are required to html/template.

Fixes #3276.

R=golang-dev, adg, rogpeppe, minux.ma
CC=golang-dev
https://golang.org/cl/6482056

12 years agomath/big: minor tweaks to assembly code (slightly better performance)
Robert Griesemer [Fri, 24 Aug 2012 17:51:39 +0000 (10:51 -0700)]
math/big: minor tweaks to assembly code (slightly better performance)

Benchmarks run on 2.8GHz Quad-Code Intel Xeon,
4GB 800MHz DDR2 FB-DIMM ("PowerMac").

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVV_1              7            7   -0.82%
BenchmarkAddVV_2              8            8   -3.46%
BenchmarkAddVV_3             10            9   -4.81%
BenchmarkAddVV_4              9            9   -1.89%
BenchmarkAddVV_5             11           10   -5.22%
BenchmarkAddVV_1e1           17           18   +4.05%
BenchmarkAddVV_1e2          117          115   -1.71%
BenchmarkAddVV_1e3         1095         1090   -0.46%
BenchmarkAddVV_1e4        13149        12679   -3.57%
BenchmarkAddVV_1e5       135133       129482   -4.18%
BenchmarkAddVW_1              6            6   -1.14%
BenchmarkAddVW_2              7            7   +3.78%
BenchmarkAddVW_3              8            8   +0.12%
BenchmarkAddVW_4              8            8   -6.52%
BenchmarkAddVW_5              9            8   -3.70%
BenchmarkAddVW_1e1           14           13   -4.29%
BenchmarkAddVW_1e2           97           96   -1.33%
BenchmarkAddVW_1e3          953          940   -1.36%
BenchmarkAddVW_1e4         9776         9527   -2.55%
BenchmarkAddVW_1e5       102396        97738   -4.55%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVV_1        8702.84      8774.56    1.01x
BenchmarkAddVV_2       14739.60     15277.82    1.04x
BenchmarkAddVV_3       18375.37     19398.16    1.06x
BenchmarkAddVV_4       26935.44     27464.68    1.02x
BenchmarkAddVV_5       27754.04     29423.30    1.06x
BenchmarkAddVV_1e1     37050.89     35629.72    0.96x
BenchmarkAddVV_1e2     54289.15     55533.24    1.02x
BenchmarkAddVV_1e3     58428.83     58682.53    1.00x
BenchmarkAddVV_1e4     48670.55     50475.99    1.04x
BenchmarkAddVV_1e5     47360.54     49427.66    1.04x
BenchmarkAddVW_1       10397.27     10502.23    1.01x
BenchmarkAddVW_2       17279.03     16654.13    0.96x
BenchmarkAddVW_3       23858.39     23825.89    1.00x
BenchmarkAddVW_4       29799.42     31895.06    1.07x
BenchmarkAddVW_5       34781.83     36105.11    1.04x
BenchmarkAddVW_1e1     45629.88     47597.42    1.04x
BenchmarkAddVW_1e2     65341.93     66240.04    1.01x
BenchmarkAddVW_1e3     67153.67     68069.83    1.01x
BenchmarkAddVW_1e4     65464.60     67173.83    1.03x
BenchmarkAddVW_1e5     62501.88     65480.66    1.05x

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

12 years agomath/big: faster (add|sub)V(V|W) routines
Robert Griesemer [Fri, 24 Aug 2012 16:20:44 +0000 (09:20 -0700)]
math/big: faster (add|sub)V(V|W) routines

Benchmarks run on 3.06GHz Intel Core 2 Duo,
4GB 800MHz DDR2 SDRAM ("iMac").

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVV_1              6            6   +2.75%
BenchmarkAddVV_2              9            7  -19.71%
BenchmarkAddVV_3              9            9   +2.25%
BenchmarkAddVV_4             10            8  -20.46%
BenchmarkAddVV_5             12           10  -19.53%
BenchmarkAddVV_1e1           23           15  -32.48%
BenchmarkAddVV_1e2          213          107  -49.77%
BenchmarkAddVV_1e3         2088          993  -52.44%
BenchmarkAddVV_1e4        20874        12027  -42.38%
BenchmarkAddVV_1e5       209858       121480  -42.11%
BenchmarkAddVW_1              5            5   +0.90%
BenchmarkAddVW_2             11           11   -3.51%
BenchmarkAddVW_3              7            7   -0.27%
BenchmarkAddVW_4              8            7   -6.32%
BenchmarkAddVW_5              9            8  -10.89%
BenchmarkAddVW_1e1           17           12  -26.01%
BenchmarkAddVW_1e2          155           89  -42.32%
BenchmarkAddVW_1e3         1479          873  -40.97%
BenchmarkAddVW_1e4        13838         8764  -36.67%
BenchmarkAddVW_1e5       147353        89560  -39.22%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVV_1        9765.57      9508.55    0.97x
BenchmarkAddVV_2       13077.63     16284.97    1.25x
BenchmarkAddVV_3       20599.58     20156.67    0.98x
BenchmarkAddVV_4       23591.58     29516.02    1.25x
BenchmarkAddVV_5       24920.95     31194.10    1.25x
BenchmarkAddVV_1e1     27393.76     40621.71    1.48x
BenchmarkAddVV_1e2     29911.96     59592.99    1.99x
BenchmarkAddVV_1e3     30650.73     64429.84    2.10x
BenchmarkAddVV_1e4     30660.09     53213.08    1.74x
BenchmarkAddVV_1e5     30496.74     52683.46    1.73x
BenchmarkAddVW_1       11503.39     11405.98    0.99x
BenchmarkAddVW_2       11203.56     11586.92    1.03x
BenchmarkAddVW_3       26173.45     26224.75    1.00x
BenchmarkAddVW_4       30560.30     32621.94    1.07x
BenchmarkAddVW_5       33183.81     37269.94    1.12x
BenchmarkAddVW_1e1     36991.75     50098.53    1.35x
BenchmarkAddVW_1e2     41087.14     71549.93    1.74x
BenchmarkAddVW_1e3     43266.42     73279.83    1.69x
BenchmarkAddVW_1e4     46246.74     73021.97    1.58x
BenchmarkAddVW_1e5     43433.00     71459.96    1.65x

Benchmarks run on 2.8GHz Quad-Code Intel Xeon,
4GB 800MHz DDR2 FB-DIMM ("PowerMac").

benchmark             old ns/op    new ns/op    delta
BenchmarkAddVV_1              7            7   +2.51%
BenchmarkAddVV_2              8            8   +3.70%
BenchmarkAddVV_3             10           10   +4.00%
BenchmarkAddVV_4             11            9  -19.49%
BenchmarkAddVV_5             14           11  -18.44%
BenchmarkAddVV_1e1           23           17  -27.00%
BenchmarkAddVV_1e2          234          117  -50.00%
BenchmarkAddVV_1e3         2284         1095  -52.06%
BenchmarkAddVV_1e4        22906        13149  -42.60%
BenchmarkAddVV_1e5       229860       135133  -41.21%
BenchmarkAddVW_1              6            6   +1.15%
BenchmarkAddVW_2              7            7   +1.37%
BenchmarkAddVW_3              7            8   +1.00%
BenchmarkAddVW_4              9            8   -6.93%
BenchmarkAddVW_5             10            9  -13.21%
BenchmarkAddVW_1e1           18           14  -24.32%
BenchmarkAddVW_1e2          170           97  -42.41%
BenchmarkAddVW_1e3         1619          953  -41.14%
BenchmarkAddVW_1e4        15142         9776  -35.44%
BenchmarkAddVW_1e5       160835       102396  -36.33%

benchmark              old MB/s     new MB/s  speedup
BenchmarkAddVV_1        8928.95      8702.84    0.97x
BenchmarkAddVV_2       15298.84     14739.60    0.96x
BenchmarkAddVV_3       19116.52     18375.37    0.96x
BenchmarkAddVV_4       21644.30     26935.44    1.24x
BenchmarkAddVV_5       22771.64     27754.04    1.22x
BenchmarkAddVV_1e1     27017.62     37050.89    1.37x
BenchmarkAddVV_1e2     27326.09     54289.15    1.99x
BenchmarkAddVV_1e3     28016.84     58428.83    2.09x
BenchmarkAddVV_1e4     27939.38     48670.55    1.74x
BenchmarkAddVV_1e5     27843.00     47360.54    1.70x
BenchmarkAddVW_1       10510.97     10397.27    0.99x
BenchmarkAddVW_2       17499.71     17279.03    0.99x
BenchmarkAddVW_3       24093.93     23858.39    0.99x
BenchmarkAddVW_4       27733.08     29799.42    1.07x
BenchmarkAddVW_5       30267.17     34781.83    1.15x
BenchmarkAddVW_1e1     34566.78     45629.88    1.32x
BenchmarkAddVW_1e2     37521.89     65341.93    1.74x
BenchmarkAddVW_1e3     39513.18     67153.67    1.70x
BenchmarkAddVW_1e4     42263.80     65464.60    1.55x
BenchmarkAddVW_1e5     39792.21     62501.88    1.57x

R=iant, remyoudompheng, nightlyone, minux.ma
CC=golang-dev
https://golang.org/cl/6482062

12 years agoexp/locale/collate: add code to ignore tests with (unpaired) surrogates.
Marcel van Lohuizen [Fri, 24 Aug 2012 13:56:07 +0000 (15:56 +0200)]
exp/locale/collate: add code to ignore tests with (unpaired) surrogates.
In the regtest data, surrogates are assigned primary weights based on
the surrogate code point value.  Go now converts surrogates to FFFD, however,
meaning that the primary weight is based on this code point instead.
This change drops tests with surrogates and lets the tests pass.

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

12 years agonet/http: add parallel client/server benchmark
Dmitriy Vyukov [Fri, 24 Aug 2012 10:19:49 +0000 (14:19 +0400)]
net/http: add parallel client/server benchmark
R=bradfitz@golang.org

R=bradfitz
CC=bradfitz, dave, dsymonds, gobot, golang-dev
https://golang.org/cl/6441134

12 years agoexp/html: remove unused forTag function.
Nigel Tao [Fri, 24 Aug 2012 04:15:55 +0000 (14:15 +1000)]
exp/html: remove unused forTag function.

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

12 years agodatabase/sql: stop reuse of bad connections
Julien Schmidt [Fri, 24 Aug 2012 02:29:47 +0000 (19:29 -0700)]
database/sql: stop reuse of bad connections

The second parameter for sql.putConn() (err) is always nil. As a result bad
connections are reused, even if the driver returns an driver.ErrBadConn.
Unsing a pointer to err instead achievs the desired behavior.
See http://code.google.com/p/go/issues/detail?id=3777 for more details.
Fixes #3777.

R=golang-dev, dave, bradfitz, jameshuachow, BlakeSGentry
CC=golang-dev
https://golang.org/cl/6348069

12 years agoA+C: Add Julien Schmidt (Individual CLA)
Brad Fitzpatrick [Fri, 24 Aug 2012 02:29:15 +0000 (19:29 -0700)]
A+C: Add Julien Schmidt (Individual CLA)

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

12 years agoA+C: Tobias Columbus (individual CLA)
David Symonds [Fri, 24 Aug 2012 01:55:11 +0000 (11:55 +1000)]
A+C: Tobias Columbus (individual CLA)

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

12 years agogo/scanner: don't drop identifiers starting with non-ASCII letter...
Robert Griesemer [Fri, 24 Aug 2012 00:03:33 +0000 (17:03 -0700)]
go/scanner: don't drop identifiers starting with non-ASCII letter...

Bug introduced with CL 6454150.

Fixes #4000.

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

12 years agomath/big: added benchmarks to establish baseline for core functions
Robert Griesemer [Thu, 23 Aug 2012 22:56:14 +0000 (15:56 -0700)]
math/big: added benchmarks to establish baseline for core functions

BenchmarkAddVV_1          500000000        7.24 ns/op     8844.11 MB/s
BenchmarkAddVV_2          100000000       10.4 ns/op     12290.41 MB/s
BenchmarkAddVV_3          100000000       10.7 ns/op     17966.58 MB/s
BenchmarkAddVV_4          100000000       12.3 ns/op     20848.67 MB/s
BenchmarkAddVV_5          100000000       14.5 ns/op     21993.82 MB/s
BenchmarkAddVV_1e1        100000000       24.0 ns/op     26720.65 MB/s
BenchmarkAddVV_1e2         10000000      246 ns/op       26014.58 MB/s
BenchmarkAddVV_1e3          1000000     2416 ns/op       26485.06 MB/s
BenchmarkAddVV_1e4           100000    23874 ns/op       26806.36 MB/s
BenchmarkAddVV_1e5            10000   241155 ns/op       26538.87 MB/s
BenchmarkAddVW_1          500000000        6.12 ns/op    10461.91 MB/s
BenchmarkAddVW_2          200000000       11.0 ns/op     11596.63 MB/s
BenchmarkAddVW_3          200000000        8.97 ns/op    21409.82 MB/s
BenchmarkAddVW_4          100000000       10.8 ns/op     23696.72 MB/s
BenchmarkAddVW_5          100000000       12.5 ns/op     25524.88 MB/s
BenchmarkAddVW_1e1        100000000       21.5 ns/op     29786.32 MB/s
BenchmarkAddVW_1e2         10000000      168 ns/op       37925.36 MB/s
BenchmarkAddVW_1e3          1000000     1658 ns/op       38579.15 MB/s
BenchmarkAddVW_1e4           100000    16492 ns/op       38805.85 MB/s
BenchmarkAddVW_1e5            10000   172155 ns/op       37175.69 MB/s
BenchmarkAddMulVVW_1      100000000       12.9 ns/op      4968.49 MB/s
BenchmarkAddMulVVW_2      100000000       15.5 ns/op      8279.42 MB/s
BenchmarkAddMulVVW_3      100000000       13.4 ns/op     14340.53 MB/s
BenchmarkAddMulVVW_4      100000000       15.8 ns/op     16194.94 MB/s
BenchmarkAddMulVVW_5      100000000       18.9 ns/op     16906.61 MB/s
BenchmarkAddMulVVW_1e1     50000000       32.3 ns/op     19838.35 MB/s
BenchmarkAddMulVVW_1e2     10000000      285 ns/op       22427.28 MB/s
BenchmarkAddMulVVW_1e3      1000000     2777 ns/op       23040.42 MB/s
BenchmarkAddMulVVW_1e4       100000    27901 ns/op       22938.01 MB/s
BenchmarkAddMulVVW_1e5        10000   281087 ns/op       22768.73 MB/s

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

12 years agocrypto/tls: return better error message in the case of an SSLv2 handshake.
Adam Langley [Thu, 23 Aug 2012 20:44:44 +0000 (16:44 -0400)]
crypto/tls: return better error message in the case of an SSLv2 handshake.

Update #3930
Return a better error message in this situation.

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

12 years agonet: avoid nil pointer dereference when RemoteAddr.String method chain is called
Mikio Hara [Thu, 23 Aug 2012 11:54:00 +0000 (20:54 +0900)]
net: avoid nil pointer dereference when RemoteAddr.String method chain is called

Fixes #3721.

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

12 years agocmd/6g: fix float32/64->uint64 conversion
Shenghou Ma [Thu, 23 Aug 2012 06:35:26 +0000 (14:35 +0800)]
cmd/6g: fix float32/64->uint64 conversion
    CVTSS2SQ's rounding mode is controlled by the RC field of MXCSR;
as we specifically need truncate semantic, we should use CVTTSS2SQ.

    Fixes #3804.

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

12 years agocmd/ld: set ELF header flags for our Linux/ARM binary
Shenghou Ma [Thu, 23 Aug 2012 06:33:41 +0000 (14:33 +0800)]
cmd/ld: set ELF header flags for our Linux/ARM binary
To make it more compliant.
This won't affect the behavior of running on OABI-only kernels.

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

12 years agocmd/8g: roll back the small integer constant optimizations introduced
Nigel Tao [Thu, 23 Aug 2012 06:17:22 +0000 (16:17 +1000)]
cmd/8g: roll back the small integer constant optimizations introduced
in 13416:67c0b8c8fb29 "faster code, mainly for rotate" [1]. The codegen
can run out of registers if there are too many small-int arithmetic ops.

An alternative approach is to copy 6g's sbop/abop codegen to 8g, but
this change is less risky.

Fixes #3835.

[1] http://code.google.com/p/go/source/diff?spec=svn67c0b8c8fb29b1b7b6221977af6b89cae787b941&name=67c0b8c8fb29&r=67c0b8c8fb29b1b7b6221977af6b89cae787b941&format=side&path=/src/cmd/8g/cgen.c

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

12 years agotime: fix spacing in comment.
Rob Pike [Thu, 23 Aug 2012 04:30:18 +0000 (21:30 -0700)]
time: fix spacing in comment.
No semantic change.

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

12 years agotime: add YearDay method for time.Time structs
Carlos Castillo [Thu, 23 Aug 2012 03:49:16 +0000 (20:49 -0700)]
time: add YearDay method for time.Time structs

YearDay provides the day in the year represented by a given time.Time
object. This value is normally computed as part of other date calculations,
but not exported.

Fixes #3932.

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

12 years agoC+A: add Carlos Castillo cookieo9@gmail.com (individual CLA)
Rob Pike [Thu, 23 Aug 2012 03:48:54 +0000 (20:48 -0700)]
C+A: add Carlos Castillo cookieo9@gmail.com (individual CLA)

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

12 years agotime: avoid data race in abs
Rob Pike [Wed, 22 Aug 2012 21:36:23 +0000 (14:36 -0700)]
time: avoid data race in abs
Fixes #3967.

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

12 years agonet/http: Set TLSClientConfig.ServerName on every HTTP request.
Dave Borowitz [Wed, 22 Aug 2012 16:15:41 +0000 (09:15 -0700)]
net/http: Set TLSClientConfig.ServerName on every HTTP request.

This makes SNI "just work" for callers using the standard http.Client.

Since we now have a test that depends on the httptest.Server cert, change
the cert to be a CA (keeping all other fields the same).

R=bradfitz
CC=agl, dsymonds, gobot, golang-dev
https://golang.org/cl/6448154

12 years agoCONTRIBUTORS: Add Dave Borowitz (Google CLA)
Brad Fitzpatrick [Wed, 22 Aug 2012 16:01:30 +0000 (09:01 -0700)]
CONTRIBUTORS: Add Dave Borowitz (Google CLA)

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

12 years agocmd/go: fix cgo linking on netbsd
Joel Sing [Wed, 22 Aug 2012 12:23:56 +0000 (22:23 +1000)]
cmd/go: fix cgo linking on netbsd

NetBSD's built-in linker script for 'ld -r' does not provide a
SEARCH_DIR. As a result libgcc.a is not found when -lgcc is used.

Work around this by determining the path to libgcc (by invoking
gcc with the -print-libgcc-file-name option) and explicitly
referencing the resulting library.

R=golang-dev, iant, aram, lucio.dere, minux.ma
CC=golang-dev
https://golang.org/cl/6470044

12 years agoarchive/zip: zip64 support
Joakim Sernbrant [Wed, 22 Aug 2012 01:05:24 +0000 (11:05 +1000)]
archive/zip: zip64 support

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

12 years agoA+C: add Joakim Sernbrant
Andrew Gerrand [Wed, 22 Aug 2012 01:03:20 +0000 (11:03 +1000)]
A+C: add Joakim Sernbrant

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

12 years agoexp/html: refactor the parser.read method.
Nigel Tao [Tue, 21 Aug 2012 10:59:02 +0000 (20:59 +1000)]
exp/html: refactor the parser.read method.

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

12 years agonet/http: fix misplaced defer and example
Dave Cheney [Tue, 21 Aug 2012 01:46:07 +0000 (11:46 +1000)]
net/http: fix misplaced defer and example

Moves the defer (again).

Also, correct the example documentation to match.

R=r, robert.hencke, iant, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/6458158

12 years agonet/http: fix send on close channel error
Dave Cheney [Tue, 21 Aug 2012 01:18:16 +0000 (11:18 +1000)]
net/http: fix send on close channel error

Fixes #3793.

Tested using GOMAXPROCS=81 which was able to trigger a panic
in TestStressSurpriseServerCloses continually on a Core i5.

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

12 years agoos: fix data race on Process.done
Dave Cheney [Tue, 21 Aug 2012 00:41:31 +0000 (10:41 +1000)]
os: fix data race on Process.done

Fixes #3969.

R=dvyukov, r, alex.brainman, minux.ma
CC=golang-dev
https://golang.org/cl/6462081

12 years agonet: add TCP benchmarks
Dmitriy Vyukov [Mon, 20 Aug 2012 17:27:52 +0000 (21:27 +0400)]
net: add TCP benchmarks
Current results on linux_amd64, 8 HT cores @2.4GHz:
BenchmarkTCPOneShot    10000     194037 ns/op
BenchmarkTCPOneShot-2    20000      93641 ns/op
BenchmarkTCPOneShot-4    20000      94039 ns/op
BenchmarkTCPOneShot-8    20000      94667 ns/op
BenchmarkTCPOneShot-16    10000     301924 ns/op
BenchmarkTCPOneShotTimeout    10000     193264 ns/op
BenchmarkTCPOneShotTimeout-2    20000      98247 ns/op
BenchmarkTCPOneShotTimeout-4    20000      94442 ns/op
BenchmarkTCPOneShotTimeout-8    20000      95297 ns/op
BenchmarkTCPOneShotTimeout-16    10000     307970 ns/op
BenchmarkTCPPersistent    50000      52050 ns/op
BenchmarkTCPPersistent-2   100000      29452 ns/op
BenchmarkTCPPersistent-4   100000      28823 ns/op
BenchmarkTCPPersistent-8    50000      30473 ns/op
BenchmarkTCPPersistent-16    10000     311777 ns/op
BenchmarkTCPPersistentTimeout    50000      32574 ns/op
BenchmarkTCPPersistentTimeout-2    50000      29723 ns/op
BenchmarkTCPPersistentTimeout-4   100000      28592 ns/op
BenchmarkTCPPersistentTimeout-8   100000      28997 ns/op
BenchmarkTCPPersistentTimeout-16    10000     314354 ns/op

R=golang-dev, alex.brainman, dave, mikioh.mikioh, r, iant, bradfitz, iant
CC=golang-dev
https://golang.org/cl/6458128

12 years agocmd/ld: skip R_*_NONE relocations, fix Linux/386 build again
Shenghou Ma [Mon, 20 Aug 2012 16:34:06 +0000 (00:34 +0800)]
cmd/ld: skip R_*_NONE relocations, fix Linux/386 build again
The last fix was wrong w.r.t C's operator precedence,
and it also failed to really skip the NONE relocation.

The offending R_386_NONE relocation is a absolute
relocation in section .eh_frame.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/6463058

12 years agodoc/install: we only need command line tools for Xcode on OS X
Shenghou Ma [Mon, 20 Aug 2012 13:21:09 +0000 (21:21 +0800)]
doc/install: we only need command line tools for Xcode on OS X
     Fixes #3973.

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

12 years agostrconv: consistent parameter names for ParseUint
Volker Dobler [Mon, 20 Aug 2012 12:30:04 +0000 (22:30 +1000)]
strconv: consistent parameter names for ParseUint

If ParseUint is like ParseInt it should have the same parameter
names, thus rename b to to base as in ParseInt's documentation.

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

12 years agonet/http: reduce mutex contention
Dmitriy Vyukov [Mon, 20 Aug 2012 09:28:27 +0000 (13:28 +0400)]
net/http: reduce mutex contention
benchmark                           old ns/op    new ns/op    delta
BenchmarkClientServerParallel          155909       154454   -0.93%
BenchmarkClientServerParallel-2         86012        82986   -3.52%
BenchmarkClientServerParallel-4         70211        55168  -21.43%
BenchmarkClientServerParallel-8         80755        47862  -40.73%
BenchmarkClientServerParallel-12        77753        51478  -33.79%
BenchmarkClientServerParallel-16        77920        50278  -35.47%
The benchmark is https://golang.org/cl/6441134
The machine is 2 x 4 HT cores (16 HW threads total).
Fixes #3946.
Now contention moves to net.pollServer.AddFD().

R=bradfitz
CC=bradfitz, dave, dsymonds, gobot, golang-dev, remyoudompheng
https://golang.org/cl/6454142

12 years agoexp/locale/collate/build: fixed bug that was exposed by experimenting
Marcel van Lohuizen [Mon, 20 Aug 2012 08:56:41 +0000 (10:56 +0200)]
exp/locale/collate/build: fixed bug that was exposed by experimenting
with table changes.
NOTE: there is no test for this, but 1) the code has now the same
control flow as scan in exp/locale/collate/contract.go, which is
tested and 2) Builder verifies the generated table so bugs in this
code are quickly and easily found (which is how this bug was discovered).

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

12 years agoexp/locale/collate: let regtest generate its own collation table.
Marcel van Lohuizen [Mon, 20 Aug 2012 08:56:19 +0000 (10:56 +0200)]
exp/locale/collate: let regtest generate its own collation table.
The main table will need to get a slightly different collation table as the one
used by regtest, as the regtest is based on the standard UCA DUCET, while
the locale-specific tables are all based on a CLDR root table.
This change allows changing the table without affecting the regression test.

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

12 years agoexp/locale/collate: changed default AlternateHandling to non-ignorable, the same
Marcel van Lohuizen [Mon, 20 Aug 2012 08:56:06 +0000 (10:56 +0200)]
exp/locale/collate: changed default AlternateHandling to non-ignorable, the same
default as ICU.

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

12 years agoexp/locale/collate: Added test flag to maketables tool for comparing newly
Marcel van Lohuizen [Mon, 20 Aug 2012 08:55:40 +0000 (10:55 +0200)]
exp/locale/collate: Added test flag to maketables tool for comparing newly
against previously generated tables.

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

12 years agoexp/html: make the parser manipulate the tokenizer via exported methods
Nigel Tao [Mon, 20 Aug 2012 01:04:36 +0000 (11:04 +1000)]
exp/html: make the parser manipulate the tokenizer via exported methods
instead of touching the tokenizer's internal state.

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

12 years agocrypto/tls: explicitly require ExtKeyUsageClientAuth for client certs
Mikkel Krautz [Sat, 18 Aug 2012 22:50:33 +0000 (15:50 -0700)]
crypto/tls: explicitly require ExtKeyUsageClientAuth for client certs

If we aren't explicit about the KeyUsages, the verifier
will treat the certificate as a server certificate and require
it to have a ExtKeyUsageServerAuth key usage.

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

12 years agopprof: make it work on windows again
Alex Brainman [Sat, 18 Aug 2012 07:03:32 +0000 (17:03 +1000)]
pprof: make it work on windows again

- pprof is a perl script, so go command should invoke
  perl instead of trying to run pprof directly;
- pprof should use "go tool nm" unconditionally on windows,
  no one else can extract symbols from Go program;
- pprof should use "go tool nm" instead of "6nm".

Fixes #3879.

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

12 years agofmt: honor integer radix formats (%d etc.) for pointers
Rob Pike [Fri, 17 Aug 2012 23:12:25 +0000 (16:12 -0700)]
fmt: honor integer radix formats (%d etc.) for pointers
Before, pointers always appeared as 0x1234ABCD. This CL
keeps that as the default for %p and %v, but lets explicit
numeric verbs override the default.
Fixes #3936.

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

12 years agoall: move defers to after error check to avoid nil indirection
Rob Pike [Fri, 17 Aug 2012 18:55:11 +0000 (11:55 -0700)]
all: move defers to after error check to avoid nil indirection
Only affects some tests and none seem likely to be problematic, but let's fix them.
Fixes #3971.

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

12 years agogo_spec: unary + and - are also defined for complex types
Robert Griesemer [Fri, 17 Aug 2012 18:36:21 +0000 (11:36 -0700)]
go_spec: unary + and - are also defined for complex types

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

12 years agoruntime: fix netbsd/386 stack pointer handling
Joel Sing [Fri, 17 Aug 2012 11:53:02 +0000 (21:53 +1000)]
runtime: fix netbsd/386 stack pointer handling

When manipulating the stack pointer use the UESP register instead
of the ESP register, since the UESP register is the one that gets
restored from the machine context. Fixes broken tests on netbsd/386.

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

12 years agomisc/cgo/test: disable test on windows (attempt to fix windows build)
Alex Brainman [Fri, 17 Aug 2012 04:15:01 +0000 (14:15 +1000)]
misc/cgo/test: disable test on windows (attempt to fix windows build)

see issus 3358 for similar problem

R=golang-dev
CC=golang-dev, minux.ma
https://golang.org/cl/6464072

12 years agocmd/ld: explicitly ignore R_*_NONE relocation to fix build
Shenghou Ma [Fri, 17 Aug 2012 01:11:58 +0000 (09:11 +0800)]
cmd/ld: explicitly ignore R_*_NONE relocation to fix build
        I don't know why this relocation is used.

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

12 years agomisc/cgo/life: remove -lmsvcrt to fix windows/amd64 build
Shenghou Ma [Fri, 17 Aug 2012 01:10:01 +0000 (09:10 +0800)]
misc/cgo/life: remove -lmsvcrt to fix windows/amd64 build
        I guess this is the problem as I can't reproduce the failure.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/6465060

12 years agocmd/go: new cgo build procedure
Shenghou Ma [Thu, 16 Aug 2012 19:42:34 +0000 (03:42 +0800)]
cmd/go: new cgo build procedure
   This CL adds a step to the build procedure for cgo programs. It uses 'ld -r'
to combine all gcc compiled object file and generate a relocatable object file
for our ld. Additionally, this linking step will combine some static linking
gcc library into the relocatable object file, so that we can use libgcc,
libmingwex and libmingw32 without problem.

   Fixes #3261.
   Fixes #1741.
   Added a testcase for linking in libgcc.

TODO:
1. still need to fix the INDIRECT_SYMBOL_LOCAL problem on Darwin/386.
2. still need to enable the libgcc test on Linux/ARM, because 5l can't deal
with thumb libgcc.

Tested on Darwin/amd64, Darwin/386, FreeBSD/amd64, FreeBSD/386, Linux/amd64,
Linux/386, Linux/ARM, Windows/amd64, Windows/386

R=iant, rsc, bradfitz, coldredlemur
CC=golang-dev
https://golang.org/cl/5822049

12 years agomisc/cgo/test: remove unused Makefile
Dave Cheney [Thu, 16 Aug 2012 10:19:54 +0000 (20:19 +1000)]
misc/cgo/test: remove unused Makefile

R=golang-dev, minux.ma, iant
CC=golang-dev
https://golang.org/cl/6459091

12 years agotest: change run.go to ignore \r in compiler output (fixes windows build)
Alex Brainman [Thu, 16 Aug 2012 06:46:59 +0000 (16:46 +1000)]
test: change run.go to ignore \r in compiler output (fixes windows build)

R=golang-dev, dave, minux.ma, remyoudompheng
CC=golang-dev
https://golang.org/cl/6460093

12 years agocmd/gc: Don't claim type assertion would help when it wont.
Daniel Morsing [Wed, 15 Aug 2012 23:53:06 +0000 (16:53 -0700)]
cmd/gc: Don't claim type assertion would help when it wont.

Fixes #3465.

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

12 years agoexp/html: simplify testing code
Andrew Balholm [Wed, 15 Aug 2012 23:31:22 +0000 (09:31 +1000)]
exp/html: simplify testing code

Now that the parser passes all tests in the test suite,
it is no longer necessary to keep track of which tests
pass and which don't. So remove the testlogs directory
and the code that uses it.

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

12 years agoA+C: Andrew Lutomirski (individual CLA)
Ian Lance Taylor [Wed, 15 Aug 2012 21:44:17 +0000 (14:44 -0700)]
A+C: Andrew Lutomirski (individual CLA)

Wrote code that was the basis for
https://golang.org/cl/6454046/

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

12 years agotext/scanner: report illegal hexadecimal numbers (bug fix)
Robert Griesemer [Wed, 15 Aug 2012 18:09:34 +0000 (11:09 -0700)]
text/scanner: report illegal hexadecimal numbers (bug fix)

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

12 years agoos/exec: disable additional file descriptor test on netbsd
Joel Sing [Wed, 15 Aug 2012 16:06:21 +0000 (02:06 +1000)]
os/exec: disable additional file descriptor test on netbsd

This currently fails on NetBSD due to the cloned file descriptors
that result from opening /dev/urandom. Disable the additional checking
until this is investigated and properly fixed.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6443129

12 years agoruntime: disable crash handler test on netbsd
Joel Sing [Wed, 15 Aug 2012 16:02:00 +0000 (02:02 +1000)]
runtime: disable crash handler test on netbsd

Disable the crash handler test on NetBSD until I can figure out why
it triggers failures in later tests.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6460090

12 years agonet: implement netbsd sockoptip
Joel Sing [Wed, 15 Aug 2012 14:44:20 +0000 (00:44 +1000)]
net: implement netbsd sockoptip

Provide sockoptip for NetBSD, based on sockoptip for OpenBSD.

R=golang-dev, rsc, mikioh.mikioh, minux.ma
CC=golang-dev
https://golang.org/cl/6308053

12 years agocmd/go: skipping relative paths on go test -i ./...
Francisco Souza [Wed, 15 Aug 2012 14:32:49 +0000 (07:32 -0700)]
cmd/go: skipping relative paths on go test -i ./...

Fixes #3896.

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

12 years agoexp/html: skip render and reparse on more tests that build badly-formed parse trees
Andrew Balholm [Wed, 15 Aug 2012 01:44:25 +0000 (11:44 +1000)]
exp/html: skip render and reparse on more tests that build badly-formed parse trees

All of the remaining tests that had as status of PARSE rather than PASS had
good reasons for not passing the render-and-reparse step: the correct parse tree is
badly formed, so when it is rendered out as HTML, the result doesn't parse into the
same tree. So add them to the list of tests where that step is skipped.

Also, I discovered that it is possible to end up with HTML elements (not just text)
inside a raw text element through reparenting. So change the rendering routines to
handle that situation as sensibly as possible (which still isn't very sensible, but
this is HTML5).

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

12 years ago5l: trivial whitespace cleanup
Robert Hencke [Wed, 15 Aug 2012 00:32:44 +0000 (10:32 +1000)]
5l: trivial whitespace cleanup

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

12 years agoapi: add recent API additions to next.txt
Benny Siegert [Wed, 15 Aug 2012 00:30:20 +0000 (10:30 +1000)]
api: add recent API additions to next.txt

R=golang-dev, nigeltao, minux.ma
CC=golang-dev
https://golang.org/cl/6441138

12 years agogo/scanner: faster scanning
Robert Griesemer [Tue, 14 Aug 2012 18:26:30 +0000 (11:26 -0700)]
go/scanner: faster scanning

Optimize some common cases.

benchmark            old ns/op    new ns/op    delta
BenchmarkScanFile       718907       667960   -7.09%

benchmark             old MB/s     new MB/s  speedup
BenchmarkScanFile        23.03        25.51    1.11x

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

12 years agoexp/proxy: remove package.
Adam Langley [Tue, 14 Aug 2012 17:04:14 +0000 (13:04 -0400)]
exp/proxy: remove package.

This package has moved to go.net.

R=golang-dev, minux.ma, r, dave
CC=golang-dev
https://golang.org/cl/6461056

12 years agoexp/html: generate replacement for <isindex> correctly
Andrew Balholm [Mon, 13 Aug 2012 23:53:10 +0000 (09:53 +1000)]
exp/html: generate replacement for <isindex> correctly

When generating replacement elements for an <isindex> tag, the old
addSyntheticElement method was producing the wrong nesting. Replace
it with parseImpliedToken.

Pass the one remaining test in the test suite.

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

12 years agonet: remove unused fields
Dmitriy Vyukov [Mon, 13 Aug 2012 21:57:24 +0000 (01:57 +0400)]
net: remove unused fields

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

12 years agoruntime/pprof: fix comments
Dmitriy Vyukov [Mon, 13 Aug 2012 21:51:42 +0000 (01:51 +0400)]
runtime/pprof: fix comments

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

12 years agoexp/html: discard tags that are terminated by EOF instead of by '>'
Andrew Balholm [Mon, 13 Aug 2012 02:07:44 +0000 (12:07 +1000)]
exp/html: discard tags that are terminated by EOF instead of by '>'

If a tag doesn't have a closing '>', it isn't considered a tag;
it is just ignored and EOF is returned instead.

Pass one additional test in the test suite.

Change tokenizer tests to match correct behavior.

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

12 years agogo/parser: exit early if source file does not contain text
Robert Griesemer [Sun, 12 Aug 2012 04:06:40 +0000 (21:06 -0700)]
go/parser: exit early if source file does not contain text

Partial fix for issue 3943.

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

12 years agotext/template/parse: fix bug handling /*/
Rob Pike [Fri, 10 Aug 2012 02:24:46 +0000 (19:24 -0700)]
text/template/parse: fix bug handling /*/
Incorrect syntax for comment was erroneously accepted.
Fixes #3919.

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

12 years agoruntime: use sched_getaffinity for runtime.NumCPU() on Linux
Shenghou Ma [Fri, 10 Aug 2012 02:05:26 +0000 (10:05 +0800)]
runtime: use sched_getaffinity for runtime.NumCPU() on Linux
        Fixes #3921.

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

12 years agoexp/html: ignore self-closing flag except in SVG and MathML
Andrew Balholm [Thu, 9 Aug 2012 23:34:10 +0000 (09:34 +1000)]
exp/html: ignore self-closing flag except in SVG and MathML

In HTML content, having a self-closing tag is a parse error unless
the tag would be self-closing anyway (like <img>). The only place a
self-closing tag actually makes a difference is in XML-based foreign
content.

Pass 1 additional test.

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

12 years agogodoc: report error for directories with multiple packages
Robert Griesemer [Thu, 9 Aug 2012 23:10:46 +0000 (16:10 -0700)]
godoc: report error for directories with multiple packages

Fixes #3922.

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

12 years agogo/build: correct shouldBuild bug reading whole contents of file.
Rémy Oudompheng [Thu, 9 Aug 2012 21:22:51 +0000 (23:22 +0200)]
go/build: correct shouldBuild bug reading whole contents of file.

It was caused by bytes.TrimSpace being able to return a nil
slice.

Fixes #3914.

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

12 years agoexp/types: add more import tests
Robert Griesemer [Thu, 9 Aug 2012 18:55:00 +0000 (11:55 -0700)]
exp/types: add more import tests

Also simplified parsing of interface
types since they can only contain
methods (and no embedded interfaces)
in the export data.

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

12 years agospec: clarify evaluation order
Robert Griesemer [Thu, 9 Aug 2012 18:50:16 +0000 (11:50 -0700)]
spec: clarify evaluation order

Fixes #3852.

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

12 years agotesting: add Verbose() to expose whether -test.v is set
Shenghou Ma [Thu, 9 Aug 2012 15:41:09 +0000 (23:41 +0800)]
testing: add Verbose() to expose whether -test.v is set
    Fixes #3350.

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

12 years agomisc/cgo/life: explicitly specify library for assert function (fixes windows/amd64...
Alex Brainman [Thu, 9 Aug 2012 07:00:31 +0000 (17:00 +1000)]
misc/cgo/life: explicitly specify library for assert function (fixes windows/amd64 build)

R=golang-dev, dave
CC=golang-dev, minux.ma
https://golang.org/cl/6461065

12 years agotext/template: add 'nil' as a keyword in the language
Rob Pike [Thu, 9 Aug 2012 03:02:19 +0000 (20:02 -0700)]
text/template: add 'nil' as a keyword in the language
The keyword reprents an untyped nil and is useful for
passing nil values to methods and functions. The
nil will be promoted to the appropriate type when
used; if a type cannot be assigned, an error results.

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

12 years agocmd/5l: add PT_PAX_FLAGS ELF header
Shenghou Ma [Thu, 9 Aug 2012 00:47:43 +0000 (08:47 +0800)]
cmd/5l: add PT_PAX_FLAGS ELF header
Although I don't use PAX enabled ARM kernels, PAX
does have support for ARM, so we're better off add
PT_PAX_FLAGS now in case people use PAX kernels.

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

12 years agoexp/html: ignore </html> in afterBodyIM when parsing a fragment
Andrew Balholm [Thu, 9 Aug 2012 00:19:25 +0000 (10:19 +1000)]
exp/html: ignore </html> in afterBodyIM when parsing a fragment

Pass 1 additional test.

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

12 years agoexp/html: when ignoring <textarea> tag, switch tokenizer out of raw text mode
Andrew Balholm [Wed, 8 Aug 2012 23:43:10 +0000 (09:43 +1000)]
exp/html: when ignoring <textarea> tag, switch tokenizer out of raw text mode

Pass 1 additional test.

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

12 years agomath: update definition of NaN in assembly language files
Charles L. Dorian [Wed, 8 Aug 2012 23:40:05 +0000 (09:40 +1000)]
math: update definition of NaN in assembly language files

R=rsc, minux.ma, golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/6461047

12 years ago doc: add 'Get Started with Go' video, remove some older videos
Andrew Gerrand [Wed, 8 Aug 2012 22:50:13 +0000 (08:50 +1000)]
  doc: add 'Get Started with Go' video, remove some older videos

(I also updated the wiki's GoTalks page with all the latest videos.)

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