- 25 Mar, 2017 3 commits
-
-
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 25 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>
-
Keith Randall authored
Fixes #19687 Change-Id: I2e4769b4ec5812506df4ac5dc6bc6a7c5774ecb0 Reviewed-on: https://go-review.googlesource.com/38600 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
Almost never happens in practice. The compiler will generate reasonable code anyway, since assignments involving [0]T never do any work. Fixes #19696 Fixes #19671 Change-Id: I350d2e0c5bb326c4789c74a046ab0486b2cee49c Reviewed-on: https://go-review.googlesource.com/38599 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Updates #15756 Change-Id: I860dd45cae9d851c7844654621bbc99efe7c7f03 Reviewed-on: https://go-review.googlesource.com/38591 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Cherry Zhang authored
The darwin linker for ARM does not allow PC-relative relocation of external symbol in text section. Work around it by accessing it indirectly: putting its address in a global variable (which is not external), and accessing through that variable. Fixes #19684. Change-Id: I41361bbb281b5dbdda0d100ae49d32c69ed85a81 Reviewed-on: https://go-review.googlesource.com/38596 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Elias Naur <elias.naur@gmail.com>
-
Marcel van Lohuizen authored
Custom logic from request.go has been removed. Created by running: “go run gen.go -core” from x/text at fc7fa097411d30e6708badff276c4c164425590c. Fixes golang/go#17268 Change-Id: Ie440d6ae30288352283d303e5126e5837f11bece Reviewed-on: https://go-review.googlesource.com/37111 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alexandru Moșoi authored
We already handle n << (uint64(c)&63). This change also handles n << (uint8(c)&63) where the SSA compiler promotes the counter to 32 bits. Fixes #19681 Change-Id: I9327d64a994286aa0dbf76eb995578880be6923a Reviewed-on: https://go-review.googlesource.com/38550 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
wei xiao authored
Fixes #18069 Also added a test in: cmd/asm/internal/asm/testdata/arm64.s Change-Id: Iee400bda4f30503ea3c1dc5bb8301568f19c92d1 Signed-off-by: Wei Xiao <wei.xiao@arm.com> Reviewed-on: https://go-review.googlesource.com/33594 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
Updates #15756 Change-Id: I5ad87ef44b8ee48e1294820e0b1ab0ec07c480eb Reviewed-on: https://go-review.googlesource.com/38590 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
Pass around the imported package explicitly instead of relying on a global variable. Unfortunately we still need a global variable to communicate to the typechecker that we're in an import, but the semantic load is significantly reduced as it's just a bool, set/reset in a couple of places only. Change-Id: I4ebeae4064eb76ca0c4e2a15e4ca53813f005c29 Reviewed-on: https://go-review.googlesource.com/38595 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
First step towards removing global var importpkg. Change-Id: Ifdda7c295e5720a7ff2da9baea17f03f190d48fa Reviewed-on: https://go-review.googlesource.com/38594 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alex Brainman authored
Go uses CommandLineToArgV from shell32.dll to parse command line parameters. But shell32.dll is slow to load. Implement Windows command line parsing in Go. This should make starting Go programs faster. I can see these speed ups for runtime.BenchmarkRunningGoProgram on my Windows 7 amd64: name old time/op new time/op delta RunningGoProgram-2 11.2ms ± 1% 10.4ms ± 2% -6.63% (p=0.000 n=9+10) on my Windows XP 386: name old time/op new time/op delta RunningGoProgram-2 19.0ms ± 3% 12.1ms ± 1% -36.20% (p=0.000 n=10+10) on @egonelbre Windows 10 amd64: name old time/op new time/op delta RunningGoProgram-8 17.0ms ± 1% 15.3ms ± 2% -9.71% (p=0.000 n=10+10) This CL is based on CL 22932 by John Starks. Fixes #15588. Change-Id: Ib14be0206544d0d4492ca1f0d91fac968be52241 Reviewed-on: https://go-review.googlesource.com/37915Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 23 Mar, 2017 12 commits
-
-
Matthew Dempsky authored
Collapse funcHeader into funcDecl. Initialize pragmas earlier. Move empty / non-empty body errors closer to fun.Body handling. Switch some yyerror to yyerrorl. Change-Id: I71fb7a3c0b77d656af560e4d88da894ba6183826 Reviewed-on: https://go-review.googlesource.com/38475Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I5daeb8f00044c86bb10510afbc6886898e61ba15 Reviewed-on: https://go-review.googlesource.com/38570 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
Change-Id: I21e3abcfd1859f933f55fe875476dec07e43b038 Reviewed-on: https://go-review.googlesource.com/38466 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Michael Fraenkel authored
When a map or slice is used as a return type create an empty value rather than a nil value. Fixes #19588 Change-Id: I577fd74956172329745d614ac37d4db8f737efb8 Reviewed-on: https://go-review.googlesource.com/38474 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Verified that BenchmarkBitLen time went down from 2.25 ns/op to 0.65 ns/op an a 2.3 GHz Intel Core i7, before removing that benchmark (now covered by math/bits benchmarks). Change-Id: I3890bb7d1889e95b9a94bd68f0bdf06f1885adeb Reviewed-on: https://go-review.googlesource.com/38464 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
This reverts commit b1b4f671. Reason for revert: Broke the build. Change-Id: I5c99779896e39137c93c77d016ce683c872a69d7 Reviewed-on: https://go-review.googlesource.com/38532Reviewed-by: Josh Bleecher Snyder <josharian@gmail.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. Change-Id: Ic1578ca014610197cfe54a9f4d044d122a7217e8 Reviewed-on: https://go-review.googlesource.com/38469 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
Change-Id: I9e52a2c52b754568412d719b415f91a998d247fe Reviewed-on: https://go-review.googlesource.com/38467 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: If5eabd622700a6b82dc4961ae9174c9d907eedb7 Reviewed-on: https://go-review.googlesource.com/38465 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
In livenessepilogue, if we save liveness information for instructions before updating liveout, we can avoid an extra bitvector temporary and some extra copying around. Passes toolstash-check -all. Change-Id: I10d5803167ef3eba2e9e95094adc7e3d33929cc7 Reviewed-on: https://go-review.googlesource.com/38408Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Ronald G. Minnich authored
In some newer Linux distros, systemd forces all mount namespaces to be shared, starting at /. This disables the CLONE_NEWNS flag in unshare(2) and clone(2). While this problem is most commonly seen on systems with systemd, it can happen anywhere, due to how Linux namespaces now work. Hence, to create a private mount namespace, it is not sufficient to just set CLONE_NEWS; you have to call mount(2) to change the behavior of namespaces, i.e. mount("none", "/", NULL, MS_REC|MS_PRIVATE, NULL) This is tested and working and we can now correctly start child process with private namespaces on Linux distros that use systemd. The new test works correctly on Ubuntu 16.04.2 LTS. It fails if I comment out the new Mount, and succeeds otherwise. In each case it correctly cleans up after itself. Fixes #19661 Change-Id: I52240b59628e3772b529d9bbef7166606b0c157d Reviewed-on: https://go-review.googlesource.com/38471Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
A -0 constant is the same as 0. Use explicit negative zero for float64 -0.0. Also, fix two test cases that were wrong. Fixes #19673. Change-Id: Ic09775f29d9bc2ee7814172e59c4a693441ea730 Reviewed-on: https://go-review.googlesource.com/38463 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-