sync/once: panicking functions still marked as complete

This is a corner case, and one that was even tested, but this
CL changes the behavior to say that f is "complete" even if it panics.
But don't think of it that way, think of it as sync.Once runs
the function only the first time it is called, rather than
repeatedly until a run of the function completes.

Fixes issue 8118.

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/137350043
sync: simplify TestOncePanic

Follow-up to CL 137350043.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/141620043
liblink: make GO_ARGS the default for functions beginning with ·

If there is a leading ·, assume there is a Go prototype and
attach the Go prototype information to the function.
If the function is not called from Go and does not need a
Go prototype, it can be made file-local instead (using name<>(SB)).

This fixes the current BSD build failures, by giving functions like
sync/atomic.StoreUint32 argument stack map information.

Fixes issue 8753.

LGTM=khr, iant
R=golang-codereviews, iant, khr, bradfitz
CC=golang-codereviews, r, rlh
https://codereview.appspot.com/142150043
reflect: add Type.Comparable

Like most of the Type methods, the definition of Comparable
is what the Go spec says it is.

Fixes issue 7911.

LGTM=gri
R=gri, r
CC=golang-codereviews
https://codereview.appspot.com/144020043
net/mail: allow us-ascii encoding

Fixes issue 6611.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/14990045
runtime: reenable TestStackGrowth on 32-bit systems

If this needs to be turned back off, it should be done
just before the '// in finalizer' comment, not at the top
of the function.

GC is more precise now than it was (the only imprecise
stuff left is some global variables), so maybe the finalizer
test will work now on 32-bit systems.

LGTM=khr
R=khr
CC=golang-codereviews
https://codereview.appspot.com/144030043
A+C: Ahmed Waheed Moanes (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://codereview.appspot.com/138550043
cmd/go: use pkg-config include pathes in swig and don't double compile c++ files.

Fixes issue 8566.

LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/126210045

Committer: Ian Lance Taylor <iant@golang.org>
doc/go1.4.txt: reflect.Type.Comparable

CC=golang-codereviews
https://codereview.appspot.com/138530044
runtime: always run semacquire on the G stack

semacquire might need to park the currently running G.  It can
only park if called from the G stack (because it has no way of
saving the M stack state).  So all calls to semacquire must come
from the G stack.

The three violators are GOMAXPROCS, ReadMemStats, and WriteHeapDump.
This change moves the semacquire call earlier, out of their C code
and into their Go code.

This seldom caused bugs because semacquire seldom actually had
to park the caller.  But it did happen intermittently.

Fixes issue 8749

LGTM=dvyukov
R=golang-codereviews, dvyukov, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/144940043
liblink, sync/atomic: fix arm build

The liblink code to insert the FUNCDATA for a stack map
from the Go prototype was not correct for ARM
(different data structure layout).

Also, sync/atomic was missing some Go prototypes
for ARM-specific functions.

TBR=r
CC=golang-codereviews
https://codereview.appspot.com/143160045
sync/atomic: add Value
A Value provides an atomic load and store of a consistently typed value.
It's intended to be used with copy-on-write idiom (see the example).

Performance:
BenchmarkValueRead	50000000	        21.7 ns/op
BenchmarkValueRead-2	200000000	         8.63 ns/op
BenchmarkValueRead-4	300000000	         4.33 ns/op

TBR=rsc
R=golang-codereviews
CC=golang-codereviews
https://codereview.appspot.com/136710045
doc/go1.4.txt: add sync/atomic.Value

CC=golang-codereviews
https://codereview.appspot.com/145800043
sync: fix linux/arm build

For real this time.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://codereview.appspot.com/141640043
runtime: change minimum stack size to 2K.

It will be 8K on windows because it needs 4K for the OS.
Similarly, plan9 will be 4K.

On linux/amd64, reduces size of 100,000 goroutines
from ~819MB to ~245MB.

Update issue 7514

LGTM=dvyukov
R=golang-codereviews, dvyukov, khr, aram
CC=golang-codereviews
https://codereview.appspot.com/145790043
doc/go1.4.txt: reduced stack size

CC=golang-codereviews
https://codereview.appspot.com/144050043
runtime: account for tiny allocs, for testing.AllocsPerRun

Fixes issue 8734.

LGTM=r, bradfitz, dvyukov
R=bradfitz, r, dvyukov
CC=golang-codereviews, iant, khr
https://codereview.appspot.com/143150043
doc/go1.4.txt: add tinyallocs change

CC=golang-codereviews
https://codereview.appspot.com/145050043
sync/atomic: add more missing Go prototype

Should fix nacl/arm build.

TBR=minux
CC=golang-codereviews
https://codereview.appspot.com/145070043
runtime: print more detail in adjustframe crash

The logic here is copied from mgc0.c's scanframe.
Mostly it is messages although the minsize code is new
(and I believe necessary).

I am hoping to get more information about the current
arm build failures (or, if it's the minsize thing, fix them).

TBR=khr
R=khr
CC=golang-codereviews
https://codereview.appspot.com/143180043