test: enforce 1 proc in the test
otherwise it fails spuriously with "newfunc allocated unexpectedly" message
when run with GOMAXPROCS>1 (other goroutine allocates).

R=golang-dev, dsymonds
CC=golang-dev
http://codereview.appspot.com/6347056
cmd/gc: add missing case for OCOM in defaultlit()
        Fixes issue 3765.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6349064
image: fix doc typo
     Fixes issue 3789.

R=golang-dev, bradfitz
CC=golang-dev
http://codereview.appspot.com/6357058
net/http: fix comment

R=golang-dev, bradfitz
CC=golang-dev
http://codereview.appspot.com/6348062
reflect: set GOMAXPROCS=1 in the malloc test
Occasionally I see:
--- FAIL: TestAllocations-15 (0.00 seconds)
        all_test.go:1575: 6 mallocs after 100 iterations
Tested:
$ go test -cpu=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 reflect

R=golang-dev, dsymonds, r
CC=golang-dev
http://codereview.appspot.com/6354063
math/big: Remove unnecessary test from nat.go multiplication
The switch at the beginning of the function already ensures n > 1,
so testing for n < 2 is redundant.

R=golang-dev, gri
CC=golang-dev
http://codereview.appspot.com/6350051

Committer: Robert Griesemer <gri@golang.org>
cmd/gc: cache itab lookup in convT2I.

There may be further savings if convT2I can avoid the function call
if the cache is good and T is uintptr-shaped, a la convT2E, but that
will be a follow-up CL.

src/pkg/runtime:
benchmark                  old ns/op    new ns/op    delta
BenchmarkConvT2ISmall             43           15  -64.01%
BenchmarkConvT2IUintptr           45           14  -67.48%
BenchmarkConvT2ILarge            130          101  -22.31%

test/bench/go1:
benchmark                 old ns/op    new ns/op    delta
BenchmarkBinaryTree17    8588997000   8499058000   -1.05%
BenchmarkFannkuch11      5300392000   5358093000   +1.09%
BenchmarkGobDecode         30295580     31040190   +2.46%
BenchmarkGobEncode         18102070     17675650   -2.36%
BenchmarkGzip             774191400    771591400   -0.34%
BenchmarkGunzip           245915100    247464100   +0.63%
BenchmarkJSONEncode       123577000    121423050   -1.74%
BenchmarkJSONDecode       451969800    596256200  +31.92%
BenchmarkMandelbrot200     10060050     10072880   +0.13%
BenchmarkParse             10989840     11037710   +0.44%
BenchmarkRevcomp         1782666000   1716864000   -3.69%
BenchmarkTemplate         798286600    723234400   -9.40%

R=rsc, bradfitz, go.peter.90, daniel.morsing, dave, uriel
CC=golang-dev
http://codereview.appspot.com/6337058
syscall: use 32 bits structure for Getrlimit/Setrlimit on 386/ARM.

Fixes issue 2492

R=rsc, bradfitz
CC=golang-dev
http://codereview.appspot.com/6295073

Committer: Brad Fitzpatrick <bradfitz@golang.org>
runtime: refactor proc.c
1. Rename 'g' and 'm' local vars to 'gp' and 'mp' (convention already used in some functions)
'g' and 'm' are global vars that mean current goroutine and current machine,
when they are shadowed by local vars, it's confusing, no ability to debug log both, etc.
2. White-space shuffling.
No semantic changes.
In preparation to bigger changes.

R=golang-dev, dave
CC=golang-dev
http://codereview.appspot.com/6355061
syscall: fix FreeBSD 386 sendfile
The previous version was not handling an off_t (64 bit)
parameter on 32 bit i386 systems.  This patch splits sendfile
into two implementations in their respective arch-specific files.
Tested on FreeBSD amd64 and i386.

R=bradfitz
CC=golang-dev
http://codereview.appspot.com/6356048

Committer: Brad Fitzpatrick <bradfitz@golang.org>
doc/debugging_with_gdb: mention how to disable gc optimization

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6353055
encoding/gob: fix bug in Register
The old code added a star but did not indirect the reflect.Type.

R=bradfitz
CC=golang-dev
http://codereview.appspot.com/6348067
net/http: clean up fs tests a bit

And fix some govet-caught format arg issues.

R=r
CC=golang-dev
http://codereview.appspot.com/6354068
math/rand: avoid use of math.Pow in tests.

The use of math.Pow for mere squaring can be extremely
slow on soft-float ARM. Even on systems with hardware
floating-point, a speedup in test duration is observed.

On amd64
Before: ok      math/rand       2.009s
After:  ok      math/rand       0.340s

Fixes issue 3740.

R=dave, golang-dev, r, r
CC=golang-dev
http://codereview.appspot.com/6348061
reflect: reflect.Zero results are neither addressable nor settable

This could be deduced from "The Laws of Reflection" but it seems
worthwhile highlighting it.

R=r
CC=golang-dev
http://codereview.appspot.com/6350073
runtime: move panic/defer/recover-related stuff to a separate file
Move panic/defer/recover-related stuff from proc.c/runtime.c to a new file panic.c.
No semantic changes.
proc.c is 1800+ LOC and is a bit difficult to work with.

R=golang-dev, dave, r
CC=golang-dev
http://codereview.appspot.com/6343071
cmd/cgo: make typedef map traversal order consistent
        So that _cgo_gotypes.go will be the same for the same source
        code.

R=nigeltao
CC=golang-dev
http://codereview.appspot.com/6357067
misc/chrome/gophertool: fix manifest
according to http://code.google.com/chrome/extensions/browserAction.html,
it should use "default_popup" instead of "popup".

R=golang-dev, adg
CC=golang-dev
http://codereview.appspot.com/6349077
cmd/dist: Make verbose messages print to stderr

Made the following changes:
 - Export errprintf() from all three OS-specific modules
 - Added errprintf() to a.h
 - Moved errprintf() in windows.c under xprintf(), since they are so similar
 - Replaced all instances of xprintf() with errprintf() where a vflag check is done
Fixes issue 3788.

R=golang-dev, alex.brainman
CC=golang-dev
http://codereview.appspot.com/6346056

Committer: Alex Brainman <alex.brainman@gmail.com>