]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agolib/codereview/codereview.py: fix crash when hg gofmt has no files
Rob Pike [Wed, 27 Mar 2013 00:32:22 +0000 (17:32 -0700)]
lib/codereview/codereview.py: fix crash when hg gofmt has no files
The gofmt function was returning a string, which isn't the right type.
Three cheers for dynamic typing.

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

12 years agocmd/gc: enable racewalk of HMUL nodes.
Rémy Oudompheng [Tue, 26 Mar 2013 22:35:42 +0000 (23:35 +0100)]
cmd/gc: enable racewalk of HMUL nodes.

A HMUL node appears in some constant divisions, but
to observe a false negative in race detector the divisor must be
suitably chosen to make sure the only memory access is
done for HMUL.

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

12 years agodoc: consistent path names in example
Dave Cheney [Tue, 26 Mar 2013 22:22:23 +0000 (09:22 +1100)]
doc: consistent path names in example

Always use /home/you for $HOME in examples.

Trivial enough that someone else can integrate this change if they are editing go1.1.html

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

12 years agopkg/runtime: ignore runtime.memlimit when allocating heap
Ian Lance Taylor [Tue, 26 Mar 2013 21:01:12 +0000 (14:01 -0700)]
pkg/runtime: ignore runtime.memlimit when allocating heap

For Go 1.1, stop checking the rlimit, because it broke now
that mheap is allocated using SysAlloc.  See issue 5049.

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

12 years agogodoc: internal cleanup: remove a TODO
Robert Griesemer [Tue, 26 Mar 2013 20:12:38 +0000 (13:12 -0700)]
godoc: internal cleanup: remove a TODO

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

12 years agoreflect: add garbage collection info in ChanOf, MapOf, PtrTo, SliceOf
Russ Cox [Tue, 26 Mar 2013 18:50:29 +0000 (11:50 -0700)]
reflect: add garbage collection info in ChanOf, MapOf, PtrTo, SliceOf

ArrayOf will remain unexported (and therefore unused) for Go 1.1.

Fixes #4375.

R=0xe2.0x9a.0x9b, r, iant
CC=golang-dev
https://golang.org/cl/7716048

12 years agodoc/go1.1.html: net/mail, net/smtp
Rob Pike [Tue, 26 Mar 2013 18:47:27 +0000 (11:47 -0700)]
doc/go1.1.html: net/mail, net/smtp

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

12 years agoruntime: ensure forward progress when unwinding an arm stack frame
Carl Shapiro [Tue, 26 Mar 2013 18:43:09 +0000 (11:43 -0700)]
runtime: ensure forward progress when unwinding an arm stack frame

The arm gentraceback mishandled frame linkage values pointing
to the assembly return function.  This function is special as
its frame size is zero and it contains only one instruction.
These conditions would preserve the frame pointer and result
in an off by one error when unwinding the caller.

Fixes #5124

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

12 years agogodoc: link identifiers to declarations
Robert Griesemer [Tue, 26 Mar 2013 18:14:30 +0000 (11:14 -0700)]
godoc: link identifiers to declarations

The changes are almost completely self-contained
in the new file linkify.go. The other changes are
minimal and should not disturb the currently
working godoc, in anticipation of Go 1.1.

To disable the feature in case of problems, set
-links=false.

Fixes #2063.

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

12 years agobuiltin: add linkable-to declarations for iota and nil
Rob Pike [Tue, 26 Mar 2013 18:05:06 +0000 (11:05 -0700)]
builtin: add linkable-to declarations for iota and nil
Aids godoc.

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

12 years agodoc/go1.1.html: describe Zone and other net changes
Rob Pike [Tue, 26 Mar 2013 17:54:55 +0000 (10:54 -0700)]
doc/go1.1.html: describe Zone and other net changes
Mild adaptation of rsc's 8021043, which I was unable to clpatch.
(rsc is offline)

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

12 years agodoc: fix typo in go 1.1 doc
Andrew Gerrand [Tue, 26 Mar 2013 16:37:17 +0000 (09:37 -0700)]
doc: fix typo in go 1.1 doc

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

12 years agoruntime: does not report duplicate errors in netpoll
Dmitriy Vyukov [Tue, 26 Mar 2013 16:25:43 +0000 (20:25 +0400)]
runtime: does not report duplicate errors in netpoll
Prevents storm of error messages if something goes wrong.
In the case of issue 5073 the epoll fd was closed by the test.
Update #5073.

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

12 years agonet: fix test data corruption in repetitive test runs by -cpu
Mikio Hara [Tue, 26 Mar 2013 16:06:48 +0000 (01:06 +0900)]
net: fix test data corruption in repetitive test runs by -cpu

This CL avoids test data sharing in repetitive test runs;
e.g., go test net -cpu=1,1,1

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

12 years agocmd/gc: more race instrumentation.
Rémy Oudompheng [Tue, 26 Mar 2013 07:27:18 +0000 (08:27 +0100)]
cmd/gc: more race instrumentation.

Handle interface comparison correctly,
add a few more tests, mark more nodes as impossible.

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

12 years agocmd/gc: fix nil pointer dereferences.
Rémy Oudompheng [Tue, 26 Mar 2013 07:20:10 +0000 (08:20 +0100)]
cmd/gc: fix nil pointer dereferences.

Fixes #5119.

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

12 years agomisc/vim: make Godoc command work with "log.Print".
Yasuhiro Matsumoto [Tue, 26 Mar 2013 06:39:46 +0000 (17:39 +1100)]
misc/vim: make Godoc command work with "log.Print".

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

12 years agoimage/gif: make test repeatable
Dave Cheney [Tue, 26 Mar 2013 05:20:17 +0000 (16:20 +1100)]
image/gif: make test repeatable

Fixes issue with go test -cpu=1,1

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

12 years agodoc/articles: update reference to obsolete "package documentation".
David Symonds [Tue, 26 Mar 2013 02:01:24 +0000 (13:01 +1100)]
doc/articles: update reference to obsolete "package documentation".

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

12 years agodatabase/sql: optimized []byte copy + []byte(nil) -> *interface fix
Julien Schmidt [Tue, 26 Mar 2013 00:43:30 +0000 (17:43 -0700)]
database/sql: optimized []byte copy + []byte(nil) -> *interface fix

Make the copy directly in the convert switch instead of an extra loop.
Also stops converting nil-[]byte to zero-[]byte when assigning to *interface

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

12 years agodoc/go1.1.html: introduction
Rob Pike [Tue, 26 Mar 2013 00:41:12 +0000 (17:41 -0700)]
doc/go1.1.html: introduction

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

12 years agodatabase/sql: link to driver wiki page
Brad Fitzpatrick [Tue, 26 Mar 2013 00:38:51 +0000 (17:38 -0700)]
database/sql: link to driver wiki page

Fixes #5127

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

12 years agodatabase/sql: don't close a driver.Conn until its Stmts are closed
Brad Fitzpatrick [Mon, 25 Mar 2013 23:50:27 +0000 (16:50 -0700)]
database/sql: don't close a driver.Conn until its Stmts are closed

Fixes #5046

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

12 years agocrypto/rsa: don't correct private exponent unless needed.
Adam Langley [Mon, 25 Mar 2013 23:08:29 +0000 (19:08 -0400)]
crypto/rsa: don't correct private exponent unless needed.

At some point in the past, I believe the GCD algorithm was setting d to
be negative. The RSA code has been correcting that ever since but, now,
it appears to have changed and the correction isn't needed.

Having d be too large is harmless, it's just a little odd and I
happened to notice.

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

12 years agocmd/ld: permit sym to be both cgo_export_static and cgo_export_dynamic
Ian Lance Taylor [Mon, 25 Mar 2013 22:37:54 +0000 (15:37 -0700)]
cmd/ld: permit sym to be both cgo_export_static and cgo_export_dynamic

Fixes SWIG callbacks.  Previously crosscall2 was only
cgo_export_static, despite the use of two #pragma declarations
in runtime/cgo/callbacks.c.

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

12 years agodoc: add summary of net/http additions to Go 1.1
Brad Fitzpatrick [Mon, 25 Mar 2013 22:17:44 +0000 (15:17 -0700)]
doc: add summary of net/http additions to Go 1.1

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

12 years agoruntime: pass setmg function to cgo_init
Russ Cox [Mon, 25 Mar 2013 22:14:02 +0000 (18:14 -0400)]
runtime: pass setmg function to cgo_init

This keeps the logic about how to set the thread-local variables
m and g in code compiled and linked by the gc toolchain,
an important property for upcoming cgo changes.

It's also just a nice cleanup: one less place to update when
these details change.

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

12 years agoruntime: delete mkasmh.sh
Russ Cox [Mon, 25 Mar 2013 21:46:11 +0000 (17:46 -0400)]
runtime: delete mkasmh.sh

This functionality moved into cmd/dist for Go 1.0.
Changes to this script have no effect.

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

12 years agocmd/gc: instrument logical && and ||.
Rémy Oudompheng [Mon, 25 Mar 2013 21:12:47 +0000 (22:12 +0100)]
cmd/gc: instrument logical && and ||.

The right operand of a && and || is only executed conditionnally,
so the instrumentation must be more careful. In particular
it should not turn nodes assumed to be cheap after walk into
expensive ones.

Update #4228

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

12 years agoruntime: store asmcgocall return PC where the ARM unwind expects it
Carl Shapiro [Mon, 25 Mar 2013 21:10:28 +0000 (14:10 -0700)]
runtime: store asmcgocall return PC where the ARM unwind expects it

The ARM implementation of runtime.cgocallback_gofunc diverged
from the calling convention by leaving a word of garbage at
the top of the stack and storing the return PC above the
locals.  This change stores the return PC at the top of the
stack and removes the save area above the locals.

Update #5124
This CL fixes first part of the ARM issues and added the unwind test.

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

12 years agocmd/5l, cmd/6l, cmd/8l: fix segfault on reading LOCALS for a duplicate definition.
Rémy Oudompheng [Mon, 25 Mar 2013 21:09:55 +0000 (22:09 +0100)]
cmd/5l, cmd/6l, cmd/8l: fix segfault on reading LOCALS for a duplicate definition.

Fixes #5105.

R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/7965043

12 years agomath: make Hypot special cases look like others
Russ Cox [Mon, 25 Mar 2013 21:01:40 +0000 (17:01 -0400)]
math: make Hypot special cases look like others

The edit makes Hypot's description match the form
used in the other routines in this package.

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

12 years agoruntime: optionally check all allocations in hashmap.c
Jan Ziak [Mon, 25 Mar 2013 20:35:46 +0000 (21:35 +0100)]
runtime: optionally check all allocations in hashmap.c

Adds the new debugging constant 'checkgc'. If its value is non-zero
all calls to mallocgc() from hashmap.c will start a garbage collection.

Fixes #5074.

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

12 years agodoc: add DialOpt and friends to go1.1.html
Brad Fitzpatrick [Mon, 25 Mar 2013 17:31:19 +0000 (10:31 -0700)]
doc: add DialOpt and friends to go1.1.html

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

12 years agonet: band-aid for windows network poller
Dmitriy Vyukov [Mon, 25 Mar 2013 16:57:36 +0000 (20:57 +0400)]
net: band-aid for windows network poller
Fixes performance of the current windows network poller
with the new scheduler.
Gives runtime a hint when GetQueuedCompletionStatus() will block.
Fixes #5068.

benchmark                    old ns/op    new ns/op    delta
BenchmarkTCP4Persistent        4004000        33906  -99.15%
BenchmarkTCP4Persistent-2        21790        17513  -19.63%
BenchmarkTCP4Persistent-4        44760        34270  -23.44%
BenchmarkTCP4Persistent-6        45280        43000   -5.04%

R=golang-dev, alex.brainman, coocood, rsc
CC=golang-dev
https://golang.org/cl/7612045

12 years agomisc/emacs: Derive mode from prog-mode if possible
Dominik Honnef [Mon, 25 Mar 2013 15:58:13 +0000 (08:58 -0700)]
misc/emacs: Derive mode from prog-mode if possible

R=golang-dev, bradfitz
CC=adonovan, cw, golang-dev, patrick.allen.higgins
https://golang.org/cl/7956044

12 years agomath: modify a comment to the convention format.
Oling Cat [Mon, 25 Mar 2013 15:43:51 +0000 (08:43 -0700)]
math: modify a comment to the convention format.

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

12 years agocmd/cc, cmd/ld: do not overflow strings in symbol lookup.
Rémy Oudompheng [Mon, 25 Mar 2013 07:20:22 +0000 (08:20 +0100)]
cmd/cc, cmd/ld: do not overflow strings in symbol lookup.

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

12 years agonet/http: deflake BenchmarkServerFakeConnNoKeepAlive.
Rémy Oudompheng [Mon, 25 Mar 2013 07:17:10 +0000 (08:17 +0100)]
net/http: deflake BenchmarkServerFakeConnNoKeepAlive.

Fixes #5121.

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

12 years agonet: disable tests with controlling network facilities in short mode
Mikio Hara [Mon, 25 Mar 2013 04:25:28 +0000 (13:25 +0900)]
net: disable tests with controlling network facilities in short mode

Perhaps it would make FreeBSD 10-CURRENT/ARM on Raspberry Pi builders happy.

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

12 years agoall.bat,make.bat,run.bat: make these work even when directory has space in it
Alex Brainman [Mon, 25 Mar 2013 01:13:34 +0000 (12:13 +1100)]
all.bat,make.bat,run.bat: make these work even when directory has space in it

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

12 years agobuild, cmd/5l: actually report failures for -linkmode tests
Shenghou Ma [Sun, 24 Mar 2013 19:18:05 +0000 (03:18 +0800)]
build, cmd/5l: actually report failures for -linkmode tests

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

12 years agocmd/cc: fix typo leading to index out of range.
Rémy Oudompheng [Sun, 24 Mar 2013 10:38:57 +0000 (11:38 +0100)]
cmd/cc: fix typo leading to index out of range.

Detected by GCC static analysis.

Fixes #5117.

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

12 years agobuild: increase timeout for ARM
Shenghou Ma [Sun, 24 Mar 2013 08:31:28 +0000 (16:31 +0800)]
build: increase timeout for ARM
in an effort to make builder freebsd-arm-pi and netbsd-arm-qemu pass again.

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

12 years agocmd/5l, cmd/6l, cmd/8l: remove declaration on non-existent variables.
Rémy Oudompheng [Sun, 24 Mar 2013 07:55:08 +0000 (08:55 +0100)]
cmd/5l, cmd/6l, cmd/8l: remove declaration on non-existent variables.

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

12 years agomisc/kate: fix multiline raw string syntax highlighting error.
Oling Cat [Sat, 23 Mar 2013 22:16:58 +0000 (15:16 -0700)]
misc/kate: fix multiline raw string syntax highlighting error.
From VisualFC.
Fixes #4862.

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

12 years agodoc/go1.1.html: performance
Rob Pike [Sat, 23 Mar 2013 15:29:59 +0000 (08:29 -0700)]
doc/go1.1.html: performance
An overview is all that's required.

R=golang-dev, remyoudompheng, bradfitz, adg
CC=golang-dev
https://golang.org/cl/7577050

12 years agonet: use original raddr if getpeername fails
Mikio Hara [Sat, 23 Mar 2013 13:32:19 +0000 (22:32 +0900)]
net: use original raddr if getpeername fails

This CL updates CL 7511043;
- adds new test cases for both UDPConn and UnixConn,
- makes sure unnamed UnixAddr handling,
- replaces t.Errorf with t.Fatalf in sockname related test cases.

Fixes #3721 (again).
Fixes #3838 (again).

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

12 years agonet: support IPv6 scoped addressing zone
Mikio Hara [Sat, 23 Mar 2013 00:57:40 +0000 (09:57 +0900)]
net: support IPv6 scoped addressing zone

This CL provides IPv6 scoped addressing zone support as defined
in RFC 4007 for internet protocol family connection setups.

Follwoing types and functions allow a literal IPv6 address with
zone identifer as theirs parameter.

pkg net, func Dial(string, string) (Conn, error)
pkg net, func DialOpt(string, ...DialOption) (Conn, error)
pkg net, func DialTimeout(string, string, time.Duration) (Conn, error)
pkg net, func Listen(string, string) (Listener, error)
pkg net, func ListenPacket(string, string) (PacketConn, error)
pkg net, func ResolveIPAddr(string, string) (*IPAddr, error)
pkg net, func ResolveTCPAddr(string, string) (*TCPAddr, error)
pkg net, func ResolveUDPAddr(string, string) (*UDPAddr, error)
pkg net, type IPAddr struct, Zone string
pkg net, type TCPAddr struct, Zone string
pkg net, type UDPAddr struct, Zone string

Also follwoing methods return a literal IPv6 address with zone
identifier string if possible.

pkg net, method (*IPAddr) String() string
pkg net, method (*TCPAddr) String() string
pkg net, method (*UDPAddr) String() string

Fixes #4234.
Fixes #4501.
Update #5081.

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

12 years agoruntime: remove declaration of non-existent function
Ian Lance Taylor [Sat, 23 Mar 2013 00:52:55 +0000 (17:52 -0700)]
runtime: remove declaration of non-existent function

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/7577049

12 years agoruntime: correct misplaced right brace in Linux SIGBUS handling
Ian Lance Taylor [Sat, 23 Mar 2013 00:32:04 +0000 (17:32 -0700)]
runtime: correct misplaced right brace in Linux SIGBUS handling

I'm not sure how to write a test for this.  The change in
behaviour is that if you somehow get a SIGBUS signal for an
address >= 0x1000, the program will now crash rather than
calling panic.  As far as I know, on x86 GNU/Linux, the only
way to get a SIGBUS (rather than a SIGSEGV) is to set the
stack pointer to an invalid value.

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

12 years agodoc/go1.1.html: fix broken links
Robert Griesemer [Fri, 22 Mar 2013 23:41:27 +0000 (16:41 -0700)]
doc/go1.1.html: fix broken links

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

12 years agodoc/go1.1.html: blockprofile, method values, ListenUnixgram, etc.
Rob Pike [Fri, 22 Mar 2013 22:45:16 +0000 (15:45 -0700)]
doc/go1.1.html: blockprofile, method values, ListenUnixgram, etc.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/7496051

12 years agonet: fix documentation for UnixAddr
Mikio Hara [Fri, 22 Mar 2013 22:39:43 +0000 (07:39 +0900)]
net: fix documentation for UnixAddr

Also simplifies ResolveUnixAddr.

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

12 years agospec: remove most §links for the now more common in-text links
Robert Griesemer [Fri, 22 Mar 2013 22:36:04 +0000 (15:36 -0700)]
spec: remove most §links for the now more common in-text links

Also:
- more consistenly use "xxx" statement rather than <code>xxx</code> statement
- fix/remove unnecessary links

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

12 years agodoc/go1.1.html: return requirements
Rob Pike [Fri, 22 Mar 2013 21:51:22 +0000 (14:51 -0700)]
doc/go1.1.html: return requirements

R=golang-dev, rsc, jeremyjackins, gri
CC=golang-dev
https://golang.org/cl/7838045

12 years agocmd/gc: fix line number for 'missing return' in closure
Russ Cox [Fri, 22 Mar 2013 21:50:29 +0000 (17:50 -0400)]
cmd/gc: fix line number for 'missing return' in closure

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

12 years agocmd/vet: diagnose unreachable code
Russ Cox [Fri, 22 Mar 2013 21:46:45 +0000 (17:46 -0400)]
cmd/vet: diagnose unreachable code

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

12 years agobuild: remove dead code
Russ Cox [Fri, 22 Mar 2013 21:28:22 +0000 (17:28 -0400)]
build: remove dead code

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

12 years agoencoding/gob: delete dead code.
Rob Pike [Fri, 22 Mar 2013 21:22:55 +0000 (14:22 -0700)]
encoding/gob: delete dead code.

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

12 years agoruntime/cgo, go/build: re-enable cgo for FreeBSD/ARM.
Shenghou Ma [Fri, 22 Mar 2013 19:21:30 +0000 (03:21 +0800)]
runtime/cgo, go/build: re-enable cgo for FreeBSD/ARM.

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

12 years agodatabase/sql: add missing []byte and RawBytes conversions
Julien Schmidt [Fri, 22 Mar 2013 19:19:21 +0000 (12:19 -0700)]
database/sql: add missing []byte and RawBytes conversions

E.g conversions from numeric types to RawBytes are missing, what makes RawBytes unusable in some cases.

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

12 years agocmd/vet: add assembly checker
Russ Cox [Fri, 22 Mar 2013 19:14:40 +0000 (15:14 -0400)]
cmd/vet: add assembly checker

Fixes #5036.

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

12 years agospec: add example showing missing return statement
Rob Pike [Fri, 22 Mar 2013 17:03:55 +0000 (10:03 -0700)]
spec: add example showing missing return statement
Will help people find the rules by searching the spec by
having a comment saying "missing return";
"terminating statement" does not evoke the rule to the
uninitiated.

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

12 years agobuild: update assembly variable names for vet
Russ Cox [Fri, 22 Mar 2013 16:57:55 +0000 (12:57 -0400)]
build: update assembly variable names for vet

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

12 years agocrypto/cipher: fix vet warning
Russ Cox [Fri, 22 Mar 2013 16:57:34 +0000 (12:57 -0400)]
crypto/cipher: fix vet warning

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

12 years agoCONTRIBUTORS: add Joseph Bonneau (Google CLA)
Adam Langley [Fri, 22 Mar 2013 16:56:52 +0000 (12:56 -0400)]
CONTRIBUTORS: add Joseph Bonneau (Google CLA)

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

12 years agoimage/gif: reject a GIF image if frame bounds larger than image bounds
Jeff R. Allen [Fri, 22 Mar 2013 16:30:31 +0000 (09:30 -0700)]
image/gif: reject a GIF image if frame bounds larger than image bounds

The GIF89a spec says: "Each image must fit within the
boundaries of the Logical Screen, as defined in the
Logical Screen Descriptor." Also, do not accept
GIFs which have too much data for the image size.

R=nigeltao, jra, r
CC=bradfitz, golang-dev
https://golang.org/cl/7602045

12 years agoruntime: correct return value checks for mmap on darwin/freebsd
Joel Sing [Fri, 22 Mar 2013 15:17:01 +0000 (02:17 +1100)]
runtime: correct return value checks for mmap on darwin/freebsd

On Darwin and FreeBSD, the mmap syscall return value is returned
unmodified. This means that the return value will either be a
valid address or a positive error number.

Also check return value from mmap in SysReserve - the callers of
SysReserve expect nil to be returned if the allocation failed.

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

12 years agoruntime: improve mmap return value checking for netbsd/openbsd
Joel Sing [Fri, 22 Mar 2013 15:15:52 +0000 (02:15 +1100)]
runtime: improve mmap return value checking for netbsd/openbsd

Rather than just checking for ENOMEM, check for a return value of less
than 4096, so that we catch other errors such as EACCES and EINVAL.

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

12 years agogo1.1.html: bufio.Scanner and reflect; more about surrogates
Rob Pike [Fri, 22 Mar 2013 05:37:13 +0000 (22:37 -0700)]
go1.1.html: bufio.Scanner and reflect; more about surrogates

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

12 years agomath: remove repeated comment.
Oling Cat [Fri, 22 Mar 2013 03:54:20 +0000 (14:54 +1100)]
math: remove repeated comment.

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

12 years agoimage/gif: tighten the checks for when the amount of an image's pixel
Nigel Tao [Fri, 22 Mar 2013 03:42:02 +0000 (14:42 +1100)]
image/gif: tighten the checks for when the amount of an image's pixel
data does not agree with its bounds.

R=r, jeff.allen
CC=golang-dev
https://golang.org/cl/7938043

12 years agocmd/cgo: fix the cgo example on multiple assignment context.
Miki Tebeka [Fri, 22 Mar 2013 03:06:25 +0000 (20:06 -0700)]
cmd/cgo: fix the cgo example on multiple assignment context.

Change from atoi to strtol since atoi does not set errno.

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

12 years agomisc/emacs: Kill gofmt error buffer if the buffer was formatted correctly already.
Dominik Honnef [Fri, 22 Mar 2013 03:03:27 +0000 (20:03 -0700)]
misc/emacs: Kill gofmt error buffer if the buffer was formatted correctly already.

R=adonovan, cw, patrick.allen.higgins, bradfitz
CC=golang-dev
https://golang.org/cl/7844045

12 years agonet/http: reuse bufio.Reader and bufio.Writer between conns
Brad Fitzpatrick [Fri, 22 Mar 2013 03:02:01 +0000 (20:02 -0700)]
net/http: reuse bufio.Reader and bufio.Writer between conns

Saves over 8KB of allocations per new connection.

benchmark                             old ns/op    new ns/op    delta
BenchmarkServerFakeConnNoKeepAlive        28777        24927  -13.38%

benchmark                            old allocs   new allocs    delta
BenchmarkServerFakeConnNoKeepAlive           52           46  -11.54%

benchmark                             old bytes    new bytes    delta
BenchmarkServerFakeConnNoKeepAlive        13716         5286  -61.46%

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

12 years agobufio: add some tests
Brad Fitzpatrick [Fri, 22 Mar 2013 02:59:49 +0000 (19:59 -0700)]
bufio: add some tests

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

12 years agodebug/elf: repair GNU version symbols.
Rémy Oudompheng [Fri, 22 Mar 2013 00:27:55 +0000 (01:27 +0100)]
debug/elf: repair GNU version symbols.

After the revert of revision 9ea9e7e6e0c8
the related revision 76ff7da868c6 must be reverted too.

Fixes #5102.

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

12 years agotest: more systematic shift tests
Robert Griesemer [Thu, 21 Mar 2013 23:56:59 +0000 (16:56 -0700)]
test: more systematic shift tests

To be submitted once gc agrees.

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

12 years agocmd/gc: accept ideal float as indices.
Rémy Oudompheng [Thu, 21 Mar 2013 23:38:23 +0000 (00:38 +0100)]
cmd/gc: accept ideal float as indices.

Fixes #4813.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/7625050

12 years agogo/doc: use regexp for -notes instead of comma-sep. list
Robert Griesemer [Thu, 21 Mar 2013 22:56:15 +0000 (15:56 -0700)]
go/doc: use regexp for -notes instead of comma-sep. list

-notes="BUG|TODO" instead of -notes="BUG,TODO".
Permits -notes=".*" to see all notes.

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

12 years agobufio.Scanner: delete obsolete TODO
Rob Pike [Thu, 21 Mar 2013 21:56:42 +0000 (14:56 -0700)]
bufio.Scanner: delete obsolete TODO
Also fix the examples to use stderr for errors.

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

12 years agonet/http/fcgi: fix a shutdown race
Brad Fitzpatrick [Thu, 21 Mar 2013 21:07:24 +0000 (14:07 -0700)]
net/http/fcgi: fix a shutdown race

If a handler didn't consume all its Request.Body, child.go was
closing the socket while the host was still writing to it,
causing the child to send a RST and the host (at least nginx)
to send an empty response body.

Now, we tell the host we're done with the request/response
first, and then close our input pipe after consuming a bit of
it. Consuming the body fixes the problem, and flushing to the
host first to tell it that we're done increases the chance
that the host cuts off further data to us, meaning we won't
have much to consume.

No new tests, because this package is lacking in tests.
Tested by hand with nginx.  See issue for testing details.

Fixes #4183

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

12 years agodebug/elf: restore Go 1.0 semantics for (*File).Symbols
Russ Cox [Thu, 21 Mar 2013 21:01:39 +0000 (17:01 -0400)]
debug/elf: restore Go 1.0 semantics for (*File).Symbols

Also adjust the implementation of applyRelocationsAMD64
so that the test added in CL 6848044 still passes.

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

12 years agoreflect: implement method values
Russ Cox [Thu, 21 Mar 2013 20:59:16 +0000 (16:59 -0400)]
reflect: implement method values

Fixes #1517.

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

12 years agodoc/go1.1.html: more TODOs done
Rob Pike [Thu, 21 Mar 2013 20:51:49 +0000 (13:51 -0700)]
doc/go1.1.html: more TODOs done
Only the net stuff remains as significant work in the "minor changes" section.

R=golang-dev, dave, elias.naur, rsc
CC=golang-dev
https://golang.org/cl/7933044

12 years agocrypto/rc4: faster amd64 implementation
Russ Cox [Thu, 21 Mar 2013 20:38:57 +0000 (16:38 -0400)]
crypto/rc4: faster amd64 implementation

XOR key into data 128 bits at a time instead of 64 bits
and pipeline half of state loads. Rotate loop to allow
single-register indexing for state[i].

On a MacBookPro10,2 (Core i5):

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          412          224  -45.63%
BenchmarkRC4_1K          3179         1613  -49.26%
BenchmarkRC4_8K         25223        12545  -50.26%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       310.51       570.42    1.84x
BenchmarkRC4_1K        322.09       634.48    1.97x
BenchmarkRC4_8K        320.97       645.32    2.01x

For comparison, on the same machine, openssl 0.9.8r reports
its rc4 speed as somewhat under 350 MB/s for both 1K and 8K
(it is operating 64 bits at a time).

On an Intel Xeon E5520:

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          418          259  -38.04%
BenchmarkRC4_1K          3200         1884  -41.12%
BenchmarkRC4_8K         25173        14529  -42.28%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       306.04       492.48    1.61x
BenchmarkRC4_1K        319.93       543.26    1.70x
BenchmarkRC4_8K        321.61       557.20    1.73x

For comparison, on the same machine, openssl 1.0.1
reports its rc4 speed as 587 MB/s for 1K and 601 MB/s for 8K.

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

12 years agocmd/ld: portability fixes
Shenghou Ma [Thu, 21 Mar 2013 20:00:54 +0000 (04:00 +0800)]
cmd/ld: portability fixes
fix code that implicitly assumes little-endian machines.

R=golang-dev, bradfitz, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/6792043

12 years agocmd/ld: don't generate DW_AT_type attr for unsafe.Pointer to match gcc behavior
Shenghou Ma [Thu, 21 Mar 2013 19:58:35 +0000 (03:58 +0800)]
cmd/ld: don't generate DW_AT_type attr for unsafe.Pointer to match gcc behavior
gcc generates only attr DW_AT_byte_size for DW_TAG_pointer_type of "void *",
but we used to also generate DW_AT_type pointing to imaginary unspecified
type "void", which confuses some gdb.
This change makes old Apple gdb 6.x (specifically, Apple version gdb-1515)
accepts our binary without issue like this:
(gdb) b 'main.main'
Die: DW_TAG_unspecified_type (abbrev = 10, offset = 47079)
    has children: FALSE
    attributes:
        DW_AT_name (DW_FORM_string) string: "void"
Dwarf Error: Cannot find type of die [in module /Users/minux/go/go2.hg/bin/go]

Special thanks to Russ Cox for pointing out the problem in comment #6 of
CL 7891044.

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

12 years agocmd/ld: fix bad merge
Shenghou Ma [Thu, 21 Mar 2013 19:54:14 +0000 (03:54 +0800)]
cmd/ld: fix bad merge
CL 7504044 accidentally reverted part of CL 7891044 and 7552045, this CL
bring those part back.

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

12 years agoruntime: mark strings without going through an intermediate buffer
Jan Ziak [Thu, 21 Mar 2013 18:00:02 +0000 (19:00 +0100)]
runtime: mark strings without going through an intermediate buffer

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

12 years agogo/format: fix documentation
Robert Griesemer [Thu, 21 Mar 2013 15:47:34 +0000 (08:47 -0700)]
go/format: fix documentation

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

12 years agocrypto/sha1: faster amd64, 386 implementations
Russ Cox [Thu, 21 Mar 2013 15:32:02 +0000 (11:32 -0400)]
crypto/sha1: faster amd64, 386 implementations

-- amd64 --

On a MacBookPro10,2 (Core i5):

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes          785          592  -24.59%
BenchmarkHash1K             8727         3014  -65.46%
BenchmarkHash8K            64926        20723  -68.08%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes        10.19        13.50    1.32x
BenchmarkHash1K           117.34       339.71    2.90x
BenchmarkHash8K           126.17       395.31    3.13x

For comparison, on the same machine, openssl 0.9.8r reports
its sha1 speed as 341 MB/s for 1K and 404 MB/s for 8K.

On an Intel Xeon E5520:

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes          984          707  -28.15%
BenchmarkHash1K            11141         3466  -68.89%
BenchmarkHash8K            82435        23411  -71.60%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         8.13        11.31    1.39x
BenchmarkHash1K            91.91       295.36    3.21x
BenchmarkHash8K            99.37       349.91    3.52x

For comparison, on the same machine, openssl 1.0.1 reports
its sha1 speed as 286 MB/s for 1K and 394 MB/s for 8K.

-- 386 --

On a MacBookPro10,2 (Core i5):

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         1041          713  -31.51%
BenchmarkHash1K            15612         3382  -78.34%
BenchmarkHash8K           110152        22733  -79.36%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         7.68        11.21    1.46x
BenchmarkHash1K            65.59       302.76    4.62x
BenchmarkHash8K            74.37       360.36    4.85x

On an Intel Xeon E5520:

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         1221          842  -31.04%
BenchmarkHash1K            14643         4137  -71.75%
BenchmarkHash8K           108722        27394  -74.80%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         6.55         9.49    1.45x
BenchmarkHash1K            69.93       247.51    3.54x
BenchmarkHash8K            75.35       299.04    3.97x

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

12 years agocrypto/md5: faster amd64, 386 implementations
Russ Cox [Thu, 21 Mar 2013 15:26:00 +0000 (11:26 -0400)]
crypto/md5: faster amd64, 386 implementations

-- amd64 --

On a MacBookPro10,2 (Core i5):

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   471          524  +11.25%
BenchmarkHash1K                      3018         2220  -26.44%
BenchmarkHash8K                     20634        14604  -29.22%
BenchmarkHash8BytesUnaligned          468          523  +11.75%
BenchmarkHash1KUnaligned             3006         2212  -26.41%
BenchmarkHash8KUnaligned            20820        14652  -29.63%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 16.98        15.26    0.90x
BenchmarkHash1K                    339.26       461.19    1.36x
BenchmarkHash8K                    397.00       560.92    1.41x
BenchmarkHash8BytesUnaligned        17.08        15.27    0.89x
BenchmarkHash1KUnaligned           340.65       462.75    1.36x
BenchmarkHash8KUnaligned           393.45       559.08    1.42x

For comparison, on the same machine, openssl 0.9.8r reports
its md5 speed as 350 MB/s for 1K and 410 MB/s for 8K.

On an Intel Xeon E5520:

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   565          607   +7.43%
BenchmarkHash1K                      3753         2475  -34.05%
BenchmarkHash8K                     25945        16250  -37.37%
BenchmarkHash8BytesUnaligned          559          594   +6.26%
BenchmarkHash1KUnaligned             3754         2474  -34.10%
BenchmarkHash8KUnaligned            26011        16359  -37.11%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 14.15        13.17    0.93x
BenchmarkHash1K                    272.83       413.58    1.52x
BenchmarkHash8K                    315.74       504.11    1.60x
BenchmarkHash8BytesUnaligned        14.31        13.46    0.94x
BenchmarkHash1KUnaligned           272.73       413.78    1.52x
BenchmarkHash8KUnaligned           314.93       500.73    1.59x

For comparison, on the same machine, openssl 1.0.1 reports
its md5 speed as 443 MB/s for 1K and 513 MB/s for 8K.

-- 386 --

On a MacBookPro10,2 (Core i5):

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   602          670  +11.30%
BenchmarkHash1K                      4038         2549  -36.87%
BenchmarkHash8K                     27879        16690  -40.13%
BenchmarkHash8BytesUnaligned          602          670  +11.30%
BenchmarkHash1KUnaligned             4025         2546  -36.75%
BenchmarkHash8KUnaligned            27844        16692  -40.05%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 13.28        11.93    0.90x
BenchmarkHash1K                    253.58       401.69    1.58x
BenchmarkHash8K                    293.83       490.81    1.67x
BenchmarkHash8BytesUnaligned        13.27        11.94    0.90x
BenchmarkHash1KUnaligned           254.40       402.05    1.58x
BenchmarkHash8KUnaligned           294.21       490.77    1.67x

On an Intel Xeon E5520:

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   752          716   -4.79%
BenchmarkHash1K                      5307         2799  -47.26%
BenchmarkHash8K                     36993        18042  -51.23%
BenchmarkHash8BytesUnaligned          748          730   -2.41%
BenchmarkHash1KUnaligned             5301         2795  -47.27%
BenchmarkHash8KUnaligned            36983        18085  -51.10%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 10.64        11.16    1.05x
BenchmarkHash1K                    192.93       365.80    1.90x
BenchmarkHash8K                    221.44       454.03    2.05x
BenchmarkHash8BytesUnaligned        10.69        10.95    1.02x
BenchmarkHash1KUnaligned           193.15       366.36    1.90x
BenchmarkHash8KUnaligned           221.51       452.96    2.04x

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

12 years agocrypto/rc4: faster amd64, 386 implementations
Russ Cox [Thu, 21 Mar 2013 15:25:09 +0000 (11:25 -0400)]
crypto/rc4: faster amd64, 386 implementations

-- amd64 --

On a MacBookPro10,2 (Core i5):

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          470          421  -10.43%
BenchmarkRC4_1K          3123         3275   +4.87%
BenchmarkRC4_8K         26351        25866   -1.84%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       272.22       303.40    1.11x
BenchmarkRC4_1K        327.80       312.58    0.95x
BenchmarkRC4_8K        307.24       313.00    1.02x

For comparison, on the same machine, openssl 0.9.8r reports
its rc4 speed as somewhat under 350 MB/s for both 1K and 8K.
The Core i5 performance can be boosted another 20%, but only
by making the Xeon performance significantly slower.

On an Intel Xeon E5520:

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          774          417  -46.12%
BenchmarkRC4_1K          6121         3200  -47.72%
BenchmarkRC4_8K         48394        25151  -48.03%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       165.18       306.84    1.86x
BenchmarkRC4_1K        167.28       319.92    1.91x
BenchmarkRC4_8K        167.29       321.89    1.92x

For comparison, on the same machine, openssl 1.0.1
(which uses a different implementation than 0.9.8r)
reports its rc4 speed as 587 MB/s for 1K and 601 MB/s for 8K.
It is using SIMD instructions to do more in parallel.

So there's still some improvement to be had, but even so,
this is almost 2x faster than what it replaced.

-- 386 --

On a MacBookPro10,2 (Core i5):

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128         3491          421  -87.94%
BenchmarkRC4_1K         28063         3205  -88.58%
BenchmarkRC4_8K        220392        25228  -88.55%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128        36.66       303.81    8.29x
BenchmarkRC4_1K         36.49       319.42    8.75x
BenchmarkRC4_8K         36.73       320.90    8.74x

On an Intel Xeon E5520:

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128         2268          524  -76.90%
BenchmarkRC4_1K         18161         4137  -77.22%
BenchmarkRC4_8K        142396        32350  -77.28%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128        56.42       244.13    4.33x
BenchmarkRC4_1K         56.38       247.46    4.39x
BenchmarkRC4_8K         56.86       250.26    4.40x

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

12 years agoruntime: explicitly remove fd's from epoll waitset before close()
Dmitriy Vyukov [Thu, 21 Mar 2013 08:54:19 +0000 (12:54 +0400)]
runtime: explicitly remove fd's from epoll waitset before close()
Fixes #5061.

Current code relies on the fact that fd's are automatically removed from epoll set when closed. However, it is not true. Underlying file description is removed from epoll set only when *all* fd's referring to it are closed.

There are 2 bad consequences:
1. Kernel delivers notifications on already closed fd's.
2. The following sequence of events leads to error:
   - add fd1 to epoll
   - dup fd1 = fd2
   - close fd1 (not removed from epoll since we've dup'ed the fd)
   - dup fd2 = fd1 (get the same fd as fd1)
   - add fd1 to epoll = EEXIST

So, if fd can be potentially dup'ed of fork'ed, it's necessary to explicitly remove the fd from epoll set.

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

12 years agoruntime: faster parallel GC
Dmitriy Vyukov [Thu, 21 Mar 2013 08:48:02 +0000 (12:48 +0400)]
runtime: faster parallel GC
Use per-thread work buffers instead of global mutex-protected pool. This eliminates contention from parallel scan phase.

benchmark                             old ns/op    new ns/op    delta
garbage.BenchmarkTree2-8               97100768     71417553  -26.45%
garbage.BenchmarkTree2LastPause-8     970931485    714103692  -26.45%
garbage.BenchmarkTree2Pause-8         469127802    345029253  -26.45%
garbage.BenchmarkParser-8            2880950854   2715456901   -5.74%
garbage.BenchmarkParserLastPause-8    137047399    103336476  -24.60%
garbage.BenchmarkParserPause-8         80686028     58922680  -26.97%

R=golang-dev, 0xe2.0x9a.0x9b, dave, adg, rsc, iant
CC=golang-dev
https://golang.org/cl/7816044

12 years agocmd/gc: implement more cases in racewalk.
Rémy Oudompheng [Thu, 21 Mar 2013 07:53:52 +0000 (08:53 +0100)]
cmd/gc: implement more cases in racewalk.

Add missing CLOSUREVAR in switch.
Mark MAKE, string conversion nodes as impossible.
Control statements do not need instrumentation.
Instrument COM and LROT nodes.
Instrument map length.

Update #4228

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

12 years agocrypto/tls: use method values
Brad Fitzpatrick [Thu, 21 Mar 2013 03:53:38 +0000 (23:53 -0400)]
crypto/tls: use method values

Currently fails with a compiler error, though.

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

12 years agocmd/gc: fix escape analysis of method values
Russ Cox [Thu, 21 Mar 2013 03:53:27 +0000 (23:53 -0400)]
cmd/gc: fix escape analysis of method values

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