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

This CL makes

    type T struct { *U }

behave in a similar way to:

    type T struct { U }

Fixes #3108.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes #3466.

gofmt -w src misc causes no changes.

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

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

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

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

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

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

Use correct system calls/syscall numbers for NetBSD.

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

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

Fixes #3612.
Fixes #3613.

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

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

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

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

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

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

Fixes #3616.

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

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

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

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

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

Fix and regenerate runtime defs for NetBSD.

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

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

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

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

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

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

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

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

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

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

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

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

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

Empty parts can be either of the form:

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

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

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

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

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

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

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

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

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

Fixes #3406.

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

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

Fix mkerrors.sh so that it works on NetBSD.

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

Regenerate the z* files now that cgo is working.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

13 years agosyscall: repair netbsd z* files
Joel Sing [Thu, 10 May 2012 17:47:27 +0000 (03:47 +1000)]
syscall: repair netbsd z* files

Manually repair/update z* files for netbsd - this allows Go to
compile again on 386.

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

13 years agoexp/locale/collate: Add maketables tool and generated tables.
Marcel van Lohuizen [Wed, 9 May 2012 10:03:55 +0000 (12:03 +0200)]
exp/locale/collate: Add maketables tool and generated tables.
Also set maxContractLen automatically.
Note that the table size is much bigger than it needs to be.
Optimization is best done, though, when the language specific
tables are added.

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

13 years agocmd/go: fix remote help reference to "go help packages"
Francisco Souza [Wed, 9 May 2012 06:16:02 +0000 (16:16 +1000)]
cmd/go: fix remote help reference to "go help packages"

go help remote used to reference "go help importpath", which has
changed to "go help packages".

Fixes #3598.

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

13 years agogo: fix the import path "./..." not matching ".".
Nigel Tao [Wed, 9 May 2012 00:43:15 +0000 (10:43 +1000)]
go: fix the import path "./..." not matching ".".

Tested manually.

Fixes #3554.

Before:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io/ioutil

After:
$ cd $GOROOT/src/pkg
$ go list io
io
$ go list io/...
io
io/ioutil
$ cd $GOROOT/src/pkg/io
$ go list .
io
$ go list ./...
io
io/ioutil
$ go list ././...
io
io/ioutil
$ go list ././.././io/...
io
io/ioutil
$ go list ../image
image
$ go list ../image/...
image
image/color
image/draw
image/gif
image/jpeg
image/png
$ go list ../.../template
html/template
text/template
$ cd $GOROOT/src/pkg
$ go list ./io
io
$ go list ./io/...
io
io/ioutil
$ go list ./.../pprof
net/http/pprof
runtime/pprof
$ go list ./compress
can't load package: package compress: no Go source files in /home/nigeltao/go/src/pkg/compress
$ go list ./compress/...
compress/bzip2
compress/flate
compress/gzip
compress/lzw
compress/zlib
$ cd $GOROOT/src/pkg/code.google.com
$ go list ./p/leveldb-go/...
code.google.com/p/leveldb-go/leveldb
code.google.com/p/leveldb-go/leveldb/crc
code.google.com/p/leveldb-go/leveldb/db
code.google.com/p/leveldb-go/leveldb/memdb
code.google.com/p/leveldb-go/leveldb/memfs
code.google.com/p/leveldb-go/leveldb/record
code.google.com/p/leveldb-go/leveldb/table
code.google.com/p/leveldb-go/manualtest/filelock
$ go list ./p/.../truetype
code.google.com/p/freetype-go/example/truetype
code.google.com/p/freetype-go/freetype/truetype
$ go list ./p/.../example
warning: "./p/.../example" matched no packages
$ go list ./p/.../example/...
code.google.com/p/freetype-go/example/freetype
code.google.com/p/freetype-go/example/gamma
code.google.com/p/freetype-go/example/raster
code.google.com/p/freetype-go/example/round
code.google.com/p/freetype-go/example/truetype
code.google.com/p/x-go-binding/example/imgview
code.google.com/p/x-go-binding/example/xgb

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

13 years agocompress/testdata: change {e,pi}.txt from 10k to 100k digits.
Nigel Tao [Wed, 9 May 2012 00:02:28 +0000 (10:02 +1000)]
compress/testdata: change {e,pi}.txt from 10k to 100k digits.

These files change from exactly 10003 bytes long to 100003: a digit,
a '.', 100k digits, and a '\n'.

The magic constants in compress/flate/deflate_test.go change since
deflateInflateStringTests checks that the compressed form of e.txt
is not 'too large'. I'm not exactly sure how these numbers were
originally calculated (they were introduced in codereview 5554066
"make lazy matching work"); perhaps krasin@golang.org can comment.
My change was to increase the first one (no compression) to a tight
bound, and multiply all the others by 10.

Benchcmp numbers for compress/flate and compress/lzw below. LZW's
window size of 4096 is less than 10k, so shows no significant change.
Flate's window size is 32768, between 10k and 100k, and so the .*1e5
and .*1e6 benchmarks show a dramatic drop, since the compressed forms
are no longer a trivial forward copy of 10k digits repeated over and
over, but should now be more representative of real world usage.

compress/flate:
benchmark                            old MB/s     new MB/s  speedup
BenchmarkDecodeDigitsSpeed1e4           16.58        16.52    1.00x
BenchmarkDecodeDigitsSpeed1e5           68.09        18.10    0.27x
BenchmarkDecodeDigitsSpeed1e6          124.63        18.35    0.15x
BenchmarkDecodeDigitsDefault1e4         17.21        17.12    0.99x
BenchmarkDecodeDigitsDefault1e5        118.28        19.19    0.16x
BenchmarkDecodeDigitsDefault1e6        295.62        20.52    0.07x
BenchmarkDecodeDigitsCompress1e4        17.22        17.17    1.00x
BenchmarkDecodeDigitsCompress1e5       118.19        19.21    0.16x
BenchmarkDecodeDigitsCompress1e6       295.59        20.55    0.07x
BenchmarkEncodeDigitsSpeed1e4            8.18         8.19    1.00x
BenchmarkEncodeDigitsSpeed1e5           43.22        12.84    0.30x
BenchmarkEncodeDigitsSpeed1e6           80.76        13.48    0.17x
BenchmarkEncodeDigitsDefault1e4          6.29         6.19    0.98x
BenchmarkEncodeDigitsDefault1e5         31.63         3.60    0.11x
BenchmarkEncodeDigitsDefault1e6         52.97         3.24    0.06x
BenchmarkEncodeDigitsCompress1e4         6.20         6.19    1.00x
BenchmarkEncodeDigitsCompress1e5        31.59         3.59    0.11x
BenchmarkEncodeDigitsCompress1e6        53.18         3.25    0.06x

compress/lzw:
benchmark               old MB/s     new MB/s  speedup
BenchmarkDecoder1e4        21.99        22.09    1.00x
BenchmarkDecoder1e5        22.77        22.71    1.00x
BenchmarkDecoder1e6        22.90        22.90    1.00x
BenchmarkEncoder1e4        21.04        21.19    1.01x
BenchmarkEncoder1e5        22.06        22.06    1.00x
BenchmarkEncoder1e6        22.16        22.28    1.01x

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

13 years agocompress/flate: benchmark some English text, not just the digits of e.
Nigel Tao [Tue, 8 May 2012 22:57:54 +0000 (08:57 +1000)]
compress/flate: benchmark some English text, not just the digits of e.

The testdata/e.txt input is repeated on the longer benchmarks, but the
length of that data is less than flate's window size, so the numbers are
essentially measuring the performance of a trivial compression. A follow-up
CL will add more data to testdata/e.txt.

Sample output on my laptop (linux, amd64):

BenchmarkDecodeDigitsSpeed1e4     5000     603153 ns/op   16.58 MB/s
BenchmarkDecodeDigitsSpeed1e5     1000    1465602 ns/op   68.23 MB/s
BenchmarkDecodeDigitsSpeed1e6      200    8036050 ns/op  124.44 MB/s
BenchmarkDecodeDigitsDefault1e4     5000     581796 ns/op   17.19 MB/s
BenchmarkDecodeDigitsDefault1e5     2000     846653 ns/op  118.11 MB/s
BenchmarkDecodeDigitsDefault1e6      500    3385782 ns/op  295.35 MB/s
BenchmarkDecodeDigitsCompress1e4     5000     581180 ns/op   17.21 MB/s
BenchmarkDecodeDigitsCompress1e5     2000     846209 ns/op  118.17 MB/s
BenchmarkDecodeDigitsCompress1e6      500    3386174 ns/op  295.32 MB/s
BenchmarkDecodeTwainSpeed1e4     5000     643563 ns/op   15.54 MB/s
BenchmarkDecodeTwainSpeed1e5      500    5418408 ns/op   18.46 MB/s
BenchmarkDecodeTwainSpeed1e6       50   52277520 ns/op   19.13 MB/s
BenchmarkDecodeTwainDefault1e4     5000     583551 ns/op   17.14 MB/s
BenchmarkDecodeTwainDefault1e5      500    4443428 ns/op   22.51 MB/s
BenchmarkDecodeTwainDefault1e6       50   41862080 ns/op   23.89 MB/s
BenchmarkDecodeTwainCompress1e4     5000     583490 ns/op   17.14 MB/s
BenchmarkDecodeTwainCompress1e5      500    4426356 ns/op   22.59 MB/s
BenchmarkDecodeTwainCompress1e6       50   41657940 ns/op   24.01 MB/s
BenchmarkEncodeDigitsSpeed1e4     2000    1230907 ns/op    8.12 MB/s
BenchmarkEncodeDigitsSpeed1e5     1000    2319129 ns/op   43.12 MB/s
BenchmarkEncodeDigitsSpeed1e6      100   12378950 ns/op   80.78 MB/s
BenchmarkEncodeDigitsDefault1e4     1000    1597865 ns/op    6.26 MB/s
BenchmarkEncodeDigitsDefault1e5      500    3163458 ns/op   31.61 MB/s
BenchmarkEncodeDigitsDefault1e6      100   18770240 ns/op   53.28 MB/s
BenchmarkEncodeDigitsCompress1e4     1000    1603461 ns/op    6.24 MB/s
BenchmarkEncodeDigitsCompress1e5      500    3168766 ns/op   31.56 MB/s
BenchmarkEncodeDigitsCompress1e6      100   18855830 ns/op   53.03 MB/s
BenchmarkEncodeTwainSpeed1e4     1000    1338049 ns/op    7.47 MB/s
BenchmarkEncodeTwainSpeed1e5      500    7341622 ns/op   13.62 MB/s
BenchmarkEncodeTwainSpeed1e6       50   67484600 ns/op   14.82 MB/s
BenchmarkEncodeTwainDefault1e4     1000    1778399 ns/op    5.62 MB/s
BenchmarkEncodeTwainDefault1e5      100   23261810 ns/op    4.30 MB/s
BenchmarkEncodeTwainDefault1e6       10  243533600 ns/op    4.11 MB/s
BenchmarkEncodeTwainCompress1e4     1000    1795469 ns/op    5.57 MB/s
BenchmarkEncodeTwainCompress1e5       50   29447140 ns/op    3.40 MB/s
BenchmarkEncodeTwainCompress1e6        5  321686800 ns/op    3.11 MB/s
ok   compress/flate 89.246s

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

13 years agocompress/testdata: remove Byte Order Mark from the Tom Sawyer data.
Nigel Tao [Tue, 8 May 2012 00:41:45 +0000 (10:41 +1000)]
compress/testdata: remove Byte Order Mark from the Tom Sawyer data.

I'm not sure where the BOM came from, originally.
http://www.gutenberg.org/files/74/74.txt doesn't have it, although
a fresh download of that URL gives me "\r\n"s instead of plain "\n"s,
and the extra line "Character set encoding: ASCII". Maybe Project
Gutenberg has changed their server configuration since we added that
file to the Go repo.

Anyway, this change is just manually excising the BOM from the start
of the file, leaving pure ASCII.

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

13 years agocrypto/aes: fix comment
Russ Cox [Mon, 7 May 2012 20:45:34 +0000 (16:45 -0400)]
crypto/aes: fix comment

Fixes #3589.

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

13 years agotest/bench/shootout: fix gccgo binary-list-freelist test
Ian Lance Taylor [Mon, 7 May 2012 17:14:50 +0000 (10:14 -0700)]
test/bench/shootout: fix gccgo binary-list-freelist test

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

13 years agomisc/emacs: Restore the window position after a successful gofmt.
Jean-Marc Eurin [Mon, 7 May 2012 15:46:01 +0000 (11:46 -0400)]
misc/emacs: Restore the window position after a successful gofmt.

This adds restoring the window position so that the buffer doesn't jump around after the erase/copy.

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

13 years agoC: correct entry: jmeurin, not jme.
Sameer Ajmani [Mon, 7 May 2012 15:40:43 +0000 (11:40 -0400)]
C: correct entry: jmeurin, not jme.

R=golang-dev, rsc
CC=golang-dev, jme, jmeurin
https://golang.org/cl/6192057

13 years agoC: Jeremy Ellington (Google CLA)
Sameer Ajmani [Mon, 7 May 2012 14:47:58 +0000 (10:47 -0400)]
C: Jeremy Ellington (Google CLA)

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

13 years agoexp/locale/collate: from the regression test we derive that the spec
Marcel van Lohuizen [Mon, 7 May 2012 09:51:40 +0000 (11:51 +0200)]
exp/locale/collate: from the regression test we derive that the spec
dictates a CJK rune is only part of a certain specified range if it
is explicitly defined in the Unicode Codepoint Database.
Fixed the code and some of the tests accordingly.

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

13 years agoexp/norm: It is important that the unicode versions of the various packages align.
Marcel van Lohuizen [Mon, 7 May 2012 09:41:40 +0000 (11:41 +0200)]
exp/norm: It is important that the unicode versions of the various packages align.
Replace hard-coded version strings with unicode.Version.

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

13 years agotest: add bug438, a valid test case that gccgo used to fail to compile
Ian Lance Taylor [Fri, 4 May 2012 20:14:09 +0000 (13:14 -0700)]
test: add bug438, a valid test case that gccgo used to fail to compile

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

13 years agosync/atomic: fix 64-bit atomic cas for Linux/ARM
Shenghou Ma [Fri, 4 May 2012 18:02:36 +0000 (02:02 +0800)]
sync/atomic: fix 64-bit atomic cas for Linux/ARM
    This is a follow-up to CL 5978051.
    Use kernel cas64 helper if we can, fallback to LDREXD/STREXD if
    we are on ARMv6 or higher, and to lock-emulated cas64 if on ARMv5.
    A future CL will fix {Add,Load,Store}{Int,Uint}64 and issue 3331.

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

13 years agoruntime: get per-process random number from auxv for hash table
Shenghou Ma [Fri, 4 May 2012 17:59:14 +0000 (01:59 +0800)]
runtime: get per-process random number from auxv for hash table
Decode AT_RANDOM, AT_HWCAP, and AT_PLATFORM.
This CL only make use of AT_RANDOM, but future CLs will make use of the others.

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

13 years agocmd/cgo, cmd/cc, cmd/ld: detect dynamic linker automatically
Shenghou Ma [Fri, 4 May 2012 17:54:16 +0000 (01:54 +0800)]
cmd/cgo, cmd/cc, cmd/ld: detect dynamic linker automatically
Some newer Linux distributions (Ubuntu ARM at least) use a new multiarch
directory organization, where dynamic linker is no longer in the hardcoded
path in our linker.
For example, Ubuntu 12.04 ARM hardfloat places its dynamic linker at
/lib/arm-linux-gnueabihf/ld-linux.so.3

Ref: http://lackof.org/taggart/hacking/multiarch/

Also, to support Debian GNU/kFreeBSD as a FreeBSD variant, we need this capability, so it's part of issue 3533.

This CL add a new pragma (#pragma dynlinker "path") to cc.

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

13 years agoruntime: fix c compiler warning
Shenghou Ma [Fri, 4 May 2012 17:39:09 +0000 (01:39 +0800)]
runtime: fix c compiler warning

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

13 years agoruntime, misc/cgo/test: fix build for Linux/ARM
Shenghou Ma [Fri, 4 May 2012 17:35:13 +0000 (01:35 +0800)]
runtime, misc/cgo/test: fix build for Linux/ARM
1. In CL 5989057, I made a mistake in the last minute change.
"MOVW.W R4, -4(SP)" should really be "MOVW.W R4, -4(R13)",
as 5l will rewrite offset for SP.
2. misc/cgo/test/issue1560.go tests for parallel sleep of 1s,
but on ARM, the deadline is frequently missed, so change sleep
time to 2s on ARM.

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

13 years agomath/big: fix superpolynomial complexity in Karatsuba algorithm.
Rémy Oudompheng [Fri, 4 May 2012 17:05:26 +0000 (19:05 +0200)]
math/big: fix superpolynomial complexity in Karatsuba algorithm.

benchmark                     old ns/op    new ns/op    delta
BenchmarkExp3Power0x10              732          734   +0.27%
BenchmarkExp3Power0x40              834          836   +0.24%
BenchmarkExp3Power0x100            1600         1579   -1.31%
BenchmarkExp3Power0x400            3478         3417   -1.75%
BenchmarkExp3Power0x1000          19388        19229   -0.82%
BenchmarkExp3Power0x4000         160274       156881   -2.12%
BenchmarkExp3Power0x10000       1552050      1372058  -11.60%
BenchmarkExp3Power0x40000      27328710     15216920  -44.32%
BenchmarkExp3Power0x100000    612349000    131407100  -78.54%
BenchmarkExp3Power0x400000  44073524000   1122195000  -97.45%

R=golang-dev, mtj, gri, rsc
CC=golang-dev, remy
https://golang.org/cl/6176043

13 years agopkg/runtime: Plan 9 signal handling in Go
Akshat Kumar [Fri, 4 May 2012 10:48:34 +0000 (03:48 -0700)]
pkg/runtime: Plan 9 signal handling in Go

This adds proper note handling for Plan 9,
and fixes the issue of properly killing go procs.
Without this change, the first go proc that dies
(using runtime·exit()) would kill all the running
go procs. Proper signal handling is needed.

R=golang-dev, ality, rminnich, rsc
CC=golang-dev, john, mirtchovski
https://golang.org/cl/5617048

13 years agosyscall: remove the Signal type on Plan 9
Anthony Martin [Fri, 4 May 2012 10:44:41 +0000 (03:44 -0700)]
syscall: remove the Signal type on Plan 9

Instead use a new type, "Note", whose underlying
type is just a string.  This change allows us to
remove the exported os.Plan9Note type.

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

13 years agogo/build: cgo is supported on Linux/ARM
Shenghou Ma [Fri, 4 May 2012 10:34:04 +0000 (18:34 +0800)]
go/build: cgo is supported on Linux/ARM
        Last Part of CL 5601044 (cgo: Linux/ARM support)
        Fixes #1880.

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

13 years agocmd/go: cgo for Linux/ARM
Shenghou Ma [Fri, 4 May 2012 10:29:40 +0000 (18:29 +0800)]
cmd/go: cgo for Linux/ARM
        Part 4 of CL 5601044 (cgo: Linux/ARM support)

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

13 years agocmd/cgo: support Linux/ARM
Shenghou Ma [Fri, 4 May 2012 10:26:16 +0000 (18:26 +0800)]
cmd/cgo: support Linux/ARM
        Part 3 of CL 5601044 (cgo: Linux/ARM support)

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

13 years agoruntime: cgo support for Linux/ARM
Shenghou Ma [Fri, 4 May 2012 10:20:09 +0000 (18:20 +0800)]
runtime: cgo support for Linux/ARM
        Part 2 of CL 5601044 (cgo: Linux/ARM support)

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

13 years agocmd/5l, cmd/ld: dynamic linking library support
Shenghou Ma [Fri, 4 May 2012 10:14:26 +0000 (18:14 +0800)]
cmd/5l, cmd/ld: dynamic linking library support
        Part 1 of CL 5601044 (cgo: Linux/ARM support)
        Limitation: doesn't support thumb library yet.

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

13 years agomisc/dashboard/codereview: remove transitional code.
David Symonds [Fri, 4 May 2012 06:40:24 +0000 (16:40 +1000)]
misc/dashboard/codereview: remove transitional code.

All current CLs have subject lines, so we don't need to check any more.

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

13 years agoencoding/json: Fix panic when trying to unmarshal the empty string into an integer
Michael Chaten [Thu, 3 May 2012 21:35:44 +0000 (17:35 -0400)]
encoding/json: Fix panic when trying to unmarshal the empty string into an integer

Fixes #3450.

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

13 years agosyscall: add Termios support on darwin
Francisco Souza [Thu, 3 May 2012 21:33:19 +0000 (17:33 -0400)]
syscall: add Termios support on darwin

Update #3316.

R=dave, kevlar, devon.odell, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6063053

13 years agotest: add bug437, a test that used to fail with gccgo at link time
Ian Lance Taylor [Thu, 3 May 2012 21:25:11 +0000 (14:25 -0700)]
test: add bug437, a test that used to fail with gccgo at link time

Updates #3391.

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

13 years agocrypto/x509: fix panic when using unavailable hash function.
Adam Langley [Thu, 3 May 2012 20:39:57 +0000 (16:39 -0400)]
crypto/x509: fix panic when using unavailable hash function.

crypto.Hash.New() changed to panicking when the hash function isn't
linked in, but crypto/x509 still expects it to return nil.

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

13 years agocmd/5c, cmd/5a, cmd/5l: ARM support for PREFETCH built-in
Shenghou Ma [Thu, 3 May 2012 19:24:14 +0000 (03:24 +0800)]
cmd/5c, cmd/5a, cmd/5l: ARM support for PREFETCH built-in

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

13 years agotest: add bug436, valid code that crashed gccgo
Ian Lance Taylor [Thu, 3 May 2012 17:33:10 +0000 (10:33 -0700)]
test: add bug436, valid code that crashed gccgo

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

13 years agocmd/dist: remove stray src/pkg/runtime/z* when cleaning
Shenghou Ma [Thu, 3 May 2012 16:58:48 +0000 (00:58 +0800)]
cmd/dist: remove stray src/pkg/runtime/z* when cleaning

R=golang-dev, bradfitz, dave, rsc, lstoakes, rsc
CC=golang-dev
https://golang.org/cl/6180044

13 years agomisc/dashboard/codereview: add copyright notices to Go files
Andrew Gerrand [Wed, 2 May 2012 23:22:45 +0000 (09:22 +1000)]
misc/dashboard/codereview: add copyright notices to Go files

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

13 years agocmd/cc: add PREFETCH built-in (like SET, USED)
Russ Cox [Wed, 2 May 2012 20:22:56 +0000 (16:22 -0400)]
cmd/cc: add PREFETCH built-in (like SET, USED)

This makes it possible to inline the prefetch of upcoming
memory addresses during garbage collection, instead of
needing to flush registers, make a function call, and
reload registers.  On garbage collection-heavy workloads,
this results in a 5% speedup.

Fixes #3493.

R=dvyukov, ken, r, dave
CC=golang-dev
https://golang.org/cl/5990066

13 years agoexp/locale/collate: fixed two bugs uncovered by regression tests.
Marcel van Lohuizen [Wed, 2 May 2012 15:01:41 +0000 (17:01 +0200)]
exp/locale/collate: fixed two bugs uncovered by regression tests.
The first bug was that tertiary ignorables had the same colElem as
implicit colElems, yielding unexpected results. The current encoding
ensures that a non-implicit colElem is never 0.  This fix uncovered
another bug of the trie that indexed incorrectly into the null block.
This was caused by an unfinished optimization that would avoid the
need to max out the most-significant bits of continuation bytes.
This bug was also present in the trie used in exp/norm and has been
fixed there as well. The appearence of the bug was rare, as the lower
blocks happened to be nearly nil.

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

13 years agocmd/gc: test for issue 3552
Luuk van Dijk [Wed, 2 May 2012 14:56:26 +0000 (16:56 +0200)]
cmd/gc: test for issue 3552

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

13 years agoruntime: avoid unnecessary zeroization of huge memory blocks
Dmitriy Vyukov [Wed, 2 May 2012 14:01:11 +0000 (18:01 +0400)]
runtime: avoid unnecessary zeroization of huge memory blocks
+move zeroization out of the heap mutex

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

13 years agoos/signal: run windows TestCtrlBreak during build
Alex Brainman [Wed, 2 May 2012 07:05:52 +0000 (17:05 +1000)]
os/signal: run windows TestCtrlBreak during build

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

13 years agoos: conform to Go 1 API on Plan 9
Anthony Martin [Wed, 2 May 2012 05:44:38 +0000 (22:44 -0700)]
os: conform to Go 1 API on Plan 9

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

13 years agobuild: dist-based build for Plan 9
Anthony Martin [Wed, 2 May 2012 05:32:46 +0000 (22:32 -0700)]
build: dist-based build for Plan 9

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

13 years agomisc/dashboard/codereview: LGTM favicon
Rob Pike [Wed, 2 May 2012 03:48:49 +0000 (13:48 +1000)]
misc/dashboard/codereview: LGTM favicon

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

13 years agobytes: add assembly version of Equal for ARM
Dave Cheney [Wed, 2 May 2012 02:10:24 +0000 (12:10 +1000)]
bytes: add assembly version of Equal for ARM

BenchmarkEqual32                       662          159  -75.98%
BenchmarkEqual4K                     76545        13719  -82.08%
BenchmarkEqual4M                  90136700     23588870  -73.83%
BenchmarkEqual64M               2147483647   1419616000  -42.63%

BenchmarkEqual32                     48.32       201.15    4.16x
BenchmarkEqual4K                     53.51       298.56    5.58x
BenchmarkEqual4M                     46.53       177.81    3.82x
BenchmarkEqual64M                    27.12        47.27    1.74x

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

13 years agocgo: rename C names for Go types to avoid conflicting with package
Ian Lance Taylor [Tue, 1 May 2012 16:04:13 +0000 (09:04 -0700)]
cgo: rename C names for Go types to avoid conflicting with package

Fixes #3371.

R=rsc, bsiegert, r, mtj, iant
CC=golang-dev
https://golang.org/cl/6131060

13 years agomisc/dashboard/codereview: preserve CL ordering.
David Symonds [Tue, 1 May 2012 06:15:32 +0000 (16:15 +1000)]
misc/dashboard/codereview: preserve CL ordering.

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

13 years agocompress/flate: add a copy overrun test.
Nigel Tao [Tue, 1 May 2012 04:28:33 +0000 (14:28 +1000)]
compress/flate: add a copy overrun test.

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

13 years agomisc/dashboard/codereview: de-dup LGTMs.
David Symonds [Tue, 1 May 2012 01:41:32 +0000 (11:41 +1000)]
misc/dashboard/codereview: de-dup LGTMs.

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

13 years agoencoding/json: don't match field name if a JSON struct tag is present.
David Symonds [Tue, 1 May 2012 01:37:44 +0000 (11:37 +1000)]
encoding/json: don't match field name if a JSON struct tag is present.

Fixes #3566.

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

13 years agomisc/dashboard/codereview: send mail immediately, and fill in time.Time fields.
David Symonds [Tue, 1 May 2012 01:33:25 +0000 (11:33 +1000)]
misc/dashboard/codereview: send mail immediately, and fill in time.Time fields.

If we delay the mail sending, we can't send as the current user.
If we don't fill in the time.Time fields, datastore.Put will fail
because the zero time.Time value is out of its range.

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

13 years agocompress/flate: optimize history-copy decoding.
Nigel Tao [Tue, 1 May 2012 00:51:34 +0000 (10:51 +1000)]
compress/flate: optimize history-copy decoding.

The forwardCopy function could be re-written in asm, and the copyHuff
method could probably be rolled into huffmanBlock and copyHist, but
I'm leaving those changes for future CLs.

compress/flate benchmarks:
benchmark                                 old ns/op    new ns/op    delta
BenchmarkDecoderBestSpeed1K                  385327       435140  +12.93%
BenchmarkDecoderBestSpeed10K                1245190      1062112  -14.70%
BenchmarkDecoderBestSpeed100K               8512365      5833680  -31.47%
BenchmarkDecoderDefaultCompression1K         382225       421301  +10.22%
BenchmarkDecoderDefaultCompression10K        867950       613890  -29.27%
BenchmarkDecoderDefaultCompression100K      5658240      2466726  -56.40%
BenchmarkDecoderBestCompression1K            383760       421634   +9.87%
BenchmarkDecoderBestCompression10K           867743       614671  -29.16%
BenchmarkDecoderBestCompression100K         5660160      2464996  -56.45%

image/png benchmarks:
benchmark                       old ns/op    new ns/op    delta
BenchmarkDecodeGray               2540834      2389624   -5.95%
BenchmarkDecodeNRGBAGradient     10052700      9534565   -5.15%
BenchmarkDecodeNRGBAOpaque        8704710      8163430   -6.22%
BenchmarkDecodePaletted           1458779      1325017   -9.17%
BenchmarkDecodeRGB                7183606      6794668   -5.41%

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

Before profile:
Total: 304 samples
         159  52.3%  52.3%      251  82.6% compress/flate.(*decompressor).huffmanBlock
          58  19.1%  71.4%       76  25.0% compress/flate.(*decompressor).huffSym
          32  10.5%  81.9%       32  10.5% hash/adler32.update
          16   5.3%  87.2%       22   7.2% bufio.(*Reader).ReadByte
          16   5.3%  92.4%       37  12.2% compress/flate.(*decompressor).moreBits
           7   2.3%  94.7%        7   2.3% hash/crc32.update
           7   2.3%  97.0%        7   2.3% runtime.memmove
           5   1.6%  98.7%        5   1.6% scanblock
           2   0.7%  99.3%        9   3.0% runtime.copy
           1   0.3%  99.7%        1   0.3% compress/flate.(*huffmanDecoder).init

After profile:
Total: 230 samples
          59  25.7%  25.7%       70  30.4% compress/flate.(*decompressor).huffSym
          45  19.6%  45.2%       45  19.6% hash/adler32.update
          35  15.2%  60.4%       35  15.2% compress/flate.forwardCopy
          20   8.7%  69.1%      151  65.7% compress/flate.(*decompressor).huffmanBlock
          16   7.0%  76.1%       24  10.4% compress/flate.(*decompressor).moreBits
          15   6.5%  82.6%       15   6.5% runtime.memmove
          11   4.8%  87.4%       50  21.7% compress/flate.(*decompressor).copyHist
           7   3.0%  90.4%        7   3.0% hash/crc32.update
           6   2.6%  93.0%        9   3.9% bufio.(*Reader).ReadByte
           4   1.7%  94.8%        4   1.7% runtime.slicearray

R=rsc, rogpeppe, dave
CC=golang-dev, krasin
https://golang.org/cl/6127064

13 years agocmd/go: do not ignore DepsErrors in 'go run'
Robert Hencke [Mon, 30 Apr 2012 21:00:24 +0000 (17:00 -0400)]
cmd/go: do not ignore DepsErrors in 'go run'

Fixes #3490.

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

13 years agoruntime: give proper messages when user defined DYLD_INSERT_LIBRARIES on Darwin
Shenghou Ma [Mon, 30 Apr 2012 19:55:07 +0000 (15:55 -0400)]
runtime: give proper messages when user defined DYLD_INSERT_LIBRARIES on Darwin
       also gives clear error when bsdthread_register fails on Darwin
       Fixes #2992.

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

13 years agomisc/dashboard/codereview: record Message-ID of code review thread mails.
David Symonds [Mon, 30 Apr 2012 12:47:51 +0000 (22:47 +1000)]
misc/dashboard/codereview: record Message-ID of code review thread mails.

This will allow us to properly thread "R=..." mails at a later time.

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

13 years agomisc/dashboard/codereview: add handy logout URL.
David Symonds [Mon, 30 Apr 2012 12:47:06 +0000 (22:47 +1000)]
misc/dashboard/codereview: add handy logout URL.

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

13 years agomisc/dashboard/codereview: send mail to assigned reviewers if they aren't already...
David Symonds [Mon, 30 Apr 2012 12:03:56 +0000 (22:03 +1000)]
misc/dashboard/codereview: send mail to assigned reviewers if they aren't already looped in.

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

13 years agoencoding/base64: don't ignore underlying souce read error in decode
Brad Fitzpatrick [Mon, 30 Apr 2012 07:14:41 +0000 (17:14 +1000)]
encoding/base64: don't ignore underlying souce read error in decode

Fixes #3577

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

13 years agosyscall: add a test for passing an fd over a unix socket
Brad Fitzpatrick [Mon, 30 Apr 2012 05:31:14 +0000 (15:31 +1000)]
syscall: add a test for passing an fd over a unix socket

Re-submitting previously reverted change 160ec5506cb7.

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

13 years agocompress/flate: add Encoder/Decoder benchmarks
Dave Cheney [Sun, 29 Apr 2012 10:41:13 +0000 (20:41 +1000)]
compress/flate: add Encoder/Decoder benchmarks

In CL 6127051, nigeltao suggested that further gains
were possible by improving the performance of flate.
This CL adds a set of benchmarks (based on compress/lzw)
that can be used to judge any future improvements.

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

13 years agomisc/dashboard/codereview: don't depend on map iteration order for unit calculation.
David Symonds [Fri, 27 Apr 2012 23:47:15 +0000 (09:47 +1000)]
misc/dashboard/codereview: don't depend on map iteration order for unit calculation.

Fix auth requirements for /gc endpoint too.

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

13 years agoos/exec: close all internal descriptors when Cmd.Start() fails.
Brian Dellisanti [Fri, 27 Apr 2012 22:46:49 +0000 (15:46 -0700)]
os/exec: close all internal descriptors when Cmd.Start() fails.

This closes any internal descriptors (pipes, etc) that Cmd.Start() had
opened before it failed.

Fixes #3468.

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

13 years agoA+C: add Brian Dellisanti (individual CLA)
Ian Lance Taylor [Fri, 27 Apr 2012 22:46:27 +0000 (15:46 -0700)]
A+C: add Brian Dellisanti (individual CLA)

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

13 years agomisc/dashboard/codereview: simplify parallel operations for front page, and capture...
David Symonds [Fri, 27 Apr 2012 13:16:54 +0000 (23:16 +1000)]
misc/dashboard/codereview: simplify parallel operations for front page, and capture timing info.

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