lib9, cmd/dist, cmd/ld: Plan 9: fix build

lib9: fix runcmd, removeall, and tempdir functions

cmd/dist: Include run_plan9.c and tempdir_plan9.c
        from lib9 for build, and in general consider
        file names containing "plan9" for building.

cmd/ld: provide function args for the new functions
        from lib9.

R=rsc, rminnich, ality, bradfitz
CC=golang-dev
https://codereview.appspot.com/7666043

Committer: Russ Cox <rsc@golang.org>
A+C: Chris Howey (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7544044
go/types: update operand types early

For expressions where the result type is independent
of the argument types (comparisons, conversions, rhs
of shifts), set the final expression types for those
subtrees early.

This fixes several bugs where incorrect lhs shift
operands where used (say in a comparison), but were
not reported.

Together with the changes listed below this CL fixes
many type-checker bugs.

Also:
- better documented updateExprType
- added larger comment to expr.go explaining
  the basic expression checking algorithm
- use latest definition for indices and make
  arguments; use the same code to check both
- use the same mechanism for cycle detection
  in constant expressions as for variables
  (new field Constant.visited)
- more tests for complex and make builtins
- many more and systematic tests for shifts;
  moved them into separate testfile
- in the testing code, don't compare the
  expected error pattern against itself
  (the actual message was always ignored...)
- fix affected error patterns in the test files
- various cleanups along the way

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7432051
cmd/godoc: only show package documentation for commands

Fixed package.txt and adjusted package.html to match
structure (swapped if branches).

Fixes issue 4861.

R=golang-dev, adg, rsc
CC=golang-dev
https://codereview.appspot.com/7714043
cmd/dist: make cc rule match what cmd/go uses

We added -I$GOROOT/pkg/$GOOS_$GOARCH in cmd/go
(I think for use by cgo and swig, primarily) but didn't
update cmd/dist. I was testing some other code and
found that my changes built with cmd/go but failed
during the initial bootstrap. Make them match again.

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/7707044
cmd/go: fix description of -o flag to build
Fixes issue 5003.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7476047
all: remove now-unnecessary unreachable panics

Take advantage of the new terminating statement rule.

R=golang-dev, r, gri
CC=golang-dev
https://codereview.appspot.com/7712044
cmd/gc: reject complex calls with mismatched argument types.

The specification says "the two arguments must be of the same
floating-point type."

R=rsc, gri
CC=golang-dev
https://codereview.appspot.com/7671045
cmd/addr2line: exit 0 for --help

This is what pprof expects, or else it won't use the program.
And if it doesn't use the program, it gets very bad results.

Fixes issue 4818.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7728043
cmd/pprof: never use c++filt

The copy of c++filt shipped on OS X is six years old,
and in our case it does far more mangling than it
does demangling. People on non-OS X systems will
have a working nm --demangle, so this won't affect them.

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.8.2
BuildVersion:	12C2034
$ c++filt --version
GNU c++filt 070207 20070207
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
$

$ go tool nm -n revcomp | grep quoteWith
   4f560 T strconv.quoteWith
$ go tool nm -n revcomp | grep quoteWith  | c++filt
   f560 T strconv.quoteWith
$

$ nm -n revcomp | grep quoteWith
000000000004f560 t _strconv.quoteWith
$ nm -n revcomp | grep quoteWith | c++filt
000000000004f560 unsigned short _strconv.quoteWith
$

Fixes issue 4818.

R=golang-dev, r, bradfitz
CC=golang-dev
https://codereview.appspot.com/7729043
go/parser: better error message if = is seen instead of ==

Fixes issue 4519.

R=rsc
CC=golang-dev
https://codereview.appspot.com/7733044
regexp: identify that submatch is also known as capturing group
Mention the syntax is defined by the regexp/syntax package.
Fixes issue 3953.

R=golang-dev, dsymonds
CC=golang-dev
https://codereview.appspot.com/7702044
encoding/base32: don't panic when decoding "AAAA==".

Edit encoding/base64's internals and tests to match encoding/base32.

Properly handling line breaks in padding is left for another CL.

R=dsymonds
CC=golang-dev
https://codereview.appspot.com/7693044
go/test/bench/go1: add printf and time format tests
Also rename the go parser test to GoParse so it doesn't grab the globally useful Parse name.

R=golang-dev, dave
CC=golang-dev
https://codereview.appspot.com/7732044
net/http: add tests for ParseHTTPVersion

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7739043
encoding/base32, encoding/base64: a small stack-space optimization.

R=dsymonds, dave
CC=golang-dev
https://codereview.appspot.com/7568045
net/http: bit more docs on Client vs Transport

This isn't as bad as it used to be, but add a bit
more detail to close the issue.

Fixes issue 3359

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7606044
encoding/xml: allow embedded non-structs

The old code just assumed that the only thing
you can embed is a struct. Not true.

Fixes issue 3803.

R=golang-dev, adg
CC=golang-dev
https://codereview.appspot.com/7743043
encoding/xml: fix spurious "no semicolon" in error

Noticed while doing other XML investigations.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7550045
net: never use backlog > 65535

The system call takes an int, but the kernel stores it in a uint16.
At least one Linux system sets /proc/sys/net/core/somaxconn
to 262144, which ends up being 0 in the uint16. Avoid being tricked.

FreeBSD sources also store the backlog in a uint16.
Assume the problem is systemic and fix it everywhere.

Fixes issue 5030.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7480046