- 09 Mar, 2016 17 commits
-
-
Richard Miller authored
On Plan 9, there's no "kill all threads" system call, so exit is done by sending a "go: exit" note to each OS process. If concurrent GC occurs during this loop, deadlock sometimes results. Prevent this by incrementing m.locks before sending notes. Change-Id: I31aa15134ff6e42d9a82f9f8a308620b3ad1b1b1 Reviewed-on: https://go-review.googlesource.com/20477Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Miller authored
This prevents a fatal "missing stackmap" error if garbage collection occurs during exit. Also annotate argument sizes for "go vet". Change-Id: I2473e0ef6aef8f26d0bbeaee9bd8f8a52eaaf941 Reviewed-on: https://go-review.googlesource.com/20476Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alexandru Moșoi authored
* Move lowering into a separate pass. * SliceLen/SliceCap is now available to various intermediate passes which use useful for bounds checking. * Add a second opt pass to handle the new opportunities Decreases the code size of binaries in pkg/tool/linux_amd64 by ~45K. Updates #14564 #14606 Change-Id: I5b2bd6202181c50623a3585fbf15c0d6db6d4685 Reviewed-on: https://go-review.googlesource.com/20172 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Matthew Dempsky authored
It's only used once, so just make the caller responsible for iterating both the receiver and input params. Change-Id: Icb34f3f0cf96e80fbe27f3f49d12eddc26599b92 Reviewed-on: https://go-review.googlesource.com/20454Reviewed-by: Dave Cheney <dave@cheney.net>
-
Ingo Oeser authored
so the code is more readable. Also use n[i] = val instead of n = append(n, val), because this avoids a function call to append. NOTE: compiles, but I had trouble running toolstash -cmp and need sleep now. @Ian this might save you some grunt work :-) Change-Id: I2a4c70396c58905f7d5aabf83f3020f11dea0e89 Reviewed-on: https://go-review.googlesource.com/20430Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nigel Tao authored
This helps follow-up CLs ensure that the encoding's core computation does not allocate. It is a separate CL because it has a non-trivial effect on the benchmark numbers, even if it's purely an accounting change and not a change to the underlying performance: BenchmarkEncodeDigitsSpeed1e4-4 5.65 19.31 3.42x BenchmarkEncodeDigitsSpeed1e5-4 17.23 26.79 1.55x BenchmarkEncodeDigitsSpeed1e6-4 26.85 27.51 1.02x BenchmarkEncodeDigitsDefault1e4-4 4.41 13.21 3.00x BenchmarkEncodeDigitsDefault1e5-4 5.64 6.28 1.11x BenchmarkEncodeDigitsDefault1e6-4 5.54 5.65 1.02x BenchmarkEncodeDigitsCompress1e4-4 4.31 13.15 3.05x BenchmarkEncodeDigitsCompress1e5-4 5.52 5.91 1.07x BenchmarkEncodeDigitsCompress1e6-4 5.38 5.63 1.05x BenchmarkEncodeTwainSpeed1e4-4 5.45 19.06 3.50x BenchmarkEncodeTwainSpeed1e5-4 17.30 29.25 1.69x BenchmarkEncodeTwainSpeed1e6-4 28.06 30.86 1.10x BenchmarkEncodeTwainDefault1e4-4 4.06 12.36 3.04x BenchmarkEncodeTwainDefault1e5-4 6.15 7.62 1.24x BenchmarkEncodeTwainDefault1e6-4 6.84 6.99 1.02x BenchmarkEncodeTwainCompress1e4-4 4.06 12.27 3.02x BenchmarkEncodeTwainCompress1e5-4 5.29 5.92 1.12x BenchmarkEncodeTwainCompress1e6-4 5.24 5.29 1.01x Change-Id: I7d32866b7e2d478b0154332c1edeefe339af9a28 Reviewed-on: https://go-review.googlesource.com/20467Reviewed-by: David Symonds <dsymonds@golang.org>
-
Brady Catherman authored
Adds a type of output to Examples that allows tests to have unordered output. This is intended to help clarify when the output of a command will produce a fixed return, but that return might not be in an constant order. Examples where this is useful would be documenting the rand.Perm() call, or perhaps the (os.File).Readdir(), both of which can not guarantee order, but can guarantee the elements of the output. Fixes #10149 Change-Id: Iaf0cf1580b686afebd79718ed67ea744f5ed9fc5 Reviewed-on: https://go-review.googlesource.com/19280Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Shenghou Ma authored
Change-Id: Ia22f681b0e90876ec87363c50c6a284db050f649 Reviewed-on: https://go-review.googlesource.com/19793Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Change-Id: I6ec2143a30c1f2c15f8ec74422c954ed6b9b1a0f Reviewed-on: https://go-review.googlesource.com/20452Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
Suggested by Dave Cheney in golang.org/cl/20405. Change-Id: I581c11ae80034cb6ebef3de976e8ae9484472322 Reviewed-on: https://go-review.googlesource.com/20453Reviewed-by: Dave Cheney <dave@cheney.net> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
This CL was automatically generated using a special-purpose AST rewriting tool, followed by manual editing to put some comments back in the right places and fix some bad line breaks. The result is not perfect but it's a big step toward getting back to sanity, and because it was automatically generated there is a decent chance that it is correct. Passes toolstash -cmp. Update #14473. Change-Id: I01c09078a6d78e2b008bc304d744b79469a38d3d Reviewed-on: https://go-review.googlesource.com/20440Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
More idiomatic naming (in particular, matches the naming used for go/types.Signature). Also, convert more code to use these methods and/or IterFields. (Still more to go; only made a quick pass for low hanging fruit.) Passes toolstash -cmp. Change-Id: I61831bfb1ec2cd50d4c7efc6062bca4e0dcf267b Reviewed-on: https://go-review.googlesource.com/20451Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Alternative to golang.org/cl/19852. This memory layout doesn't have an easy type representation, but it is noticeably smaller than the current funcType, and saves significant extra space. Some notes on the layout are in reflect/type.go: // A *rtype for each in and out parameter is stored in an array that // directly follows the funcType (and possibly its uncommonType). So // a function type with one method, one input, and one output is: // // struct { // funcType // uncommonType // [2]*rtype // [0] is in, [1] is out // uncommonTypeSliceContents // } There are three arbitrary limits introduced by this CL: 1. No more than 65535 function input parameters. 2. No more than 32767 function output parameters. 3. reflect.FuncOf is limited to 128 parameters. I don't think these are limits in practice, but are worth noting. Reduces godoc binary size by 2.4%, 330KB. For #6853. Change-Id: I225c0a0516ebdbe92d41dfdf43f716da42dfe347 Reviewed-on: https://go-review.googlesource.com/19916Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Andrew Gerrand authored
Fixes #14662 Change-Id: I8f7d5e8d2dd8dc763e940e061b424427359246e7 Reviewed-on: https://go-review.googlesource.com/20462Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Andrew Gerrand authored
Change-Id: Iaa23d27043e6a050075b40072e466623418ba977 Reviewed-on: https://go-review.googlesource.com/19878Reviewed-by: Rob Pike <r@golang.org>
-
Matthew Dempsky authored
Passes toolstash -cmp. Change-Id: I325b02dcc8412ded0dc304d43377c0bdf59c66a8 Reviewed-on: https://go-review.googlesource.com/20405Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Andrew Gerrand authored
Fixes #14687 Change-Id: I51fd8842d35c82db71cc5b28c4c0550871461eb6 Reviewed-on: https://go-review.googlesource.com/20421Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 08 Mar, 2016 23 commits
-
-
David Crawshaw authored
Instead of a pointer on every rtype, use a bit flag to indicate that the contents of uncommonType directly follows the rtype value when it is needed. This requires a bit of juggling in the compiler's rtype encoder. The backing arrays for fields in the rtype are presently encoded directly after the slice header. This packing requires separating the encoding of the uncommonType slice headers from their backing arrays. Reduces binary size of godoc by ~180KB (1.5%). No measurable change in all.bash time. For #6853. Change-Id: I60205948ceb5c0abba76fdf619652da9c465a597 Reviewed-on: https://go-review.googlesource.com/19790Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Chase authored
Converting an and-K into a pair of shifts for K that will fit in a one-byte argument is probably not an optimization, and it also interferes with other patterns that we want to see fire, like (<< (AND K)) [for small K] and bounds check elimination for masked indices. Turns out that on Intel, even 32-bit signed immediates beat the shift pair; the size reduction of tool binaries is 0.09% vs 0.07% for only the 8-bit immediates. RLH found this one working on the new/next GC. Change-Id: I2414a8de1dd58d680d18587577fbadb7ff4f67d9 Reviewed-on: https://go-review.googlesource.com/20410Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: David Chase <drchase@google.com>
-
Matthew Dempsky authored
Some cleaned up documentation, but no code changes. Change-Id: I145398bb6d118c626ab3873ef75dbb64ebc286e9 Reviewed-on: https://go-review.googlesource.com/20404 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Don't do a substring search to test for a timeout error. Fixes #14722 (maybe) Change-Id: I4e18c749d6fd92c084a1b0b83a805119e1ae5ff2 Reviewed-on: https://go-review.googlesource.com/20403 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alexandru Moșoi authored
* Simplify the nilcheck generated by for _, e := range a {} * No effect on the generated code because these nil checks don't end up in the generated code. * Useful for other analysis, e.g. it'll remove one dependecy on the induction variable. Change-Id: I6ee66ddfdc010ae22aea8dca48163303d93de7a9 Reviewed-on: https://go-review.googlesource.com/20307 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
Make more idiomatic with a defer cleanup, which allows declaring variables closer to their first use, rather than up front before the first goto statement. Also, split the legacy code generation code path into a separate genlegacy function, analogous to the new genssa. Passes toolstash -cmp. Change-Id: I86c22838704f6861b75716ae64ba103b0e73b12f Reviewed-on: https://go-review.googlesource.com/20353Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Same idea as golang.org/cl/20322. Passes toolstash/buildall. Change-Id: Ida5960e57ff6e1e8de75c2720f21aeae56a8e415 Reviewed-on: https://go-review.googlesource.com/20352 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Iec323998133ef20ff962f06a46d15dd342a82f5f Reviewed-on: https://go-review.googlesource.com/20390Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ross Light authored
getgrouplist is non-standard and has slightly different semantics on each platform. Darwin defines the function in terms of ints instead of gid_ts. Solaris only recently supported the call, so stubbing out for now. Fixes #14696 Fixes #14709 Change-Id: I5a44538d41594909efb6f3f9610c55d638c36757 Reviewed-on: https://go-review.googlesource.com/20348 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Accidentally added in https://golang.org/cl/20242. This is in preparation for transformation by an automated tool. Passes toolstash -cmp. Update #14473. Change-Id: I28c637d220df3ccaa8e368bfbea7282a6e66662e Reviewed-on: https://go-review.googlesource.com/20402 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Before, those C files might have been intended for the Plan 9 C compiler, but that option was removed in Go 1.5. We can simplify the maintenance of cgo packages now if we assume C files (and C++ and M and SWIG files) should only be considered when cgo is enabled. Also remove newly unnecessary build tags in runtime/cgo's C files. Fixes #14123 Change-Id: Ia5a7fe62b9469965aa7c3547fe43c6c9292b8205 Reviewed-on: https://go-review.googlesource.com/19613Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Bug accidentally inserted in https://golang.org/cl/20210. Doesn't seem to make a difference, but restore original code anyhow. Update #14473. Change-Id: I9cf87987ff158e27c7231027819317cdde8c132c Reviewed-on: https://go-review.googlesource.com/20401 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Caio Marcelo de Oliveira Filho authored
Trailers() returns the headers that were set by the handler after the headers were written "to the wire" (in this case HeaderMap) and that were also specified in a proper header called "Trailer". Neither HeaderMap or trailerMap (used for Trailers()) are manipulated by the handler code, instead a third stagingMap is given to the handler. This avoid a reference kept by handler to affect the recorded results. If a handler just modify the header but doesn't call any Write or Flush method from ResponseWriter (or Flusher) interface, HeaderMap will not be updated. In this case, calling Flush in the recorder is enough to get the HeaderMap filled. Fixes #14531. Fixes #8857. Change-Id: I42842341ec3e95c7b87d7e6f178c65cd03d63cc3 Reviewed-on: https://go-review.googlesource.com/20047Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Chase authored
Fixes #14646. Change-Id: I0bb82ed6d3533633cd8369ba37aa467948bbe155 Reviewed-on: https://go-review.googlesource.com/20381 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I754861147838d0f6c184d8deb8a028062a1d3214 Reviewed-on: https://go-review.googlesource.com/20400Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Deleting the string merging pass makes the linker 30-35% faster but makes jujud (using the github.com/davecheney/benchjuju snapshot) 2.5% larger. Two optimizations bring the space overhead down to 0.6%. First, change the default alignment for string data to 1 byte. (It was previously defaulting to larger amounts, usually pointer width.) Second, write out the type string for T (usually a bigger expression) as "*T"[1:], so that the type strings for T and *T share storage. Combined, these obtain the bulk of the benefit of string merging at essentially no cost. The remaining benefit from string merging is not worth the excessive cost, so delete it. As penance for making the jujud binary 0.6% larger, the next CL in this sequence trims the reflect functype information enough to make the jujud binary overall 0.75% smaller (that is, that CL has a net -1.35% effect). For #6853. Fixes #14648. Change-Id: I3fdd74c85410930c36bb66160ca4174ed540fc6e Reviewed-on: https://go-review.googlesource.com/20334Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
-
Russ Cox authored
cmd/link is clearly the way forward. The original rationale for cmd/newlink was that it would be a clean Go reimplementation. But when push came to shove, cmd/link got converted from C instead, and all the work on build modes and the like is in cmd/link now. Cleaning up cmd/link is likely a much better plan. This directory is something to delete from releases and the testdata is something that breaks every time the .6 format changes. Fix both problems by just deleting it outright. Change-Id: Ib00fecda258ba685f1752725971182af9d4459eb Reviewed-on: https://go-review.googlesource.com/20380 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I717ebd948dfc8faf8b9ef5aa02c67484af618d18 Reviewed-on: https://go-review.googlesource.com/20359Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
benchstat master2 arg3b name old time/op new time/op delta Template 441ms ± 4% 444ms ± 6% ~ (p=0.335 n=22+25) GoTypes 1.51s ± 2% 1.51s ± 2% ~ (p=0.129 n=25+21) Compiler 5.59s ± 1% 5.56s ± 2% -0.65% (p=0.001 n=24+21) name old alloc/op new alloc/op delta Template 85.6MB ± 0% 85.3MB ± 0% -0.40% (p=0.000 n=25+24) GoTypes 307MB ± 0% 305MB ± 0% -0.38% (p=0.000 n=25+25) Compiler 1.06GB ± 0% 1.05GB ± 0% -0.43% (p=0.000 n=25+25) name old allocs/op new allocs/op delta Template 1.10M ± 0% 1.09M ± 0% -1.04% (p=0.000 n=25+25) GoTypes 3.36M ± 0% 3.32M ± 0% -1.13% (p=0.000 n=25+24) Compiler 13.0M ± 0% 12.9M ± 0% -1.12% (p=0.000 n=25+25) Change-Id: I1280b846e895c00b95bb6664958a7765bd819610 Reviewed-on: https://go-review.googlesource.com/20296Reviewed-by: Keith Randall <khr@golang.org>
-
Brad Fitzpatrick authored
Also, add more failure output to debug why linux/mips64le and linux/ppc64 are failing. They should be working. I suspect their builder test envs are missing something. Change-Id: I97273fe72c4e3009db400394636d0da1ef147485 Reviewed-on: https://go-review.googlesource.com/20358 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Klaus Post authored
This adds "slicing by 8" optimization to Castagnoli tables which will speed up CRC32 calculation on systems without asssembler, which are all but AMD64. In my tests, it is faster to use "slicing by 8" for sizes all down to 16 bytes, so the switchover point has been adjusted. There are no benchmarks for small sizes, so I have added one for 40 bytes, as well as one for bigger sizes (32KB). Castagnoli, No assembler, 40 Byte payload: (before, after) BenchmarkCastagnoli40B-4 10000000 161 ns/op 246.94 MB/s BenchmarkCastagnoli40B-4 20000000 100 ns/op 398.01 MB/s Castagnoli, No assembler, 32KB payload: (before, after) BenchmarkCastagnoli32KB-4 10000 115426 ns/op 283.89 MB/s BenchmarkCastagnoli32KB-4 30000 45171 ns/op 725.41 MB/s IEEE, No assembler, 1KB payload: (before, after) BenchmarkCrc1KB-4 500000 3604 ns/op 284.10 MB/s BenchmarkCrc1KB-4 1000000 1463 ns/op 699.79 MB/s Compared: benchmark old ns/op new ns/op delta BenchmarkCastagnoli40B-4 161 100 -37.89% BenchmarkCastagnoli32KB-4 115426 45171 -60.87% BenchmarkCrc1KB-4 3604 1463 -59.41% benchmark old MB/s new MB/s speedup BenchmarkCastagnoli40B-4 246.94 398.01 1.61x BenchmarkCastagnoli32KB-4 283.89 725.41 2.56x BenchmarkCrc1KB-4 284.10 699.79 2.46x Change-Id: I303e4ec84e8d4dafd057d64c0e43deb2b498e968 Reviewed-on: https://go-review.googlesource.com/19335 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
name old time/op new time/op delta Template 441ms ± 4% 446ms ± 4% +1.23% (p=0.048 n=22+25) GoTypes 1.51s ± 2% 1.51s ± 2% ~ (p=0.224 n=25+25) Compiler 5.59s ± 1% 5.57s ± 2% -0.38% (p=0.019 n=24+24) name old alloc/op new alloc/op delta Template 85.6MB ± 0% 85.6MB ± 0% -0.11% (p=0.000 n=25+24) GoTypes 307MB ± 0% 305MB ± 0% -0.45% (p=0.000 n=25+25) Compiler 1.06GB ± 0% 1.06GB ± 0% -0.34% (p=0.000 n=25+25) name old allocs/op new allocs/op delta Template 1.10M ± 0% 1.10M ± 0% -0.03% (p=0.001 n=25+24) GoTypes 3.36M ± 0% 3.35M ± 0% -0.13% (p=0.000 n=25+25) Compiler 13.0M ± 0% 13.0M ± 0% -0.12% (p=0.000 n=25+24) Change-Id: I7fc18acbc3b1588aececef9692e24a0bd3dba974 Reviewed-on: https://go-review.googlesource.com/20295 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ifa09bccb8482a6141d0aa862cef674fade30e2eb Reviewed-on: https://go-review.googlesource.com/20355Reviewed-by: David Crawshaw <crawshaw@golang.org>
-