runtime: fix build on Plan 9

warning: src/pkg/runtime/mem_plan9.c:72 param declared and not used: n
src/pkg/runtime/mem_plan9.c:73 name not declared: nbytes
src/pkg/runtime/mem_plan9.c:73 bad in naddr: NAME nbytes<>+0(SB)

LGTM=minux.ma, bradfitz
R=khr, minux.ma, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/69360043
runtime: disable stack copying
TBR=dvyukov

TBR=dvyukov
CC=golang-codereviews
https://codereview.appspot.com/69080045
runtime: disable TestSetPanicOnFault for dragonfly/386

This test currently deadlocks on dragonfly/386.

Update issue 7421

LGTM=minux.ma
R=golang-codereviews, minux.ma
CC=golang-codereviews
https://codereview.appspot.com/69380043
runtime: fix and improve comments

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant, khr, rsc
https://codereview.appspot.com/67460043
spec: slightly rephrased wording on parsing ambiguity for composite literals

Fixes issue 4482.

LGTM=r
R=r, iant, rsc, ken
CC=golang-codereviews
https://codereview.appspot.com/69020045
cmd/gofmt: minor internal cleanups

Reflect changes of reflect API.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://codereview.appspot.com/69240044
A+C: Graham King (individual CLA)

Generated by addca.

R=gobot
CC=golang-codereviews
https://codereview.appspot.com/68930047
syscall: add mlock, munlock, mlockall, munlockall and mprotect to OSX

Fixes Issue 7415

LGTM=bradfitz
R=bradfitz, iant
CC=golang-codereviews
https://codereview.appspot.com/68980043

Committer: Brad Fitzpatrick <bradfitz@golang.org>
bufio: in Reader.WriteTo, try to use target's ReaderFrom

This is the simple half of https://codereview.appspot.com/53560043/ with
a new benchmark. pongad is in the C+A files already.

benchmark                         old ns/op     new ns/op     delta
BenchmarkReaderWriteToOptimal     2054          825           -59.83%

Update Issue 6373

LGTM=iant, gri
R=golang-codereviews, iant, gri
CC=golang-codereviews
https://codereview.appspot.com/69220046
go/printer: measure lines/construct in generated output rather than incoming source

No change to $GOROOT/src, misc formatting.

Nice side-effect: almost 3% faster runs because it's much faster to compute
line number differences in the generated output than the incoming source.

Benchmark run, best of 5 runs, before and after:
BenchmarkPrint	     200	  12347587 ns/op
BenchmarkPrint	     200	  11999061 ns/op

Fixes issue 4504.

LGTM=adonovan
R=golang-codereviews, adonovan
CC=golang-codereviews
https://codereview.appspot.com/69260045
net/http: make Transport.CancelRequest work for requests blocked in a dial

Fixes Issue 6951

LGTM=josharian
R=golang-codereviews, josharian
CC=golang-codereviews
https://codereview.appspot.com/69280043
syscall: add some paranoia in Linux's Accept4

Fixes Issue 7428

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/69530044
runtime: move stack shrinking until after sweepgen is incremented.

Before GC, we flush all the per-P allocation caches.  Doing
stack shrinking mid-GC causes these caches to fill up.  At the
end of gc, the sweepgen is incremented which causes all of the
data in these caches to be in a bad state (cached but not yet
swept).

Move the stack shrinking until after sweepgen is incremented,
so any caching that happens as part of shrinking is done with
already-swept data.

Reenable stack copying.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/69620043
image/jpeg: fix progressive decoding when the DC components are split
over multiple scans. Previously, the Go code assumed that DC was
synonymous with interleaved and AC with non-interleaved.

Fixes issue 6767.

The test files were generated with libjpeg's cjpeg program, version 9a,
with the following patch, since cjpeg is hard-coded to output
interleaved DC.

$ diff -u jpeg-9a*/jcparam.c
--- jpeg-9a-clean/jcparam.c	2013-07-01 21:13:28.000000000 +1000
+++ jpeg-9a/jcparam.c	2014-02-27 11:40:41.236889852 +1100
@@ -572,7 +572,7 @@
 {
   int ci;

-  if (ncomps <= MAX_COMPS_IN_SCAN) {
+  if (0) {
         /* Single interleaved DC scan */
         scanptr->comps_in_scan = ncomps;
         for (ci = 0; ci < ncomps; ci++)
@@ -610,7 +610,7 @@
           (cinfo->jpeg_color_space == JCS_YCbCr ||
                cinfo->jpeg_color_space == JCS_BG_YCC)) {
         /* Custom script for YCC color images. */
-    nscans = 10;
+    nscans = 14;
   } else {
         /* All-purpose script for other color spaces. */
         if (ncomps > MAX_COMPS_IN_SCAN)

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/69000046
go/misc/makerelease: pin go-tour repo to a specific revision

We're about to commit some wide-sweeping changes to the go-tour and I
would rather not include them in Go 1.2.1, which is due in the next
week or so.

Also fix the makerelease tool; it has been broken since it was
renamed from bindist.

LGTM=campoy
R=campoy
CC=golang-codereviews
https://codereview.appspot.com/68780043
all: final merge of NaCl tree

This CL replays the following one CL from the rsc-go13nacl repo.
This is the last replay CL: after this CL the main repo will have
everything the rsc-go13nacl repo did. Changes made to the main
repo after the rsc-go13nacl repo branched off probably mean that
NaCl doesn't actually work after this CL, but all the code is now moved
over and just needs to be redebugged.

---
cmd/6l, cmd/8l, cmd/ld: support for Native Client

See golang.org/s/go13nacl for design overview.

This CL is publicly visible but not CC'ed to golang-dev,
to avoid distracting from the preparation of the Go 1.2
release.

This CL and the others will be checked into my rsc-go13nacl
clone repo for now, and I will send CLs against the main
repo early in the Go 1.3 development.

R≡khr
https://codereview.appspot.com/15750044
---

LGTM=bradfitz, dave, iant
R=dave, bradfitz, iant
CC=golang-codereviews
https://codereview.appspot.com/69040044
net/http: add optional Server.ConnState callback

Update Issue 4674

This allows for all sorts of graceful shutdown policies,
without picking a policy (e.g. lameduck period) and without
adding lots of locking to the server core. That policy and
locking can be implemented outside of net/http now.

LGTM=adg
R=golang-codereviews, josharian, r, adg, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/69260044
debug/macho: Define CPU constants for other common architectures for OS X/iOS.

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

Committer: Ian Lance Taylor <iant@golang.org>
image/jpeg: return a FormatError when hitting an unexpected io.EOF
inside Huffman-encoded data.

Fixes issue 6450.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/69830043
cmd/dist: add missing Native Client bits

Some parts of CL 15400047 didn't survive the merge.

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