net: enable runtime-integrated network pollster on freebsd, openbsd

Fixes issue 5199.

Benchmark results on freebsd/amd64 (virtual machine):

benchmark                             old ns/op    new ns/op    delta
BenchmarkTCP4OneShot-2                   184566       187164   +1.41%
BenchmarkTCP4OneShotTimeout-2            215558       187722  -12.91%
BenchmarkTCP4Persistent-2                 59686        41294  -30.81%
BenchmarkTCP4PersistentTimeout-2          60692        39974  -34.14%
BenchmarkTCP6OneShot-2                   226595       223688   -1.28%
BenchmarkTCP6OneShotTimeout-2            253144       225161  -11.05%
BenchmarkTCP6Persistent-2                 69157        55605  -19.60%
BenchmarkTCP6PersistentTimeout-2          70426        53805  -23.60%
BenchmarkTCP4ConcurrentReadWrite-2        53878        56087   +4.10%
BenchmarkTCP6ConcurrentReadWrite-2        66538        68190   +2.48%

benchmark                            old allocs   new allocs    delta
BenchmarkTCP4OneShot-2                       39           36   -7.69%
BenchmarkTCP4OneShotTimeout-2                42           36  -14.29%
BenchmarkTCP4Persistent-2                     1            0  -100.00%
BenchmarkTCP4PersistentTimeout-2              1            0  -100.00%
BenchmarkTCP6OneShot-2                       41           36  -12.20%
BenchmarkTCP6OneShotTimeout-2                43           36  -16.28%
BenchmarkTCP6Persistent-2                     1            0  -100.00%
BenchmarkTCP6PersistentTimeout-2              1            0  -100.00%
BenchmarkTCP4ConcurrentReadWrite-2            0            0     n/a%
BenchmarkTCP6ConcurrentReadWrite-2            0            0     n/a%

benchmark                             old bytes    new bytes    delta
BenchmarkTCP4OneShot-2                     3084         2544  -17.51%
BenchmarkTCP4OneShotTimeout-2              3129         2519  -19.50%
BenchmarkTCP4Persistent-2                    30            0  -100.00%
BenchmarkTCP4PersistentTimeout-2             31            0  -100.00%
BenchmarkTCP6OneShot-2                     3297         2660  -19.32%
BenchmarkTCP6OneShotTimeout-2              3306         2655  -19.69%
BenchmarkTCP6Persistent-2                    31            0  -100.00%
BenchmarkTCP6PersistentTimeout-2             29            0  -100.00%
BenchmarkTCP4ConcurrentReadWrite-2            2            0  -100.00%
BenchmarkTCP6ConcurrentReadWrite-2            7            0  -100.00%

R=dvyukov, minux.ma, dave, bradfitz, alex.brainman
CC=golang-dev
https://codereview.appspot.com/8264043
runtime: fix wrong syscall numbers on freebsd/386, openbsd/386

R=golang-dev, jsing
CC=golang-dev
https://codereview.appspot.com/12876044
tests: remove two misuses of nil pointers

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/12858044
spec: &x panics if x does

See golang.org/s/go12nil for the extended version.

R=golang-dev, r, adonovan
CC=golang-dev
https://codereview.appspot.com/12964043
cmd/gc: &x panics if x does

See golang.org/s/go12nil.

This CL is about getting all the right checks inserted.
A followup CL will add an optimization pass to
remove redundant checks.

R=ken2
CC=golang-dev
https://codereview.appspot.com/12970043
net/http: unify the confusingly-named serve_test and server_test

One was tiny. One was gigantic. Now one is gone and one is giganticer.

No code changes.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/13025043
cmd/go: delete 'go doc'
It's next to useless and confusing as well. Let's make godoc better instead.

Fixes issue 4849.

R=golang-dev, dsymonds, adg, rogpeppe, rsc
CC=golang-dev
https://codereview.appspot.com/12974043
doc/go1.2.txt: three-index slices are going into 1.2

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/12931044
doc/go1.2.txt: delete 'go doc'
It's nearly useless and for plain 'go doc', 'godoc .' works fine.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/13004044
net/http: don't send an automatic Content-Length on a 304 Not Modified

Also start of some test helper unification, long overdue.
I refrained from cleaning up the rest in this CL.

Fixes issue 6157

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/13030043
cmd/gc: ensure addable in checknil (fix race build)

TBR=dvyukov
CC=golang-dev
https://codereview.appspot.com/12791044
database/sql: make Rows.Next returning false always implicitly call
Rows.Close.

Previously, callers that followed the example code (but not call
rows.Close after "for rows.Next() { ... }") could leak statements if
the driver returned an error other than io.EOF.

R=bradfitz, alex.brainman
CC=golang-dev, rsc
https://codereview.appspot.com/12677050
A+C: Dimitri Tcaciuc (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/13024045
    image: Inline example image data to make it runnable on playground.

Use more compressed image to reduce source clutter.

Fixes issue 5983.

R=nigeltao, adg
CC=golang-dev
https://codereview.appspot.com/12513044

Committer: Nigel Tao <nigeltao@golang.org>
runtime: impose stack size limit

The goal is to stop only those programs that would keep
going and run the machine out of memory, but before they do that.
1 GB on 64-bit, 250 MB on 32-bit.
That seems implausibly large, and it can be adjusted.

Fixes issue 2556.
Fixes issue 4494.
Fixes issue 5173.

R=khr, r, dvyukov
CC=golang-dev
https://codereview.appspot.com/12541052
misc/emacs: Refactor coverage code into multiple functions

Also fixes color gradient being calculated against the wrong maximum.

R=adonovan
CC=golang-dev
https://codereview.appspot.com/12968043

Committer: Alan Donovan <adonovan@google.com>
cmd/gc: remove mentions of "ideal" from error messages.
        _ = complex("foo", 0)
        _ = complex(true, 0)
now trigger:
        x.go:4: invalid operation: complex("foo", 0) (mismatched types untyped string and untyped number)
        x.go:5: invalid operation: complex(true, 0) (mismatched types untyped bool and untyped number)

Fixes issue 4521

R=golang-dev, remyoudompheng, rsc
CC=golang-dev
https://codereview.appspot.com/12973043
cmd/go: fix at least some instances of double compilation

When the packages the tested package depends on don't build,
we weren't getting out early. Added a simple check for a successful
build to an existing early out.

There may be other ways that double compilation arises, but
this fixes the one listed in the issue.
Fixes issue 5679

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/13036043
misc/dist: don't copy godoc templates to lib/godoc

They're baked into the godoc binary now.

R=golang-dev, alex.brainman
CC=golang-dev
https://codereview.appspot.com/12751047
misc/emacs: when defining prog-mode, define it like GNU Emacs 24 would

Fixes issue 6156.

R=adonovan
CC=golang-dev
https://codereview.appspot.com/13035043

Committer: Brad Fitzpatrick <bradfitz@golang.org>