- 13 Apr, 2016 10 commits
-
-
Tal Shprecher authored
Map keys are currently validated in multiple locations but share a common validation routine. The problem is that early validations should be lenient enough to allow for forward types while the final validations should not. The final validations should fail on forward types since they've already settled. This change also separates the key type checking from the creation of the map via typMap. Instead of the mapqueue being populated in copytype() by checking the map line number, it's populated in the same block that validates the key type. This isolates key validation logic while type checking. Fixes #14988 Change-Id: Ia47cf6213585d6c63b3a35249104c0439feae658 Reviewed-on: https://go-review.googlesource.com/21830Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Fixes #11361. Change-Id: I70b8808f97f0e07de680e7e6ede1322ea0fdbbc0 Reviewed-on: https://go-review.googlesource.com/21936Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tal Shprecher authored
Change-Id: Ica0ec84714d7f01d800d62fa10cdb08321d43cf3 Reviewed-on: https://go-review.googlesource.com/21967Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
No need to acquire the M just to change G's paniconfault flag, and the original C implementation of SetPanicOnFault did not. The M acquisition logic is an artifact of golang.org/cl/131010044, which was started before golang.org/cl/123640043 (which introduced the current "getg" function) was submitted. Change-Id: I6d1939008660210be46904395cf5f5bbc2c8f754 Reviewed-on: https://go-review.googlesource.com/21935 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Automated change. Fixes #15269 Change-Id: I8deb2ac0101d3f7c390467ceb0a1561b72edbb2f Reviewed-on: https://go-review.googlesource.com/21962 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Martin Möhrmann authored
Merges explodetests into splittests which already contain some of the tests that cover explode. Adds a test to cover the utf8.RuneError branch in explode. name old time/op new time/op delta Split1-2 14.9ms ± 0% 14.2ms ± 0% -4.06% (p=0.000 n=47+49) Change-Id: I00f796bd2edab70e926ea9e65439d820c6a28254 Reviewed-on: https://go-review.googlesource.com/21609 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Emmanuel Odeke authored
Adds examples showing loading templates from files and executing them. Shows examples: - Using ParseGlob. - Using ParseFiles. - Using helper functions to share and use templates in different contexts by adding them to an existing bundle of templates. - Using a group of driver templates with distinct sets of helper templates. Almost all of the code was directly copied from text/template. Fixes #8500 Change-Id: Ic3d91d5232afc5a1cd2d8cd3d9a5f3b754c64225 Reviewed-on: https://go-review.googlesource.com/21854Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Josh Bleecher Snyder authored
runtime.newobject never returns the same thing twice, so the resulting value will never be a common subexpression. This helps when compiling large static data structures that include pointers, such as maps and slices. No clear performance impact on other code. (See below.) For the code in issue #15112: Before: real 1m14.238s user 1m18.985s sys 0m0.787s After: real 0m47.172s user 0m52.248s sys 0m0.767s For the code in issue #15235, size 10k: Before: real 0m44.916s user 0m46.577s sys 0m0.304s After: real 0m7.703s user 0m9.041s sys 0m0.316s Still more work to be done, particularly for #15112. Updates #15112 Updates #15235 name old time/op new time/op delta Template 330ms ±11% 333ms ±13% ~ (p=0.749 n=20+19) Unicode 148ms ± 6% 152ms ± 8% ~ (p=0.072 n=18+20) GoTypes 1.01s ± 7% 1.01s ± 3% ~ (p=0.583 n=20+20) Compiler 5.04s ± 2% 5.06s ± 2% ~ (p=0.314 n=20+20) name old user-ns/op new user-ns/op delta Template 444user-ms ±11% 445user-ms ±10% ~ (p=0.738 n=20+20) Unicode 215user-ms ± 5% 218user-ms ± 5% ~ (p=0.239 n=18+18) GoTypes 1.45user-s ± 3% 1.45user-s ± 4% ~ (p=0.620 n=20+20) Compiler 7.23user-s ± 2% 7.22user-s ± 2% ~ (p=0.901 n=20+19) name old alloc/op new alloc/op delta Template 55.0MB ± 0% 55.0MB ± 0% ~ (p=0.547 n=20+20) Unicode 37.6MB ± 0% 37.6MB ± 0% ~ (p=0.301 n=20+20) GoTypes 177MB ± 0% 177MB ± 0% ~ (p=0.065 n=20+19) Compiler 798MB ± 0% 797MB ± 0% -0.05% (p=0.000 n=19+20) name old allocs/op new allocs/op delta Template 492k ± 0% 493k ± 0% +0.03% (p=0.030 n=20+20) Unicode 377k ± 0% 377k ± 0% ~ (p=0.423 n=20+19) GoTypes 1.40M ± 0% 1.40M ± 0% ~ (p=0.102 n=20+20) Compiler 5.53M ± 0% 5.53M ± 0% ~ (p=0.094 n=17+18) name old text-bytes new text-bytes delta HelloSize 561k ± 0% 561k ± 0% ~ (all samples are equal) CmdGoSize 6.13M ± 0% 6.13M ± 0% ~ (all samples are equal) name old data-bytes new data-bytes delta HelloSize 128k ± 0% 128k ± 0% ~ (all samples are equal) CmdGoSize 306k ± 0% 306k ± 0% ~ (all samples are equal) name old exe-bytes new exe-bytes delta HelloSize 905k ± 0% 905k ± 0% ~ (all samples are equal) CmdGoSize 9.64M ± 0% 9.64M ± 0% ~ (all samples are equal) Change-Id: Id774e2901d7701a3ec7a1c1d1cf1d9327a4107fc Reviewed-on: https://go-review.googlesource.com/21937 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
-
Keith Randall authored
getcallerpc's arg needs to point to the first argument slot. I believe this bug was introduced by Michel's itab changes (specifically https://go-review.googlesource.com/c/20902). Fixes #15145 Change-Id: Ifb2e17f3658e2136c7950dfc789b4d5706320683 Reviewed-on: https://go-review.googlesource.com/21931Reviewed-by: Michel Lespinasse <walken@google.com>
-
Shahar Kohanim authored
name old secs new secs delta LinkCmdGo 0.53 ± 9% 0.53 ±10% -1.30% (p=0.022 n=100+99) name old MaxRSS new MaxRSS delta LinkCmdGo 151k ± 4% 142k ± 6% -5.92% (p=0.000 n=98+100) Change-Id: Ic30e63a948f8e626b3396f458a0163f7234810c1 Reviewed-on: https://go-review.googlesource.com/21920 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 12 Apr, 2016 30 commits
-
-
Brad Fitzpatrick authored
Change-Id: Iba40edc9ddad62534b06c5af20bbc3dd3dc14d0a Reviewed-on: https://go-review.googlesource.com/21881Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Gccgo was erroneously marking Call results as addressable, which led to an obscure bug using text/template, as text/template calls CanAddr to check whether to take the address of a value when looking up methods. When a function returned a pointer, and CanAddr was true, the result was a pointer to a pointer that had no methods. Fixed in gccgo by https://golang.org/cl/21908. Adding the test here so that it doesn't regress. Change-Id: I1d25b868e1b8e2348b21cbac6404a636376d1a4a Reviewed-on: https://go-review.googlesource.com/21930 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Martin Möhrmann authored
Use one comparison to detect underflow and overflow simultaneously. Use a shift, bitwise complement and uint8 type conversion to handle clamping to upper and lower bound without additional branching. Overall the new code is faster for a mix of common case, underflow and overflow. name old time/op new time/op delta YCbCr-2 1.12ms ± 0% 0.64ms ± 0% -43.01% (p=0.000 n=48+47) name old time/op new time/op delta YCbCrToRGB/0-2 5.52ns ± 0% 5.77ns ± 0% +4.48% (p=0.000 n=50+49) YCbCrToRGB/128-2 6.05ns ± 0% 5.52ns ± 0% -8.69% (p=0.000 n=39+50) YCbCrToRGB/255-2 5.80ns ± 0% 5.77ns ± 0% -0.58% (p=0.000 n=50+49) Found in collaboration with Josh Bleecher Snyder and Ralph Corderoy. Change-Id: Ic5020320f704966f545fdc1ae6bc24ddb5d3d09a Reviewed-on: https://go-review.googlesource.com/21910Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Updates #15262 Change-Id: I3eb1f6f71d6285d039f11ba6a34b8a599a33bf49 Reviewed-on: https://go-review.googlesource.com/21909 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Brad Fitzpatrick authored
Fixes the darwin/arm builder, which has a special test runner which makes the assumption that tests never use testdata from another package. This looks large, but it's no more space in git. Change-Id: I81921b516443d12d21b77617d323ddebedbe40f8 Reviewed-on: https://go-review.googlesource.com/21907Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: Ie8323cfcd1193f390729d0d3dd67863aedf47d13 Reviewed-on: https://go-review.googlesource.com/21906 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Running stress -p 1 go test -short std on a heavily loaded machine causes net timeouts every 15 or 20 runs. Making these tests not run in parallel helps. With this change, I haven’t seen a single failure in over 100 runs. Fixes #14986 Change-Id: Ibaa14869ce8d95b00266aee94d62d195927ede68 Reviewed-on: https://go-review.googlesource.com/21905 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dan Peterson authored
Standardize on space between "RFC" and number. Additionally change the couple "a RFC" instances to "an RFC." Fixes #15258 Change-Id: I2b17ecd06be07dfbb4207c690f52a59ea9b04808 Reviewed-on: https://go-review.googlesource.com/21902Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shahar Kohanim authored
Only splits into separate files, no other changes. Change-Id: Icc0da2c5f18e03e9ed7c0043bd7c790f741900f2 Reviewed-on: https://go-review.googlesource.com/21804Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
This is the first in a series of CLs to replace the use of pointers in binary read-only data with offsets. In standard Go binaries these CLs have a small effect, shrinking 8-byte pointers to 4-bytes. In position-independent code, it also saves the dynamic relocation for the pointer. This has a significant effect on the binary size when building as PIE, c-archive, or c-shared. darwin/amd64: cmd/go: -12KB (0.1%) jujud: -82KB (0.1%) linux/amd64 PIE: cmd/go: -86KB (0.7%) jujud: -569KB (0.7%) For #6853. Change-Id: Iad5625bbeba58dabfd4d334dbee3fcbfe04b2dcf Reviewed-on: https://go-review.googlesource.com/21284Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
These builders (on Linaro) have a different network configuration which is incompatible with this test. Or so it seems. Updates #15191 Change-Id: Ibfeacddc98dac1da316e704b5c8491617a13e3bf Reviewed-on: https://go-review.googlesource.com/21901Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Alberto Donizetti authored
Fixes #15225 Change-Id: I1f85590b2c3293463c6476beebcd3256adc1bf23 Reviewed-on: https://go-review.googlesource.com/21802Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dan Peterson authored
Fixes #14776 Change-Id: I55423ac643f18542b9fd1386ed98dec47fb678aa Reviewed-on: https://go-review.googlesource.com/21890Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Passes toolstash -cmp. Change-Id: Id504e71ed1f23900e24a9aed25143c94f4d7d50c Reviewed-on: https://go-review.googlesource.com/21899 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shawn Walker-Salas authored
In the event of a partial write on Solaris and some BSDs, the offset pointer passed to sendfile() will be updated even though the function returns -1 if errno is set to EAGAIN/EINTR. In that case, calculate the bytes written based on the difference between the updated offset and the original offset. If no bytes were written, and errno is set to EAGAIN/EINTR, ignore the errno. Fixes #13892 Change-Id: I6334b5ef2edcbebdaa7db36fa4f7785967313c2d Reviewed-on: https://go-review.googlesource.com/21769 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Also: Adjust go/importer accordingly. Change-Id: Ia6669563793e218946af45b9fba1cf986a21c031 Reviewed-on: https://go-review.googlesource.com/21896Reviewed-by: Alan Donovan <adonovan@google.com>
-
Michael Munday authored
The disassembler is not yet implemented on s390x. Updates #15255. Change-Id: Ibab319c8c087b1a619baa1529398305c1e721877 Reviewed-on: https://go-review.googlesource.com/21894Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
s390x doesn't have sendfile64 so apply the same fix as MIPS (eebf7d27) and just use sendfile. Change-Id: If8fe2e974ed44a9883282430157c3545d5bd04bd Reviewed-on: https://go-review.googlesource.com/21892Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
Allows instructions with a From3 field to be used in regopt so long as From3 represents a constant. This is needed because the storage-to-storage instructions on s390x place the length of the data into From3. Change-Id: I12cd32d4f997baf2fe97937bb7d45bbf716dfcb5 Reviewed-on: https://go-review.googlesource.com/20875Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
Fixes #15246 Re-opens #14969 Change-Id: Ic0b41c5aa42bbb229a0d62b7f3e5888c6b29293d Reviewed-on: https://go-review.googlesource.com/21891 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Michael Munday authored
It seems cleaner and more consistent with other files to list the architectures that have assembly implementations rather than to list those that do not. This means we don't have to add s390x and future platforms to this list. Change-Id: I2ad3f66b76eb1711333c910236ca7f5151b698e5 Reviewed-on: https://go-review.googlesource.com/21770Reviewed-by: Bill O'Farrell <billotosyr@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Change-Id: I64ada9fe34c3cfc4bd514ec5d8c8f4d4c99074fb Reviewed-on: https://go-review.googlesource.com/20950Reviewed-by: Bill O'Farrell <billotosyr@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Needed for the header check to accept the header generated for s390x as Go 1.2 style rather than Go 1.1 style. Change-Id: I7b3713d4cc7514cfc58f947a45702348f6d7b824 Reviewed-on: https://go-review.googlesource.com/20966Reviewed-by: Minux Ma <minux@golang.org>
-
Michael Munday authored
Load and store instructions are atomic on the s390x. Change-Id: I0031ed2fba43f33863bca114d0fdec2e7d1ce807 Reviewed-on: https://go-review.googlesource.com/20938Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Most architectures can only generate nil checks when the the address to check is in a register. Currently only amd64 and 386 can generate checks for addresses that reside in memory. This is unlikely to change so the architecture check has been inverted. Change-Id: I73697488a183406c79a9039c62823712b510bb6a Reviewed-on: https://go-review.googlesource.com/21861Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
We need to make sure that when we combine loads, we only do so if there are no other uses of the load. We can't split one load into two because that can then lead to inconsistent loaded values in the presence of races. Add some aggressive copy removal code so that phantom "dead copy" uses of values are cleaned up promptly. This lets us use x.Uses==1 conditions reliably. Change-Id: I9037311db85665f3868dbeb3adb3de5c20728b38 Reviewed-on: https://go-review.googlesource.com/21853Reviewed-by: Todd Neal <todd@tneal.org>
-
Dmitry Vyukov authored
Make internal pprof packages available to cmd/trace. cmd/trace needs access to them to generate symbolized svg profiles (create and serialize Profile struct). And potentially generate svg programmatically instead of invoking go tool pprof. Change-Id: Iafd0c87ffdd4ddc081093be0b39761f19507907a Reviewed-on: https://go-review.googlesource.com/21870 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alexandru Moșoi authored
These passes do not modify the dominator tree too much. % benchstat old.txt new.txt name old time/op new time/op delta Template 335ms ± 3% 325ms ± 8% ~ (p=0.074 n=8+9) GoTypes 1.05s ± 1% 1.05s ± 3% ~ (p=0.095 n=9+10) Compiler 5.37s ± 4% 5.29s ± 1% -1.42% (p=0.022 n=9+10) MakeBash 34.9s ± 3% 34.4s ± 2% ~ (p=0.095 n=9+10) name old alloc/op new alloc/op delta Template 55.4MB ± 0% 54.9MB ± 0% -0.81% (p=0.000 n=10+10) GoTypes 179MB ± 0% 178MB ± 0% -0.89% (p=0.000 n=10+10) Compiler 807MB ± 0% 798MB ± 0% -1.10% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Template 498k ± 0% 496k ± 0% -0.29% (p=0.000 n=9+9) GoTypes 1.42M ± 0% 1.41M ± 0% -0.24% (p=0.000 n=10+10) Compiler 5.61M ± 0% 5.60M ± 0% -0.12% (p=0.000 n=10+10) Change-Id: I4cd20cfba3f132ebf371e16046ab14d7e42799ec Reviewed-on: https://go-review.googlesource.com/21806 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Michael Munday authored
s390x does not require duffzero/duffcopy since it has storage-to-storage instructions that can copy/clear up to 256 bytes at a time. peep contains several new passes to optimize instruction sequences that match s390x instructions such as the compare-and-branch and load/store multiple instructions. copyprop and subprop have been extended to work with moves that require sign/zero extension. This work could be ported to other architectures that do not used sized math however it does add complexity and will probably be rendered unnecessary by ssa in the near future. Change-Id: I1b64b281b452ed82a85655a0df69cb224d2a6941 Reviewed-on: https://go-review.googlesource.com/20873 Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bill O'Farrell <billotosyr@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Vyukov authored
Fixes #15102 Change-Id: I7fdb6464afd0b7af9b6652051416f0fddd34dc9a Reviewed-on: https://go-review.googlesource.com/21730Reviewed-by: Austin Clements <austin@google.com>
-