- 07 Mar, 2016 9 commits
-
-
Joe Tsai authored
Ensure that all errors (including io.EOF) are persistent across method calls on zlib.Reader. Furthermore, ensure that these persistent errors are properly cleared when Reset is called. Fixes #14675 Change-Id: I15a20c7e25dc38219e7e0ff255d1ba775a86bb47 Reviewed-on: https://go-review.googlesource.com/20292Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Found by temporarily flipping fields from *NodeList to Nodes and fixing all the compilation errors. This CL does not actually change any fields. Passes toolstash -cmp. Update #14473. Change-Id: Ib98fa37e8752f96358224c973a743618a6a0e736 Reviewed-on: https://go-review.googlesource.com/20320 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Eliminates type conversions in a bunch of Oconv(int(n.Op), ...) calls. Notably, this identified a misuse of Oconv in amd64/gsubr.go to try to print an assembly instruction op instead of a compiler node op. Change-Id: I93b5aa49fe14a5eaf868b05426d3b8cd8ab52bc5 Reviewed-on: https://go-review.googlesource.com/20298 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Miller authored
Implementation more or less follows plan9_386 version. Revised 7 March to correct a bug in runtime.seek and tidy whitespace for 8-column tabs. Change-Id: I2e921558b5816502e8aafe330530c5a48a6c7537 Reviewed-on: https://go-review.googlesource.com/18966 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Richard Miller authored
Plan 9 trap/signal handling differs on ARM from other architectures because ARM has a link register. Also trap message syntax varies between different architectures (historical accident?). Revised 7 March to clarify a comment. Change-Id: Ib6485f82857a2f9a0d6b2c375cf0aaa230b83656 Reviewed-on: https://go-review.googlesource.com/18969 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Caio Marcelo de Oliveira Filho authored
In increment and decrement statements, explicit check that the type of operand is numeric earlier. This avoids a related but less clear error about converting "1" to be emitted. So, when compiling package main func main() { var x bool x++ } instead of emitting two errors prog.go:5: cannot convert 1 to type bool prog.go:5: invalid operation: x++ (non-numeric type bool) just emits the second error. Fixes #12525. Change-Id: I6e81330703765bef0d6eb6c57098c1336af7c799 Reviewed-on: https://go-review.googlesource.com/20245Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Nigel Tao authored
Change-Id: Id0a12c76b0a6925f2926d38a1931157f9ef5f650 Reviewed-on: https://go-review.googlesource.com/20280Reviewed-by: Joe Tsai <joetsai@digital-static.net> Run-TryBot: Joe Tsai <joetsai@digital-static.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
This increases the number of matches in make.bash from 853 to 984. Change-Id: I12697697a50ecd86d49698200144a4c80dd3e5a4 Reviewed-on: https://go-review.googlesource.com/20274Reviewed-by: Todd Neal <todd@tneal.org>
-
Austin Clements authored
We used to start background mark workers and assists at different times, so we needed to keep track of these separately. They're now set to exactly the same time, so clean things up by merging them in to one value, markStartTime. Change-Id: I17c9843c3ed2d6f07b4c8cd0b2c438fc6de23b53 Reviewed-on: https://go-review.googlesource.com/20143 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
-
- 06 Mar, 2016 9 commits
-
-
Josh Bleecher Snyder authored
OffPtr allocates less and is easier to optimize. With this change, the OffPtr collapsing opt rule matches increase from 160k to 263k, and the Load-after-Store opt rule matches increase from 217 to 853. Change-Id: I763426a3196900f22a367f7f6d8e8047b279653d Reviewed-on: https://go-review.googlesource.com/20273 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
This triggers an astonishing 160k times during make.bash. The second biggest generic rewrite triggers 100k times. However, this is really just moving rewrites that were happening at the architecture level to the generic level. Change-Id: Ife06fe5234f31433328460cb2e0741c071deda41 Reviewed-on: https://go-review.googlesource.com/20235 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
-
Keith Randall authored
This only deals with the loads themselves. The bounds checks are a separate issue. Also doesn't handle stores, those are harder because we need to make sure intermediate memory states aren't observed (which is hard to do with rewrite rules). Use one byte shorter instructions for zero-extending loads. Update #14267 Change-Id: I40af25ab5208488151ba7db32bf96081878fa7d9 Reviewed-on: https://go-review.googlesource.com/20218Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
They were only used for rtype.ptrToThis which David Crawshaw removed a couple of weeks ago. Removes two traversals of Ctxt.Allsym from the linker but it doesn't seem to make much difference to performance. Change-Id: I5c305e0180186f643221d57822d301de4aa18827 Reviewed-on: https://go-review.googlesource.com/20287Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
The new code is a bit less efficient, but it does not involve altering the structure of any linked lists. This will make it easier to replace NodeLists with Node slices. We can return to a more efficient algorithm when NodeLists have been replaced. Passes toolstash -cmp. Change-Id: I0bb5ee75e7c0646e6d37fe558c8f0548729d8aa1 Reviewed-on: https://go-review.googlesource.com/20277 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Muhammed Uluyol authored
Change-Id: Iadb4aa016a7b361d01827787dbc59164d5d147f2 Reviewed-on: https://go-review.googlesource.com/20291Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
No immediate reduction in the size of Addr. Passes toolstash -cmp. Change-Id: I78ea4c6e181b6e571ce70a5f1ae8158844eb197d Reviewed-on: https://go-review.googlesource.com/20276Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Dave Cheney authored
Add tests to ensure that the size of important types don't change unexpectedly. Skip the test on nacl platforms because of their unusual padding requirements. Change-Id: Iddb127a99499e089a309b721f5073356c0da8b24 Reviewed-on: https://go-review.googlesource.com/20285Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Dave Cheney <dave@cheney.net> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Martin Möhrmann authored
Removes specialized functions for each verb and float/complex size and replaces them with generic variants fmtFloat and fmtComplex similar to other generic fmt functions. Simplifies the complex formatting by relying on fmtFloat to handle the verb and default precision selection. Complex imaginary formatting does not need to clear the f.space flag because the set f.plus flag will force a sign instead of a space. Sets default precision for %b to -1 (same as %g and %G) since precision for %b has no affect in strconv.AppendFloat. Add more tests and group them a bit better. Use local copies of +Inf,-Inf and NaN instead of math package functions for testing. Saves around 8kb in the go binary. name old time/op new time/op delta SprintfFloat-2 200ns ± 4% 196ns ± 4% -1.55% (p=0.007 n=20+20) SprintfComplex-2 569ns ± 4% 570ns ± 3% ~ (p=0.804 n=20+20) Change-Id: I36d35dab6f835fc2bd2c042ac97705868eb2446f Reviewed-on: https://go-review.googlesource.com/20252Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org>
-
- 05 Mar, 2016 11 commits
-
-
Martin Möhrmann authored
Reuse the internal buffer and use append versions of the strconv quote functions to avoid some allocations. Add more tests. name old time/op new time/op delta SprintfQuoteString-2 486ns ± 2% 416ns ± 2% -14.42% (p=0.000 n=20+20) name old allocs/op new allocs/op delta SprintfQuoteString-2 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.000 n=20+20) Change-Id: I63795b51fd95c53c5993ec8e6e99b659941f9f54 Reviewed-on: https://go-review.googlesource.com/20251 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Martin Möhrmann authored
Instead of calling printArg in fmtBytes to format each byte call the byte formatting functions directly since it is known each element is of type byte. Add more tests for byte slice and array formatting. name old time/op new time/op delta SprintfBytes-2 843ns ±16% 417ns ±11% -50.58% (p=0.000 n=20+20) Change-Id: I5b907dbf52091e3de9710b09d67649c76f4c17e9 Reviewed-on: https://go-review.googlesource.com/20176 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Hitoshi Mitake authored
Current runtime.WriteHeapProfile() doesn't print correct EnableGC. Even if GOGC=off, the result file has below line: # EnableGC = true It is hard to print correct status of the variable because of corner cases e.g. initialization. For avoiding confusion, this commit removes the print. Change-Id: Ia792454a6c650bdc50a06fbaff4df7b6330ae08a Reviewed-on: https://go-review.googlesource.com/18600 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Matthew Dempsky authored
Updates #14473. Change-Id: I88745c2a6119dea3b81b57299e70a2a7e4c584a8 Reviewed-on: https://go-review.googlesource.com/20272 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Martin Möhrmann authored
formatFloat should restore the original f.wid value before returning. Callers should not have to save and restore f.wid. Fixes: #14642 Change-Id: I531dae15c7997fe8909e2ad1ef7c376654afb030 Reviewed-on: https://go-review.googlesource.com/20179 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I0809c6b88643f04c7fc503f866ffe25e69f29910 Reviewed-on: https://go-review.googlesource.com/20260Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I836197810405cde72cbb49fef7e163a517601f9c Reviewed-on: https://go-review.googlesource.com/20242Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Matthew Dempsky authored
The new check corresponds to the (etype != TANY || Debug['A'] != 0) that was lost in golang.org/cl/19936. Fixes #14652. Change-Id: Iec3788ff02529b3b0f0d4dd92ec9f3ef20aec849 Reviewed-on: https://go-review.googlesource.com/20271Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
Instead make substArgTypes responsible for cloning the function definition Node and the function signature Type tree. Passes toolstash -cmp. Change-Id: I9ec84c90a7ae83d164d3f578e84a91cf1490d8ab Reviewed-on: https://go-review.googlesource.com/20239 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Lynn Boger authored
Update supportsUnaligned in xor.go to be true for GOARCH values ppc64le and ppc64. This allows the xor of long buffers to be done on double words (8 bytes) instead of a single byte at a time, which significantly improves performance. Fixes #14350 Change-Id: Iccc6b9d3df2e604a55f4c1e4890bdd3bb0d77ab0 Reviewed-on: https://go-review.googlesource.com/19519Reviewed-by: Minux Ma <minux@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I1b50fe981e7a266d4b14f31d849eb91afccdfda3 Reviewed-on: https://go-review.googlesource.com/20270 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 04 Mar, 2016 11 commits
-
-
Brad Fitzpatrick authored
Change-Id: Ib632ee7ac893750bec4cfe223745bca5f31900ab Reviewed-on: https://go-review.googlesource.com/20234Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp Update #14473. Change-Id: I15b35d40a5ec1f4355ee38bc6d131920933ac95c Reviewed-on: https://go-review.googlesource.com/20237 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I01ec7d08884a1e0fbce94ea77281c1ee4a2cfd56 Reviewed-on: https://go-review.googlesource.com/20238Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Also fix some uses of nodeSeqIterator.Len, and fix the implementation in nodesIterator. Passes toolstash -cmp. Update #14473. Change-Id: I228871470234b7f1314ffd2aae8a4c0624c35f98 Reviewed-on: https://go-review.googlesource.com/20231 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rhys Hiltner authored
When the linker was written in C, command line arguments were passed around as null-terminated byte arrays which encouraged checking characters one at a time. In Go, that can easily lead to out-of-bounds panics. Use the more idiomatic strings.HasPrefix when checking cmd/link's -B argument to avoid the panic, and replace the manual hex decode with use of the encoding/hex package. Fixes #14636 Change-Id: I45f765bbd8cf796fee1a9a3496178bf76b117827 Reviewed-on: https://go-review.googlesource.com/20211 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
gcMarkRootCheck takes ~10ns per goroutine. This is just a debugging check, so disable it (plus, if something is going to go wrong, it's more likely to go wrong during concurrent mark). We may be able to re-enable this later, or move it to after we've started the world again. (But not for 1.6.x.) For 1.6.x. Fixes #14419. name / 95%ile-time/markTerm old new delta 500kIdleGs-12 24.0ms ± 0% 18.9ms ± 6% -21.46% (p=0.000 n=15+20) Change-Id: Idb2a2b1771449de772c159ef95920d6df1090666 Reviewed-on: https://go-review.googlesource.com/20148Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Currently we reset the mark state during STW sweep termination. This involves looping over all of the goroutines. Each iteration of this loop takes ~25ns, so at around 400k goroutines, we'll exceed our 10ms pause goal. However, it's safe to do this before we stop the world for sweep termination because nothing is consuming this state yet. Hence, move the reset to just before STW. This isn't perfect: a long reset can still delay allocating goroutines that block on GC starting. But it's certainly better to block some things eventually than to block everything immediately. For 1.6.x. Fixes #14420. name \ 95%ile-time/sweepTerm old new delta 500kIdleGs-12 11312µs ± 6% 18.9µs ± 6% -99.83% (p=0.000 n=16+20) Change-Id: I9815c4d8d9b0d3c3e94dfdab78049cefe0dcc93c Reviewed-on: https://go-review.googlesource.com/20147Reviewed-by: Rick Hudson <rlh@golang.org> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Also fix compiler-invoked panics to avoid a confusing "malloc deadlock" crash if they are invoked while executing the runtime. Fixes #14599. Change-Id: I89436abcbf3587901909abbdca1973301654a76e Reviewed-on: https://go-review.googlesource.com/20219 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
David Crawshaw authored
Many read-only strings in Go binaries are substrings of other read-only strings. A common source is the text form of type information, which will include both "struct { X int }" and "*struct { X int }" or "*bytes.Reader" and "func(*bytes.Reader)" in the same binary. Because this character data is referred to by separate string headers, we can skip writing the smaller string and modify the pointer relocation to point to the larger string. This CL does this deduplication in the linker after the reachable set of strings has been determined. This removes 765KB from juju (1.4% without DWARF). Link time goes at tip goes form 4.6s to 6.3s, but note that this CL is part of a series that recently reduced link time from 9.6s. For #6853. Change-Id: Ib2087cf627c9f1e9a1181f9b4c8f81d1a3f42191 Reviewed-on: https://go-review.googlesource.com/19987Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
go test github.com/onsi/gomega/gbytes now passes at tip, and tests added to the reflect package. Fixes #14645 Change-Id: I16216c1a86211a1103d913237fe6bca5000cf885 Reviewed-on: https://go-review.googlesource.com/20221 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
Minalign > 1 implies that relocations inserted by the linker cannot target arbitrary bytes. Related to #14604 Change-Id: Ie68d14887bc4047d9b29b0cb1149a8d14b6c62e2 Reviewed-on: https://go-review.googlesource.com/20214Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-