- 28 Mar, 2017 7 commits
-
-
Ilya Tocar authored
This was cherry-picked to 1.8 as CL 38587, but on master issue was fixed by CL 37661. Add still relevant part (test) and close issue, since test passes. Fixes #19201 Change-Id: I6415792e2c465dc6d9bd6583ba1e54b107bcf5cc Reviewed-on: https://go-review.googlesource.com/37376 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Updates #19683 Change-Id: Ic00d5a9807200791cf37553f4f802dbf27beea19 Reviewed-on: https://go-review.googlesource.com/38770 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Prior to this CL, autotmps were global to a package. They also shared numbering with static variables. Switch autotmp numbering to be per-function instead, and do implicit numbering based on len(Func.Dcl). This eliminates a dependency on a global variable from the backend without adding to the Func struct. While we're here, move statuniqgen closer to its sole remaining user. This actually improves compiler performance, because the autotmp_* names can now be reused across functions. name old alloc/op new alloc/op delta Template 40.6MB ± 0% 40.1MB ± 0% -1.38% (p=0.000 n=10+10) Unicode 29.9MB ± 0% 29.9MB ± 0% ~ (p=0.912 n=10+10) GoTypes 116MB ± 0% 114MB ± 0% -1.53% (p=0.000 n=10+10) SSA 865MB ± 0% 856MB ± 0% -1.04% (p=0.000 n=10+10) Flate 25.8MB ± 0% 25.4MB ± 0% -1.36% (p=0.000 n=10+10) GoParser 32.2MB ± 0% 32.0MB ± 0% -0.72% (p=0.000 n=10+10) Reflect 80.3MB ± 0% 79.0MB ± 0% -1.65% (p=0.000 n=9+10) Tar 27.0MB ± 0% 26.7MB ± 0% -0.86% (p=0.000 n=10+9) XML 42.8MB ± 0% 42.4MB ± 0% -0.95% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Template 398k ± 1% 396k ± 1% -0.59% (p=0.002 n=10+10) Unicode 321k ± 1% 321k ± 0% ~ (p=0.912 n=10+10) GoTypes 1.17M ± 0% 1.16M ± 0% -0.77% (p=0.000 n=10+10) SSA 7.65M ± 0% 7.62M ± 0% -0.40% (p=0.000 n=10+10) Flate 240k ± 1% 238k ± 1% -0.56% (p=0.001 n=10+10) GoParser 323k ± 1% 320k ± 1% -0.65% (p=0.002 n=10+10) Reflect 1.01M ± 0% 1.00M ± 0% -0.37% (p=0.001 n=9+10) Tar 256k ± 1% 255k ± 0% ~ (p=0.101 n=10+8) XML 400k ± 1% 398k ± 1% ~ (p=0.063 n=10+10) Change-Id: I3c23ca98129137d373106990b1a3e1507bbe0cc3 Reviewed-on: https://go-review.googlesource.com/38729 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
It is currently possible in the compiler to create a struct type, calculate the widths of types that depend on it, and then alter the struct type. transformclosure has local protection against this. Protect against it at a deeper level. This is preparation to call dowidth automatically, rather than explicitly. This is a re-roll of CL 38469. Change-Id: Ic5b4baa250618504611fc57cbf51ab01d1eddf80 Reviewed-on: https://go-review.googlesource.com/38534 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Prior to this CL, Type.Width != 0 was the mark of a Type whose Width had been calculated. As a result, dowidth always recalculated the width of struct{}. This, combined with the prohibition on calculating the width of a FuncArgsStruct and the use of struct{} as a function argument, meant that there were circumstances in which it was forbidden to call dowidth on a type. This inhibits refactoring to call dowidth automatically, rather than explicitly. Instead add a helper method, Type.WidthCalculated, and implement as Type.Align > 0. Type.Width is not a good candidate for tracking whether the width has been calculated; 0 is a value type width, and Width is subject to too much magic value game-playing. For good measure, add a test for #11354. Change-Id: Ie9a9fb5d924e7a2010c1904ae5e38ed4a38eaeb2 Reviewed-on: https://go-review.googlesource.com/38468 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
haya14busa authored
It reduces needless allocations on compiling onepass regex. name old time/op new time/op delta CompileOnepass/^(?:(?:(?:.(?:$))?))...-4 6.31µs ± 3% 6.11µs ± 3% ~ (p=0.056 n=5+5) CompileOnepass/^abcd$-4 5.69µs ±12% 4.93µs ± 4% -13.42% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a{0,})*?)$-4 7.10µs ±12% 5.82µs ± 5% -17.95% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a+)*)$-4 5.99µs ±10% 6.07µs ±11% ~ (p=1.000 n=5+5) CompileOnepass/^(?:(?:a|(?:aa)))$-4 7.36µs ± 4% 7.81µs ±19% ~ (p=0.310 n=5+5) CompileOnepass/^(?:[^\s\S])$-4 4.71µs ± 3% 4.71µs ± 5% ~ (p=1.000 n=5+5) CompileOnepass/^(?:(?:(?:a*)+))$-4 6.06µs ± 2% 6.23µs ± 9% ~ (p=0.310 n=5+5) CompileOnepass/^[a-c]+$-4 4.74µs ± 4% 4.64µs ± 6% ~ (p=0.421 n=5+5) CompileOnepass/^[a-c]*$-4 5.17µs ± 2% 4.68µs ± 0% -9.57% (p=0.016 n=5+4) CompileOnepass/^(?:a*)$-4 5.34µs ± 3% 5.08µs ±12% ~ (p=0.151 n=5+5) CompileOnepass/^(?:(?:aa)|a)$-4 7.24µs ± 5% 7.33µs ±12% ~ (p=0.841 n=5+5) CompileOnepass/^...$-4 5.28µs ± 3% 4.99µs ± 9% ~ (p=0.095 n=5+5) CompileOnepass/^(?:a|(?:aa))$-4 7.20µs ± 4% 7.24µs ±10% ~ (p=0.841 n=5+5) CompileOnepass/^a((b))c$-4 7.99µs ± 3% 7.76µs ± 8% ~ (p=0.151 n=5+5) CompileOnepass/^a.[l-nA-Cg-j]?e$-4 8.30µs ± 5% 7.29µs ± 4% -12.08% (p=0.008 n=5+5) CompileOnepass/^a((b))$-4 7.34µs ± 4% 7.24µs ±19% ~ (p=0.690 n=5+5) CompileOnepass/^a(?:(b)|(c))c$-4 9.80µs ± 6% 9.49µs ±18% ~ (p=0.151 n=5+5) CompileOnepass/^a(?:b|c)$-4 5.23µs ± 3% 4.80µs ±10% ~ (p=0.056 n=5+5) CompileOnepass/^a(?:b?|c)$-4 8.26µs ± 3% 7.30µs ± 3% -11.62% (p=0.008 n=5+5) CompileOnepass/^a(?:b?|c+)$-4 9.18µs ± 2% 8.16µs ± 2% -11.06% (p=0.008 n=5+5) CompileOnepass/^a(?:bc)+$-4 6.16µs ± 3% 6.41µs ±13% ~ (p=0.548 n=5+5) CompileOnepass/^a(?:[bcd])+$-4 5.75µs ± 5% 5.50µs ±12% ~ (p=0.151 n=5+5) CompileOnepass/^a((?:[bcd])+)$-4 7.65µs ± 5% 6.93µs ± 9% ~ (p=0.056 n=5+5) CompileOnepass/^a(:?b|c)*d$-4 13.0µs ± 1% 12.1µs ± 2% -6.91% (p=0.008 n=5+5) CompileOnepass/^.bc(d|e)*$-4 9.20µs ± 4% 8.25µs ± 3% -10.38% (p=0.008 n=5+5) CompileOnepass/^loooooooooooooooooo...-4 254µs ± 2% 220µs ± 6% -13.47% (p=0.008 n=5+5) name old alloc/op new alloc/op delta CompileOnepass/^(?:(?:(?:.(?:$))?))...-4 3.92kB ± 0% 3.41kB ± 0% -13.06% (p=0.008 n=5+5) CompileOnepass/^abcd$-4 3.20kB ± 0% 2.75kB ± 0% -14.00% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a{0,})*?)$-4 3.85kB ± 0% 3.34kB ± 0% -13.31% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a+)*)$-4 3.46kB ± 0% 2.95kB ± 0% -14.78% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a|(?:aa)))$-4 4.20kB ± 0% 3.75kB ± 0% -10.67% (p=0.008 n=5+5) CompileOnepass/^(?:[^\s\S])$-4 3.10kB ± 0% 2.46kB ± 0% -20.62% (p=0.008 n=5+5) CompileOnepass/^(?:(?:(?:a*)+))$-4 3.64kB ± 0% 3.13kB ± 0% -14.07% (p=0.008 n=5+5) CompileOnepass/^[a-c]+$-4 3.06kB ± 0% 2.48kB ± 0% -18.85% (p=0.008 n=5+5) CompileOnepass/^[a-c]*$-4 3.10kB ± 0% 2.52kB ± 0% -18.60% (p=0.008 n=5+5) CompileOnepass/^(?:a*)$-4 3.21kB ± 0% 2.63kB ± 0% -17.96% (p=0.008 n=5+5) CompileOnepass/^(?:(?:aa)|a)$-4 4.09kB ± 0% 3.64kB ± 0% -10.96% (p=0.008 n=5+5) CompileOnepass/^...$-4 3.42kB ± 0% 2.91kB ± 0% -14.95% (p=0.008 n=5+5) CompileOnepass/^(?:a|(?:aa))$-4 4.09kB ± 0% 3.64kB ± 0% -10.96% (p=0.008 n=5+5) CompileOnepass/^a((b))c$-4 5.67kB ± 0% 4.39kB ± 0% -22.59% (p=0.008 n=5+5) CompileOnepass/^a.[l-nA-Cg-j]?e$-4 5.73kB ± 0% 4.32kB ± 0% -24.58% (p=0.008 n=5+5) CompileOnepass/^a((b))$-4 5.41kB ± 0% 4.06kB ± 0% -24.85% (p=0.008 n=5+5) CompileOnepass/^a(?:(b)|(c))c$-4 6.40kB ± 0% 5.31kB ± 0% -17.00% (p=0.008 n=5+5) CompileOnepass/^a(?:b|c)$-4 3.46kB ± 0% 2.88kB ± 0% -16.67% (p=0.008 n=5+5) CompileOnepass/^a(?:b?|c)$-4 5.77kB ± 0% 4.36kB ± 0% -24.41% (p=0.008 n=5+5) CompileOnepass/^a(?:b?|c+)$-4 5.94kB ± 0% 4.59kB ± 0% -22.64% (p=0.008 n=5+5) CompileOnepass/^a(?:bc)+$-4 3.60kB ± 0% 3.15kB ± 0% -12.44% (p=0.008 n=5+5) CompileOnepass/^a(?:[bcd])+$-4 3.46kB ± 0% 2.94kB ± 0% -14.81% (p=0.008 n=5+5) CompileOnepass/^a((?:[bcd])+)$-4 5.50kB ± 0% 4.09kB ± 0% -25.62% (p=0.008 n=5+5) CompileOnepass/^a(:?b|c)*d$-4 7.24kB ± 0% 6.15kB ± 0% -15.03% (p=0.008 n=5+5) CompileOnepass/^.bc(d|e)*$-4 5.75kB ± 0% 4.47kB ± 0% -22.25% (p=0.008 n=5+5) CompileOnepass/^loooooooooooooooooo...-4 225kB ± 0% 135kB ± 0% -39.99% (p=0.008 n=5+5) name old allocs/op new allocs/op delta CompileOnepass/^(?:(?:(?:.(?:$))?))...-4 52.0 ± 0% 49.0 ± 0% -5.77% (p=0.008 n=5+5) CompileOnepass/^abcd$-4 44.0 ± 0% 41.0 ± 0% -6.82% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a{0,})*?)$-4 52.0 ± 0% 49.0 ± 0% -5.77% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a+)*)$-4 47.0 ± 0% 44.0 ± 0% -6.38% (p=0.008 n=5+5) CompileOnepass/^(?:(?:a|(?:aa)))$-4 57.0 ± 0% 54.0 ± 0% -5.26% (p=0.008 n=5+5) CompileOnepass/^(?:[^\s\S])$-4 36.0 ± 0% 33.0 ± 0% -8.33% (p=0.008 n=5+5) CompileOnepass/^(?:(?:(?:a*)+))$-4 49.0 ± 0% 46.0 ± 0% -6.12% (p=0.008 n=5+5) CompileOnepass/^[a-c]+$-4 39.0 ± 0% 36.0 ± 0% -7.69% (p=0.008 n=5+5) CompileOnepass/^[a-c]*$-4 44.0 ± 0% 41.0 ± 0% -6.82% (p=0.008 n=5+5) CompileOnepass/^(?:a*)$-4 45.0 ± 0% 42.0 ± 0% -6.67% (p=0.008 n=5+5) CompileOnepass/^(?:(?:aa)|a)$-4 56.0 ± 0% 53.0 ± 0% -5.36% (p=0.008 n=5+5) CompileOnepass/^...$-4 46.0 ± 0% 43.0 ± 0% -6.52% (p=0.008 n=5+5) CompileOnepass/^(?:a|(?:aa))$-4 56.0 ± 0% 53.0 ± 0% -5.36% (p=0.008 n=5+5) CompileOnepass/^a((b))c$-4 57.0 ± 0% 53.0 ± 0% -7.02% (p=0.008 n=5+5) CompileOnepass/^a.[l-nA-Cg-j]?e$-4 62.0 ± 0% 58.0 ± 0% -6.45% (p=0.008 n=5+5) CompileOnepass/^a((b))$-4 51.0 ± 0% 47.0 ± 0% -7.84% (p=0.008 n=5+5) CompileOnepass/^a(?:(b)|(c))c$-4 69.0 ± 0% 65.0 ± 0% -5.80% (p=0.008 n=5+5) CompileOnepass/^a(?:b|c)$-4 43.0 ± 0% 40.0 ± 0% -6.98% (p=0.008 n=5+5) CompileOnepass/^a(?:b?|c)$-4 61.0 ± 0% 57.0 ± 0% -6.56% (p=0.008 n=5+5) CompileOnepass/^a(?:b?|c+)$-4 67.0 ± 0% 63.0 ± 0% -5.97% (p=0.008 n=5+5) CompileOnepass/^a(?:bc)+$-4 49.0 ± 0% 46.0 ± 0% -6.12% (p=0.008 n=5+5) CompileOnepass/^a(?:[bcd])+$-4 46.0 ± 0% 43.0 ± 0% -6.52% (p=0.008 n=5+5) CompileOnepass/^a((?:[bcd])+)$-4 53.0 ± 0% 49.0 ± 0% -7.55% (p=0.008 n=5+5) CompileOnepass/^a(:?b|c)*d$-4 109 ± 0% 105 ± 0% -3.67% (p=0.008 n=5+5) CompileOnepass/^.bc(d|e)*$-4 66.0 ± 0% 62.0 ± 0% -6.06% (p=0.008 n=5+5) CompileOnepass/^loooooooooooooooooo...-4 1.10k ± 0% 1.09k ± 0% -0.91% (p=0.008 n=5+5) Fixes #19735 Change-Id: Ic68503aaa08e42fafcf7e11cf1f584d674f5ea7b Reviewed-on: https://go-review.googlesource.com/38750Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
It is explicitly assigned in each of the assemblers as needed. I plan to remove Cursym entirely eventually, but this is a helpful intermediate step. Passes toolstash-check -all. Updates #15756 Change-Id: Id7ddefae2def439af44d03053886ca8cc935731f Reviewed-on: https://go-review.googlesource.com/38727 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Mar, 2017 11 commits
-
-
Josh Bleecher Snyder authored
It is insufficiently canonical; see the discussion at issue 19719. Fixes #19719 Change-Id: I0559ff3b1b39d7bc4b446d104f36fdf8ce3da50e Reviewed-on: https://go-review.googlesource.com/38722 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Josh Bleecher Snyder authored
This eliminates references to lineno and other globals from ssa conversion. Passes toolstash-check. Updates #15756 Change-Id: I9792074fab0036b42f454b79139d0b27db913fb5 Reviewed-on: https://go-review.googlesource.com/38721 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
wei xiao authored
Fixes: #18070 Also added a test in: cmd/asm/internal/asm/testdata/arm64.s Change-Id: Icc43ff7383cc06b8eaccabd9ff0aefa61c4ecb88 Reviewed-on: https://go-review.googlesource.com/33595 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Josh Bleecher Snyder authored
Remove the global obj.Link.Curp. In asmz.go, replace the only use by passing it as an argument. In asm0.go and asm9.go, it was written but never read. In asm5.go and asm7.go, thread it through as an argument. Passes toolstash-check -all. Updates #15756 Change-Id: I1a0faa89e768820f35d73a8b37ec8088d78d15f7 Reviewed-on: https://go-review.googlesource.com/38715 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Fold the printing of the offending instruction into the neighboring Diag call, if it is not already present. Change-Id: I310f1479e16a4d2a24ff3c2f7e2c60e5e2015c1b Reviewed-on: https://go-review.googlesource.com/38714 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
The result from CFBundleCopyResourceURL is owned by the caller. This CL adds the necessary CFRelease to release it after use. Fixes #19722 Change-Id: I7afe22ef241d21922a7f5cef6498017e6269a5c3 Reviewed-on: https://go-review.googlesource.com/38639 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Josh Bleecher Snyder authored
The global encbuf helped avoid allocations. It is incompatible with a concurrent backend. To avoid a performance regression while removing it, introduce two optimizations. First, re-use a buffer in dwarf.PutFunc. Second, avoid a buffer entirely when the int being encoded fits in seven bits, which is about 75% of the time. Passes toolstash-check. Updates #15756 name old alloc/op new alloc/op delta Template 40.6MB ± 0% 40.6MB ± 0% -0.08% (p=0.001 n=8+9) Unicode 29.9MB ± 0% 29.9MB ± 0% ~ (p=0.068 n=8+10) GoTypes 116MB ± 0% 116MB ± 0% +0.05% (p=0.043 n=10+9) SSA 864MB ± 0% 864MB ± 0% +0.01% (p=0.010 n=10+9) Flate 25.8MB ± 0% 25.8MB ± 0% ~ (p=0.353 n=10+10) GoParser 32.2MB ± 0% 32.2MB ± 0% ~ (p=0.353 n=10+10) Reflect 80.2MB ± 0% 80.2MB ± 0% ~ (p=0.165 n=10+10) Tar 27.0MB ± 0% 26.9MB ± 0% ~ (p=0.143 n=10+10) XML 42.8MB ± 0% 42.8MB ± 0% ~ (p=0.400 n=10+9) name old allocs/op new allocs/op delta Template 398k ± 0% 397k ± 0% -0.20% (p=0.002 n=8+9) Unicode 320k ± 0% 321k ± 1% ~ (p=0.122 n=8+10) GoTypes 1.16M ± 0% 1.17M ± 0% ~ (p=0.053 n=10+9) SSA 7.65M ± 0% 7.65M ± 0% ~ (p=0.122 n=10+8) Flate 240k ± 1% 240k ± 1% ~ (p=0.243 n=10+9) GoParser 322k ± 1% 322k ± 1% ~ (p=0.481 n=10+10) Reflect 1.00M ± 0% 1.00M ± 0% ~ (p=0.211 n=9+10) Tar 256k ± 0% 255k ± 1% ~ (p=0.052 n=10+10) XML 400k ± 1% 400k ± 0% ~ (p=0.631 n=10+10) Change-Id: Ia39d9de09232fdbfc9c9cec14587bbf6939c9492 Reviewed-on: https://go-review.googlesource.com/38713 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
If the user created an httptest.Server directly without using a constructor it won't have the new unexported 'client' field. So don't assume it's non-nil. Fixes #19729 Change-Id: Ie92e5da66cf4e7fb8d95f3ad0f4e3987d3ae8b77 Reviewed-on: https://go-review.googlesource.com/38710 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com>
-
Austin Clements authored
We reused the old C stack check mechanism for the implementation of //go:systemstack, so when we execute a //go:systemstack function on a user stack, the system fails by calling morestackc. However, morestackc's message still talks about "executing C code". Fix morestackc's message to reflect its modern usage. Change-Id: I7e70e7980eab761c0520f675d3ce89486496030f Reviewed-on: https://go-review.googlesource.com/38572 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Elias Naur authored
On Android, the thread local offset is found by looping through memory starting at the TLS base address. The search is limited to PTHREAD_KEYS_MAX, but issue 19472 made it clear that in some cases, the slot is located further from the TLS base. The limit is merely a sanity check in case our assumptions about the thread-local storage layout are wrong, so this CL raises it to 384, which is enough for the test case in issue 19472. Fixes #19472 Change-Id: I89d1db3e9739d3a7fff5548ae487a7483c0a278a Reviewed-on: https://go-review.googlesource.com/38636 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Elias Naur authored
The proto_test tests are failing on NetBSD: https://build.golang.org/log/a3a577144ac48c6ef8e384ce6a700ad30549fb78 the failures seem similar to previous failures on Android: https://build.golang.org/log/b5786e0cd6d5941dc37b6a50be5172f6b99e22f0 The Android failures where fixed by CL 37896. This CL is an attempt to fix the NetBSD failures with a similar fix. Change-Id: I3834afa5b32303ca226e6a31f0f321f66fef9a3f Reviewed-on: https://go-review.googlesource.com/38637Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Mar, 2017 7 commits
-
-
Josh Bleecher Snyder authored
Follow-up to CL 38668. Passes toolstash-check -all. Change-Id: I78a62509c610b5184b5e7ef2c4aa146fc8038840 Reviewed-on: https://go-review.googlesource.com/38670 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Josh Bleecher Snyder authored
Follow-up to CL 38446. Passes toolstash-check -all. Change-Id: I04cadc058cbaa5f396136502c574e5a395a33276 Reviewed-on: https://go-review.googlesource.com/38669 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
These fields are used to encode a single instruction. Add them to AsmBuf, which is also per-instruction, and which is not global. Updates #15756 Change-Id: I0e5ea22ffa641b07291e27de6e2ff23b6dc534bd Reviewed-on: https://go-review.googlesource.com/38668 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Thread it through as an argument instead of using a global. Passes toolstash-check -all. Updates #15756 Change-Id: Ia8c6ce09b43dbb2e6c7d889ded8dbaeb5366048d Reviewed-on: https://go-review.googlesource.com/38667 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Empirically, p == ctxt.Curp here. A scan of (the thousands of lines of) asm6.go shows no clear opportunity for them to diverge. Passes toolstash-check -all. Updates #15756 Change-Id: I9f5ee9585a850fbe24be3b851d8fdc2c966c65ce Reviewed-on: https://go-review.googlesource.com/38665 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
We don't need them any more since #15837 was fixed. Fixes #19718 Change-Id: I13e46c62b321b2c9265f44c977b63bfb23163ca2 Reviewed-on: https://go-review.googlesource.com/38664 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
The x86 assembler requires a buffer to build variable-length instructions. It used to be an obj.Link field. That doesn't play nicely with concurrent assembly. Move the AsmBuf type to the x86 package, where it belongs anyway, and make it a local variable. Passes toolstash-check -all. No compiler performance impact. Updates #15756 Change-Id: I8014e52145380bfd378ee374a0c971ee5bada917 Reviewed-on: https://go-review.googlesource.com/38663 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 25 Mar, 2017 7 commits
-
-
Josh Bleecher Snyder authored
Prior to this CL, instinit was called as needed. This does not work well in a concurrent backend. Initialization is very cheap; do it on startup instead. Passes toolstash-check -all. No compiler performance impact. Updates #15756 Change-Id: Ifa5e82e8abf4504435e1b28766f5703a0555f42d Reviewed-on: https://go-review.googlesource.com/38662 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel Odeke authored
Ensure that we have a test for when the compiler encounters a type switch on a non-interface value. Change-Id: Icb222f986894d0190e1241ca65396b4950e7d14f Reviewed-on: https://go-review.googlesource.com/38661Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Now that we have consistent use of xOrNil parse methods, we don't need a special missing_statement singleton to distinguish between missing actually statements and other errors (which have returned nil before). For #19663. Change-Id: I8364f1441bdf8dd966bcd6d8219b2a42d6b88abd Reviewed-on: https://go-review.googlesource.com/38656 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
- parser creates sensible nodes in case of syntax errors instead of nil - a new BadExpr node is used in places where we can't do better - fixed error message for incorrect type switch guard - minor cleanups Fixes #19663. Change-Id: I028394c6db9cba7371f0e417ebf93f594659786a Reviewed-on: https://go-review.googlesource.com/38653 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
ONAME, OLITERAL, and OTYPE nodes can be shared between functions. In a concurrent backend, such nodes might be walked concurrently with being read in other functions. Arrange for them to be unmodified by walk. This is a follow-up to CL 38609. Passes toolstash-check. Updates #15756 Change-Id: I03ff1d2c0ad81dafac3fd55caa218939cf7c0565 Reviewed-on: https://go-review.googlesource.com/38655 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
Updates #15756 Change-Id: Id8d65ca9a3f1a7f9ea43e26cdd5e7d3befef8ba0 Reviewed-on: https://go-review.googlesource.com/38593 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Concurrent compilation requires providing an explicit position and curfn to temp. This implementation of tempAt temporarily continues to use the globals lineno and Curfn, so as not to collide with mdempsky's work for #19683 eliminating the Curfn dependency from func nod. Updates #15756 Updates #19683 Change-Id: Ib3149ca4b0740e9f6eea44babc6f34cdd63028a9 Reviewed-on: https://go-review.googlesource.com/38592 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
- 24 Mar, 2017 8 commits
-
-
Kenny Grant authored
If go doesn't have permission to run strace, this test hangs while waiting for strace to run. Instead try invoking strace with Run() first - on fail skip and report error, otherwise run the test normally using strace. Also fix link to open mips64 issue in same test. Fixes #9711 Change-Id: Ibbc5fbb143ea6d0f8b6cfdca4b385ef4c8960b3d Reviewed-on: https://go-review.googlesource.com/38633Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
The type switch in walkexpr is giant. Shrink it a little by coalescing identical cases and removing some vertical whitespace. No functional changes. Passes toolstash-check. Change-Id: I7f7efb4faae1f8657dfafac04585172f99d8b37d Reviewed-on: https://go-review.googlesource.com/38652 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Sym.Fsym is used only to avoid adding duplicate entries to funcsyms, but that is easily accomplished by detecting the first lookup vs subsequent lookups of the func sym name. This avoids creating an unnecessary ONAME node during funcsym, which eliminates a dependency in the backend on Curfn and lineno. It also makes the code a lot simpler and clearer. Updates #15756 Passes toolstash-check -all. No compiler performance changes. funcsymname does generate garbage via string concatenation, but it is not called very much, and this CL also eliminates allocation of several Nodes and Names. Change-Id: I7116c78fa39d975b7bd2c65a1d228749cf0dd46b Reviewed-on: https://go-review.googlesource.com/38605Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
Passes toolstash-check -all. Change-Id: Ib9f969e5ecc1537b7eab186dc4fd504a50f800f2 Reviewed-on: https://go-review.googlesource.com/38586 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Clean up code that does interface equality. Avoid doing checks in efaceeq/ifaceeq that we already did before calling those routines. No noticeable performance changes for existing benchmarks. name old time/op new time/op delta EfaceCmpDiff-8 604ns ± 1% 553ns ± 1% -8.41% (p=0.000 n=9+10) Fixes #18618 Change-Id: I3bd46db82b96494873045bc3300c56400bc582eb Reviewed-on: https://go-review.googlesource.com/38606 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: David Chase <drchase@google.com>
-
Matthew Dempsky authored
Change-Id: Icf69862554d0121ec24e3c162d5c48630a03b99a Reviewed-on: https://go-review.googlesource.com/38583Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: I9885606801b9c8fcb62c16d0856025c4e83e658b Reviewed-on: https://go-review.googlesource.com/38650 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
In the future, walk will probably run concurrently with SSA construction. It is possible for walk to be walking a function node that is referred to by another function undergoing SSA construction. In that case, this particular assignment to n.Type is race-y. This assignment is also not necessary; evconst does not change the type of n. Both arguments to evconst must have the same type, and at the end of evconst, n is replaced with n.Left. Remove the assignment, and add a check to ensure that its removal remains correct. Updates #15756 Change-Id: Id95faaff42d5abd76be56445d1d3e285775de8bf Reviewed-on: https://go-review.googlesource.com/38609 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-