image/png: make the CompressionLevel constants negative, reserving
positive numbers to mean a numeric zlib compression level.

LGTM=bradfitz, ruiu
R=bradfitz, ruiu
CC=golang-codereviews, jeff.allen
https://codereview.appspot.com/138860043
net/http: fix typo in comment

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://codereview.appspot.com/138960043

Committer: Andrew Gerrand <adg@golang.org>
cmd/ld: diagnose Go calling C

For example:
go build -ldflags -C cmd/go 2>&1 | awk '{print $NF}' | sort | uniq -c | sort -nr

LGTM=khr
R=khr, josharian
CC=golang-codereviews
https://codereview.appspot.com/135170044
misc/cgo/testcdefs: comment out test of packed structs

The [568]c compilers no longer support packed structs, so
using them with -cdefs no longer works.  Just commenting out
the test, rather than removing it, in case this needs to be
handled.  It may be that -cdefs can go away entirely in the
future, in which case so can this directory.

LGTM=mdempsky
R=rsc, mdempsky
CC=golang-codereviews
https://codereview.appspot.com/136030043

Committer: Russ Cox <rsc@golang.org>
runtime: paste mprof.goc into mprof.go as comments

NO CODE CHANGES HERE

The first conversion was not complete.
This CL doesn't make any actual changes,
but it inserts the missing mprof.goc code
as comments so that the next CL will have
useful diffs.

To make the diffs a bit more useful, removed
all semicolons, ->, and runtime· prefixes as well.

Also corrected order of a few functions in mprof.go
to match original order in mprof.goc.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, iant, khr, r
https://codereview.appspot.com/134200043
archive/zip: add Writer.Flush

This is needed for callers to be able to keep track of the
writing position within a zip file. Otherwise it's not
possible to compute the size of headers, and the TOC isn't
written until the very end.

LGTM=adg
R=adg
CC=golang-codereviews
https://codereview.appspot.com/134210043
runtime: remove old malloc test programs

These haven't been run in ages.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, iant, khr, r
https://codereview.appspot.com/134170043
strings: use Rabin-Karp algorithm for LastIndex.

benchmark                  old ns/op     new ns/op     delta
BenchmarkSingleMatch       49443         52275         +5.73%
BenchmarkIndex             28.8          27.4          -4.86%
BenchmarkLastIndex         14.5          14.0          -3.45%
BenchmarkLastIndexHard1    3982782       2309200       -42.02%
BenchmarkLastIndexHard2    3985562       2287715       -42.60%
BenchmarkLastIndexHard3    3555259       2282866       -35.79%

LGTM=josharian, nigeltao
R=golang-codereviews, ality, josharian, bradfitz, dave, nigeltao, gobot, nightlyone
CC=golang-codereviews
https://codereview.appspot.com/102560043

Committer: Nigel Tao <nigeltao@golang.org>
runtime/race: better handling of atomic operations
This change fixes the last known false negative of the race detector --
detection of races between mutating atomic operations and non-atomic operations.
Race runtime already has functions for precise modelling of various atomic operations,
so this change just forwards all atomic ops to race runtime
instead of poor man modeling in sync/atomic package.
Performance is also improved -- full sync/atomic tests run in 60s instead of 85s now.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://codereview.appspot.com/111310044
runtime: change PC, SP values in Stkframe, Panic, Defer from byte* to uintptr

uintptr is better when translating to Go,
and in a few places it's better in C too.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant, khr
https://codereview.appspot.com/138980043