Makes it possible to return the spent runtime.PollDesc to
runtime.pollcache descriptor pool when netFD.connect or
syscall.Listen fails.
Fixes#5219.
R=dvyukov, dave, bradfitz, adg
CC=golang-dev
https://golang.org/cl/8318044
cgo stores cgo LDFLAGS in _cgo_flags and _cgo_defun.c.
The _cgo_defun.c records the flags via
"#pragma cgo_ldflag <flag>", which external linking
relies upon for passing libraries (and search paths)
to the host linker.
The go command will allow LDFLAGS for cgo to be passed
through the environment (CGO_LDFLAGS); cgo ignores
this environment variable, and so its value doesn't
make it into the above mentioned files. This CL changes
cgo to record CGO_LDFLAGS also.
Fixes#5205.
R=iant, minux.ma
CC=golang-dev
https://golang.org/cl/8465043
The race detector uses a global lock to analyze atomic
operations. A panic in the middle of the code leaves the
lock acquired.
Similarly, the sync package may leave the race detectro
inconsistent when methods are called on nil pointers.
R=golang-dev, r, minux.ma, dvyukov, rsc, adg
CC=golang-dev
https://golang.org/cl/7981043
It's not trivial to make a comprehensive check
due to inferior pointers, reflect, gob, etc.
But this is essentially what I've used to debug
the GC issues.
Update #5193.
R=golang-dev, iant, 0xe2.0x9a.0x9b, r
CC=golang-dev
https://golang.org/cl/8455043
Apologies for not reviewing the previous CL; I was on the road.
The text was misleading; execution is no more separate than with
any other test. Rewritten. Dropped the odd adverb.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8439045
The spec doesn't explicitly say that trailing data is okay, but a lot
of people do this and most unzippers will handle it just fine. In any
case, this makes the package more useful, and led me to make the
directory parsing code marginally more robust.
Fixes#5228.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8504044
Use atomic operations on flags field to make sure we aren't
losing a flag update during parallel map operations.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/8377046
It changes an exported API, and breaks the build.
««« original CL description
reflect: use unsafe.Pointer in StringHeader and SliceHeader
Relates to issue 5193.
R=r
CC=golang-dev
https://golang.org/cl/8363045
»»»
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8357051
Before, an empty TMPDIR would lead to:
cannot create <nil>/go.o: No such file or directory
R=golang-dev, iant, dave, bradfitz
CC=golang-dev
https://golang.org/cl/8355045
The invariant is that there must be at least one running P or a thread polling network.
It was broken.
Fixes#5216.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/8459043
This makes it an unsafe.Pointer in Go so the garbage collector
will treat it as a pointer to untyped data, not a pointer to
bytes.
R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/8286045
If for whatever reason seh points into Go heap region,
the dangling pointer will cause memory corruption during GC.
Update #5193.
R=golang-dev, alex.brainman, iant
CC=golang-dev
https://golang.org/cl/8402045
The offset of an embedded field s.X must be relative to s
and not to the implicit s.Field of which X is a direct field.
Moreover, no indirections may happen on the path.
Fixes#4909.
R=nigeltao, ality, daniel.morsing, iant, gri, r
CC=golang-dev
https://golang.org/cl/8287043
We've decided to leave logging to third-parties (there are too
many formats), which others have done.
And we can't change the behavior of the various response
fields at this point anyway. Plus I argue they're correct and
match their documention.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8391043
The compilers used to generate only one 'm' symbol
to record the stack frame size for each function.
In cmd/nm, the 'm' and 'f' symbols are handled in
the same switch case with a special exception for
the symbol described above called ".frame".
Now that the compilers emit additional 'm' symbols
for precise garbage collection of the stack, the
current logic is incorrect. cmd/nm will attempt to
interpret these new 'm' symbols as 'f' symbols and
add them to the file name index table.
This fails with an out-of-memory condition when
zenter encounters an 'm' symbol with a very large
value (usually the .args symbol indicating a
variadic NOSPLIT function).
R=iant
CC=dave, gobot, golang-dev, rsc
https://golang.org/cl/7962045
Fixes#5175.
Race detector runtime expects values passed to MapShadow() to be page-aligned,
because they are used in mmap() call. If they are not aligned mmap() trims
either beginning or end of the mapping.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8325043
Also:
- put GORACE into the go env command
- do minor housekeeping on the race detector article
Fixes#4995.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8319044
- comment fixes
- s/z/x/ in (*rat).Float64 to match convention for functions
returning a non-*Rat
- minor test output tweaking
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8327044
The smtp package originally allowed PLAIN whenever, but then
the TLS check was added for paranoia, but it's too paranoid:
it prevents using PLAIN auth even from localhost to localhost
when the server advertises PLAIN support.
This CL also permits the client to send PLAIN if the server
advertises it.
Fixes#5184
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8279043
Save an allocation per GET request and don't call io.LimitedReader(r, 0)
just to read 0 bytes. There's already an eofReader global variable
for when we just want a non-nil io.Reader to immediately EOF.
(Sorry, I know Rob told me to stop, but I was bored on the plane and
wrote this before I received the recent "please, really stop" email.)
benchmark old ns/op new ns/op delta
BenchmarkServerHandlerTypeLen 13888 13279 -4.39%
BenchmarkServerHandlerNoLen 12912 12229 -5.29%
BenchmarkServerHandlerNoType 13348 12632 -5.36%
BenchmarkServerHandlerNoHeader 10911 10261 -5.96%
benchmark old allocs new allocs delta
BenchmarkServerHandlerTypeLen 20 19 -5.00%
BenchmarkServerHandlerNoLen 18 17 -5.56%
BenchmarkServerHandlerNoType 18 17 -5.56%
BenchmarkServerHandlerNoHeader 13 12 -7.69%
benchmark old bytes new bytes delta
BenchmarkServerHandlerTypeLen 1913 1878 -1.83%
BenchmarkServerHandlerNoLen 1878 1843 -1.86%
BenchmarkServerHandlerNoType 1878 1844 -1.81%
BenchmarkServerHandlerNoHeader 1085 1051 -3.13%
Fixes#5188
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/8297044
My old code was trying to be too smart.
Also: Slightly better error message format
for gofmt -r pattern errors.
Fixes#4406.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8267045
This changes the map lookup behavior for string maps with 2-8 keys.
There was already previously a fastpath for 0 items and 1 item.
Now, if a string-keyed map has <= 8 items, first check all the
keys for length first. If only one has the right length, then
just check it for equality and avoid hashing altogether. Once
the map has more than 8 items, always hash like normal.
I don't know why some of the other non-string map benchmarks
got faster. This was with benchtime=2s, multiple times. I haven't
anything else getting slower, though.
benchmark old ns/op new ns/op delta
BenchmarkHashStringSpeed 37 34 -8.20%
BenchmarkHashInt32Speed 32 29 -10.67%
BenchmarkHashInt64Speed 31 27 -12.82%
BenchmarkHashStringArraySpeed 105 99 -5.43%
BenchmarkMegMap 274206 255153 -6.95%
BenchmarkMegOneMap 27 23 -14.80%
BenchmarkMegEqMap 148332 116089 -21.74%
BenchmarkMegEmptyMap 4 3 -12.72%
BenchmarkSmallStrMap 22 22 -0.89%
BenchmarkMapStringKeysEight_32 42 23 -43.71%
BenchmarkMapStringKeysEight_64 55 23 -56.96%
BenchmarkMapStringKeysEight_1M 279688 24 -99.99%
BenchmarkIntMap 16 15 -10.18%
BenchmarkRepeatedLookupStrMapKey32 40 37 -8.15%
BenchmarkRepeatedLookupStrMapKey1M 287918 272980 -5.19%
BenchmarkNewEmptyMap 156 130 -16.67%
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/7641057
It was unnecessarily cloning and then mutating a map that had
a very short lifetime (just that function).
No new tests, because they were added in revision 833bf2ef1527
(TestHeaderToWire). The benchmarks below are from the earlier
commit, revision 52e3407d.
I noticed this inefficiency when reviewing a change Peter Buhr
is looking into, which will also use these benchmarks.
benchmark old ns/op new ns/op delta
BenchmarkServerHandlerTypeLen 12547 12325 -1.77%
BenchmarkServerHandlerNoLen 12466 11167 -10.42%
BenchmarkServerHandlerNoType 12699 11800 -7.08%
BenchmarkServerHandlerNoHeader 11901 9210 -22.61%
benchmark old allocs new allocs delta
BenchmarkServerHandlerTypeLen 21 20 -4.76%
BenchmarkServerHandlerNoLen 20 18 -10.00%
BenchmarkServerHandlerNoType 20 18 -10.00%
BenchmarkServerHandlerNoHeader 17 13 -23.53%
benchmark old bytes new bytes delta
BenchmarkServerHandlerTypeLen 1930 1913 -0.88%
BenchmarkServerHandlerNoLen 1912 1879 -1.73%
BenchmarkServerHandlerNoType 1912 1878 -1.78%
BenchmarkServerHandlerNoHeader 1491 1086 -27.16%
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8268046
A package file may begin as either "package foo" or
"package foo safe". The latter is relevant when using -u.
https://golang.org/cl/6903059 resulted in the distinction
being dropped when a package was read for the second or later time.
This CL records whether that "safe" tag was present,
and includes it in the dummy statement generated for the lexer.
R=golang-dev, r, minux.ma, daniel.morsing, iant
CC=golang-dev
https://golang.org/cl/8255044
The expected precision setting for the x87 on Win32 is 53-bit
but MinGW resets the floating point unit to 64-bit. Win32
object code generally expects values to be rounded to double,
not double extended, precision.
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/8175044
Demonstrates one way to sort a slice of structs according
to different sort criteria, done in sequence.
One possible answer to a question that comes up often.
R=golang-dev, gri, bradfitz, adg, adg, rogpeppe
CC=golang-dev
https://golang.org/cl/8182044
Doing grow work on reads is not multithreaded safe.
Changed code to do grow work only on inserts & deletes.
This is a short-term fix, eventually we'll want to do
grow work in parallel to recover the space of the old
table.
Fixes#5120.
R=bradfitz, khr
CC=golang-dev
https://golang.org/cl/8242043
The text is printed only if the test fails or -test.v is set.
Document this behavior in the testing package and 'go help test'.
Also put a 'go install' into mkdoc.sh so I don't get tricked by the
process of updating the documentation ever again.
Fixes#5174.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8118047
Permits specifying the linker to use, and trailing flags to
pass to that linker, when linking in external mode. External
mode linking is used when building a package that uses cgo, as
described in the cgo docs.
Also document -linkmode and -tmpdir.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8225043
Reusing it when multiple comparisons occurred in the same
function call led to bad overwriting.
Fixes#5162.
R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/8174047
If a package was listed as a dependency from multiple places, it
could have been cleaned repeatedly.
R=golang-dev, dave, rsc, seed, bradfitz
CC=golang-dev, minux.ma
https://golang.org/cl/7482043
Closes the API documentation gap between platforms.
Also makes the code textual representation same between platforms.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8148043
Closes the API documentation gap between platforms.
Also makes the code textual representation same between platforms.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8147043
Since we can't properly handle anything except 100, treat all
1xx informational responses as sketchy and don't reuse the
connection for future requests.
The only other 1xx response code currently in use in the wild
is WebSockets' use of "101 Switching Protocols", but our
code.google.com/p/go.net/websockets doesn't use Client or
Transport: it uses ReadResponse directly, so is unaffected by
this CL. (and its tests still pass)
So this CL is entirely just future-proofing paranoia.
Also: the Internet is weird.
Update #2184
Update #3665
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8208043
Whoops. I'm surprised it even worked before. (Need two pipes,
not one.)
Also, remove the whole pipe registration business, since it
wasn't even required in the previous version. (I'd later fixed
it at the end of send100Response, but forgot to delete it)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8191044
src/cmd/gc/closure.c:133 param declared and not used: nowrap
src/cmd/gc/const.c:1139 set and not used: t1
src/cmd/ld/data.c:652 format mismatch #llx INT, arg 7
src/cmd/ld/data.c:652 format mismatch #llx INT, arg 8
src/cmd/ld/data.c:1230 set and not used: datsize
R=dave, golang-dev, lucio.dere, remyoudompheng, bradfitz
CC=golang-dev
https://golang.org/cl/8182043
src/cmd/6g/peep.c:471 set and not used: r
src/cmd/6g/peep.c:560 overspecified class: regconsttyp GLOBL STATIC
src/cmd/6g/peep.c:761 more arguments than format IND STRUCT Prog
src/cmd/6g/reg.c:185 set and not used: r1
src/cmd/6g/reg.c:786 format mismatch d VLONG, arg 3
src/cmd/6g/reg.c:1064 format mismatch d VLONG, arg 5
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8197044
This CL ensures we use the correct socket options for
passive and active open sockets.
For the passive open sockets created by Listen functions,
additional SO_REUSEADDR, SO_REUSEPORT options are required
for the quick service restart and/or multicasting.
For the active open sockets created by Dial functions, no
additional options are required.
R=golang-dev, dave, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/7795050
"There are only two hard problems in computer science:
cache invalidation, naming things, and off-by-one errors."
The HTTP server code already strips Expect: 100-continue on
requests, so httputil.ReverseProxy should be unaffected, but
some servers send unsolicited HTTP/1.1 100 Continue responses,
so we need to skip over them if they're seen to avoid getting
off-by-one on Transport requests/responses.
This does change the behavior of people who were using Client
or Transport directly and explicitly setting "Expect: 100-continue"
themselves, but it didn't work before anyway. Now instead of the
user code seeing a 100 response and then things blowing up, now
it basically works, except the Transport will still blast away
the full request body immediately. That's the part that needs
to be finished to close this issue.
This is the safe quick fix.
Update #3665
R=golang-dev, dsymonds, dave, jgrahamc
CC=golang-dev
https://golang.org/cl/8166045
Change build system to set GO_EXTLINK_ENABLED=0 by default for
OS X 10.6, since the system linker has a bug and can not
handle the object files generated by 6l.
Fixes#5130.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8183043
This benchmark verifies that CL #8173043 reduces time spent
sliding the Buffer's contents.
Results without and with CL #8173043 applied:
benchmark old ns/op new ns/op delta
BenchmarkBufferFullSmallReads 755336 175054 -76.82%
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8174043
Also added a new benchmark from the same test:
benchmark old ns/op new ns/op delta
BenchmarkBufferNotEmptyWriteRead 2643698 709189 -73.17%
Fixes#5154
R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/8164043
Adds the missing wildcard port assignment description to ListenUDP.
Also updates the wildcard port description on ListenTCP.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/8063043
Also removes redundant tests that run Go 1.0 non-IPv6 support
Windows code on IPv6 enabled Windows kernels.
R=alex.brainman, golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/7812052
With the faster strings package, the difference between
the specialized code and strings.Split is in the noise:
benchmark old ns/op new ns/op delta
BenchmarkPrint 16724291 16686729 -0.22%
(Measured on a Mac Pro, 2.8GHz Quad-core Intel Xeon,
4GB 800 MHz DDR2, Mac OS X 10.8.3)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8100044
Saves both the textproto.Reader allocation, and its internal
scratch buffer growing.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAliveLite 10324 10149 -1.70%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAliveLite 19 17 -10.53%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAliveLite 1559 1492 -4.30%
R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/8094046
Removes another per-request allocation. Also makes the code more
readable, IMO. And more testable.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAliveLite 10539 10324 -2.04%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAliveLite 20 19 -5.00%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAliveLite 1609 1559 -3.11%
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/8118044
We already depend on strings in this file, so use it.
Plus strings.Index will be faster than a manual loop
once issue 3751 is finished.
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/8116043
A chunkWriter and a response are 1:1. Make them contiguous in
memory and save an allocation.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAliveLite 10715 10539 -1.64%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAliveLite 21 20 -4.76%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAliveLite 1626 1609 -1.05%
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/8114043
- removed gratuitous empty lines that creeped into command line output
- changed comment color to a dark green so that links don't visually melt into them
- removed some TODOs
- updated doc.go
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8108044
Add more tests around the various orders handlers can access
and flush response headers.
Also clarify the documentation on fields of response and
chunkWriter.
While there, remove an allocation (a header clone) for simple
handlers.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAliveLite 15245 14966 -1.83%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAliveLite 24 23 -4.17%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAliveLite 1717 1668 -2.85%
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/8101043
Analogous to the one for .go files, it's for .s only and is protected
by the verbose flag.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8030046
This is a totally mechanical change.
Errors are reported for the beginning of the statement, not the end,
so the errchk markers need to be on the opening brace, not the closing
one. It seems this test was never run.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7746050
They should be build-tagged for vet_test not ignore,
and not have a Go package clause.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8016047
Motivated by garbage profiling in HTTP benchmarks. This
changes means new empty maps are just one small allocation
(the HMap) instead the HMap + the relatively larger h->buckets
allocation. This helps maps which remain empty throughout
their life.
benchmark old ns/op new ns/op delta
BenchmarkNewEmptyMap 196 107 -45.41%
benchmark old allocs new allocs delta
BenchmarkNewEmptyMap 2 1 -50.00%
benchmark old bytes new bytes delta
BenchmarkNewEmptyMap 195 50 -74.36%
R=khr, golang-dev, r
CC=golang-dev
https://golang.org/cl/7722046
There was another bufio.Writer not being reused, found with
GOGC=off and -test.memprofile.
benchmark old ns/op new ns/op delta
BenchmarkServerFakeConnWithKeepAlive 18270 16046 -12.17%
benchmark old allocs new allocs delta
BenchmarkServerFakeConnWithKeepAlive 38 36 -5.26%
benchmark old bytes new bytes delta
BenchmarkServerFakeConnWithKeepAlive 4598 2488 -45.89%
Update #5100
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/8038047
This CL was written by rsc. I just tweaked 8l.
This CL adds TLS relocation to the ELF .o file we write during external linking,
so that the host linker (gcc) can decide the final location of m and g.
Similar relocations are not necessary on OS X because we use an alternate
program start-time mechanism to acquire thread-local storage.
Similar relocations are not necessary on ARM or Plan 9 or Windows
because external linking mode is not yet supported on those systems.
On almost all ELF systems, the references we use are like %fs:-0x4 or %gs:-0x4,
which we write in 6a/8a as -0x4(FS) or -0x4(GS). On Linux/ELF, however,
Xen's lack of support for this mode forced us long ago to use a two-instruction
sequence: first we load %gs:0x0 into a register r, and then we use -0x4(r).
(The ELF program loader arranges that %gs:0x0 contains a regular pointer to
that same memory location.) In order to relocate those -0x4(r) references,
the linker must know where they are. This CL adds the equivalent notation
-0x4(r)(GS*1) for this purpose: it assembles to the same encoding as -0x4(r)
but the (GS*1) indicates to the linker that this is one of those thread-local
references that needs relocation.
Thanks to Elias Naur for reminding me about this missing piece and
also for writing the test.
R=r
CC=golang-dev
https://golang.org/cl/7891047
Since fp->symsz includes the size of the header
in the new symbol table format, we were reading
past the end and decoding a few garbage symbols
from data in the pc/line table.
R=rsc, r
CC=golang-dev
https://golang.org/cl/7993043
- convert all formatters that require a *token.FileSet to
consistenly use a *PageInfo as first argument instead
- adjust templates correspondingly
- fix outstanding bug from previous CL 8005044
Going forward, with this change the affected functions have
access to the full page "context" (PageInfo), not just the
respective file set. This will permit better context-dependent
formatting in the future.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7860049
A HMUL node appears in some constant divisions, but
to observe a false negative in race detector the divisor must be
suitably chosen to make sure the only memory access is
done for HMUL.
R=dvyukov
CC=golang-dev
https://golang.org/cl/7935045
For Go 1.1, stop checking the rlimit, because it broke now
that mheap is allocated using SysAlloc. See issue 5049.
R=r
CC=golang-dev
https://golang.org/cl/7741050
The arm gentraceback mishandled frame linkage values pointing
to the assembly return function. This function is special as
its frame size is zero and it contains only one instruction.
These conditions would preserve the frame pointer and result
in an off by one error when unwinding the caller.
Fixes#5124
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8023043
The changes are almost completely self-contained
in the new file linkify.go. The other changes are
minimal and should not disturb the currently
working godoc, in anticipation of Go 1.1.
To disable the feature in case of problems, set
-links=false.
Fixes#2063.
R=adg, r
CC=golang-dev
https://golang.org/cl/7883044
Prevents storm of error messages if something goes wrong.
In the case of issue 5073 the epoll fd was closed by the test.
Update #5073.
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/7966043
This CL avoids test data sharing in repetitive test runs;
e.g., go test net -cpu=1,1,1
R=golang-dev, fullung, bradfitz
CC=golang-dev
https://golang.org/cl/8011043
Handle interface comparison correctly,
add a few more tests, mark more nodes as impossible.
R=dvyukov, golang-dev
CC=golang-dev
https://golang.org/cl/7942045