cmd/6c, cmd/8c: fix stack allocated Biobuf leaking at exit

Fixes issue 5085.

{6,8}c/swt.c allocates a third Biobuf in automatic memory which is not terminated at the end of the function. This causes the buffer to be 'in use' when the batexit handler fires, confusing valgrind.

Huge thanks to DMorsing for the diagnosis.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://codereview.appspot.com/7844044
misc/swig: remove old broken Makefile

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7786046
net/http/fcgi: Request.Body should always be non-nil

Found this inconsistency from net/http's Server while
debugging Issue 4183

Unfortunately this package lacks testing around this,
or most of child.go. :/

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7735046
runtime: prevent garbage collection during hashmap insertion (fix 2)

Fixes issue 5074 in multi-threaded scenarios.

R=golang-dev, daniel.morsing, dave, dvyukov, bradfitz, rsc
CC=golang-dev, remyoudompheng
https://codereview.appspot.com/7916043
runtime: faster hashmap implementation.

Hashtable is arranged as an array of
8-entry buckets with chained overflow.
Each bucket has 8 extra hash bits
per key to provide quick lookup within
a bucket.  Table is grown incrementally.

Update issue 3885
Go time drops from 0.51s to 0.34s.

R=r, rsc, m3b, dave, bradfitz, khr, ugorji, remyoudompheng
CC=golang-dev
https://codereview.appspot.com/7504044
spec: define method values

Fixes issue 2280.

R=golang-dev, r, bradfitz, iant, andybalholm, gri
CC=golang-dev
https://codereview.appspot.com/7816045
cmd/gc: implement method values

R=ken2, ken
CC=golang-dev
https://codereview.appspot.com/7546052
cmd/gc: reject methods on non-locals, even if symbol exists

Fixes issue 5089.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7767044
cmd/gc: add OCHECKNOTNIL to race walker (fix build)

TBR=dvyukov
CC=golang-dev
https://codereview.appspot.com/7635046
runtime: Use aligned loads for AES key schedule.

R=rsc, minux.ma, khr
CC=golang-dev
https://codereview.appspot.com/7763050
go/parser: use method values

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7858045
spec: fix description of initialization
The analysis does not depend on the values of the items.
Fixes issue 4648.

R=golang-dev, gri, rsc
CC=golang-dev
https://codereview.appspot.com/7593050
runtime: free map structures more aggressively

R=rsc, bradfitz, khr
CC=golang-dev
https://codereview.appspot.com/7849047
src/pkg: fixed various typos

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7936043
cmd/gc: fix escape analysis of method values

R=ken2
CC=golang-dev
https://codereview.appspot.com/7518050
crypto/tls: use method values

Currently fails with a compiler error, though.

R=golang-dev, agl, rsc
CC=golang-dev
https://codereview.appspot.com/7933043

Committer: Russ Cox <rsc@golang.org>
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 issue 4228

R=dvyukov, golang-dev
CC=golang-dev
https://codereview.appspot.com/7504047
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://codereview.appspot.com/7816044
runtime: explicitly remove fd's from epoll waitset before close()
Fixes issue 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://codereview.appspot.com/7870043