- 28 Mar, 2017 1 commit
-
-
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 14 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>
-
Robert Griesemer authored
Avoid construction of incorrect syntax trees in presence of errors. For #19663. Change-Id: I43025a3cf0fe02cae9a57e8bb9489b5f628c3fd7 Reviewed-on: https://go-review.googlesource.com/38604 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Filip Gruszczyński authored
The improvementis achieved in encoding/gob/decode.go decodeMap by allocate keyInstr and elemInstr only once and pass it to decodeIntoValue, instead of allocating a new instance on every loop cycle. name old time/op new time/op delta DecodeComplex128Slice-8 64.2µs ±10% 62.2µs ± 8% ~ (p=0.686 n=4+4) DecodeFloat64Slice-8 37.1µs ± 3% 36.5µs ± 5% ~ (p=0.343 n=4+4) DecodeInt32Slice-8 33.7µs ± 3% 32.7µs ± 4% ~ (p=0.200 n=4+4) DecodeStringSlice-8 59.7µs ± 5% 57.3µs ± 1% ~ (p=0.114 n=4+4) DecodeInterfaceSlice-8 543µs ± 7% 497µs ± 3% ~ (p=0.057 n=4+4) DecodeMap-8 3.78ms ± 8% 2.66ms ± 2% -29.69% (p=0.029 n=4+4) Updates #19525 Change-Id: Iec5fa4530de76f0a70da5de8a129a567b4aa096e Reviewed-on: https://go-review.googlesource.com/38317Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Kenny Grant authored
This change strips the port in mux.Handler before attempting to match handlers and adds a test for a request with port. CONNECT requests continue to use the original path and port. Fixes #10463 Change-Id: Iff3a2ca2b7f1d884eca05a7262ad6b7dffbcc30f Reviewed-on: https://go-review.googlesource.com/38194Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
The section on map literals mentions constant map keys but doesn't say what happens for equal non-constant map keys - that is covered in the section on evaluation order. Added respective link for clarity. Fixes #19689. Change-Id: If9a5368ba02e8250d4bb0a1d60d0de26a1f37bbb Reviewed-on: https://go-review.googlesource.com/38598Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Simple phi insertion already had a heuristic to check for dead blocks, namely having no predecessors. When we stopped generating code for dead blocks, we eliminated some values contained in more subtle dead blocks, which confused phi insertion. Compensate by beefing up the reachability check. Fixes #19678 Change-Id: I0081e4a46f7ce2f69b131a34a0553874a0cb373e Reviewed-on: https://go-review.googlesource.com/38602 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
CL 37499 allows inlining more functions by ignoring dead code. However, that dead code can contain non-exportable constructs. Teach the exporter not to export dead code. Fixes #19679 Change-Id: Idb1d3794053514544b6f1035d29262aa6683e1e7 Reviewed-on: https://go-review.googlesource.com/38601 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-