- 12 Apr, 2017 20 commits
-
-
Austin Clements authored
Currently, dist allows GOOS and GOARCH to appear as *any* substring in a file name when selecting source files to go into go_bootstrap. This was necessary prior to Go 1.4, where it needed to match names like "windows.c", but now it's gratuitously different from go/build. This led to a bug chase to figure out why "stubs_nonlinux.go" was not being built on non-Linux OSes. Change shouldbuild to require an "_" before the GOOS and GOARCH in a file name. This is still less strict than go/build, but the behavior is much closer. Change-Id: I580e9344a3c40d57c0721d345e911e8b4f141f5d Reviewed-on: https://go-review.googlesource.com/40435 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Currently CallersFrames expands each PC to a slice of Frames and then iteratively returns those Frames. However, this makes it very difficult to avoid heap allocation: either the Frames slice will be heap allocated, or, if it uses internal scratch space for small slices (as it currently does), the Frames object itself has to be heap allocated. Fix this, at least in the common case, by expanding each PC iteratively. We introduce a new pcExpander type that's responsible for expanding a single PC. This maintains state from one Frame to the next in the same PC. Frames then becomes a wrapper around this responsible for feeding it the next PC when the pcExpander runs out of frames for the current PC. This makes it possible to stack-allocate a Frames object, which will make it possible to use this API for PC expansion from within the runtime itself. Change-Id: I993463945ab574557cf1d6bedbe79ce7e9cbbdcd Reviewed-on: https://go-review.googlesource.com/40434 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Lazar <lazard@golang.org>
-
David du Colombier authored
TestRuntimeTypeDIEs has been added in CL 38350. This test is failing on Plan 9 because executables don't have a DWARF symbol table. Fixes #19944. Change-Id: I121875bfd5f9f02ed668f8fb0686a0edffa2a99d Reviewed-on: https://go-review.googlesource.com/40452 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I5b692eb0586c40f3735a6b9c928e97ffa00a70e6 Reviewed-on: https://go-review.googlesource.com/40471 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Theophanes authored
When a Tx starts a query, prevent returning the connection to the pool until after the query finishes. Fixes #19058 Change-Id: I2c0480d9cca9eeb173b5b3441a5aeed6f527e0ac Reviewed-on: https://go-review.googlesource.com/40400Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
When casting an ideal to complex{64,128}, for example during the evaluation of var a = complex64(0) / 1e-50 we want the compiler to report a division-by-zero error if a divisor would be zero after the cast. We already do this for floats; for example var b = float32(0) / 1e-50 generates a 'division by zero' error at compile time (because float32(1e-50) is zero, and the cast is done before performing the division). There's no such check in the path for complex{64,128} expressions, and no cast is performed before the division in the evaluation of var a = complex64(0) / 1e-50 which compiles just fine. This patch changes the convlit1 function so that complex ideals components (real and imag) are correctly truncated to float{32,64} when doing an ideal -> complex{64, 128} cast. Fixes #11674 Change-Id: Ic5f8ee3c8cfe4c3bb0621481792c96511723d151 Reviewed-on: https://go-review.googlesource.com/37891 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Josh Bleecher Snyder authored
Move it to the x86 package, matching our handling of deferreturn in x86 and arm. While we're here, improve the concurrency safety of both Plan9privates and deferreturn by eagerly initializing them in instinit. Updates #15756 Change-Id: If3b1995c1e4ec816a5443a18f8d715631967a8b1 Reviewed-on: https://go-review.googlesource.com/40408 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Lynn Boger authored
A recent performance improvement for PPC64.rules introduced a regression for the case where the size of a move is <= 8 bytes and the value used in the offset field of the instruction is not aligned correctly for the instruction. In the cases where this happened, the assembler was not detecting the incorrect offset and still generated the instruction even though it was invalid. This fix changes the PPC64.rules for the moves that are now failing to include the correct alignment checks, along some additional testcases for gc/ssa for the failing alignments. I will add a fix to the assembler to detect incorrect offsets in another CL. This fixes #19907 Change-Id: I3d327ce0ea6afed884725b1824f9217cef2fe6bf Reviewed-on: https://go-review.googlesource.com/40290Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by: David Chase <drchase@google.com>
-
Josh Bleecher Snyder authored
It is zeroed pointlessly and never read. Change-Id: I65390501a878f545122ec558cb621b91e394a538 Reviewed-on: https://go-review.googlesource.com/40406 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Lynn Boger authored
Curently the vendor paths are not always searched for imports if the compiler is gccgo. This change generates the vendor paths and adds them with -I as arguments to the gccgo compile. Fixes #15628 Change-Id: I318accbbbd8e6af45475eda399377455a3565880 Reviewed-on: https://go-review.googlesource.com/40432 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
It is only used once and never written to. Switch to a local constant instead. Change-Id: Icdd84e47b81f0de44ad9ed56ab5f4f91df22e6b6 Reviewed-on: https://go-review.googlesource.com/40405 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Josh Bleecher Snyder authored
These are unused after CLs 39922, 40252, 40370, 40371, and 40372. Change-Id: I76f9276c581067a8cb555de761550d960f6e39b8 Reviewed-on: https://go-review.googlesource.com/40404 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Daniel Martí authored
Continues outside of a loop are not allowed. Most of these possibilities were tested in label1.go, but one was missing - a plain continue in a switch/select but no enclosing loop. This used to error with a "continue not in loop" in 1.8, but recently was broken by c03e75e5. In particular, innerloop does not only account for loops, but also for switches and selects. Swap it by bools that track whether breaks and continues should be allowed. While at it, improve the wording of errors for breaks that are not where they should be. Change "loop" by "loop, switch, or select" since they can be used in any of those. And add tests to make sure this isn't broken again. Use a separate func since I couldn't get the compiler to crash on f() itself, possibly due to the recursive call on itself. Fixes #19934. Change-Id: I8f09c6c2107fd95cac50efc2a8cb03cbc128c35e Reviewed-on: https://go-review.googlesource.com/40357 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Hiroshi Ioka authored
Previously, int values of #define macro are retrieved from DWARF via enums. Currently, those values are retrieved from symbol tables. It seems that previous code is unused. Change-Id: Id76c54baa46d6196738ea35aebd5de99b05b9bf8 Reviewed-on: https://go-review.googlesource.com/40072Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alessandro Arzilli authored
The reflect package can be used to create new types at runtime, these types will have runtime._type entries describing them but no entry in debug_info (obviously). A debugger that wanted to print the value of variables with such types will have to read the runtime._type directly, however the "specializations" of runtime._type (runtime.slicetype, runtime.maptype, etc) are not exported to debug_info, besides runtime.interfacetype. All those types (i.e. runtime.slicetype, runtime.maptype, etc) should be exported to debug_info so that debuggers don't have to hard-code their description. Fixes #19602 Change-Id: I086d523a4421a4ed964e16bc3c2274319a98b45b Reviewed-on: https://go-review.googlesource.com/38350Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
Todd Neal authored
Prevent a crash if the same type in two plugins had a recursive definition, either by referring to a pointer to itself or a map existing with the type as a value type (which creates a recursive definition through the overflow bucket type). Fixes #19258 Change-Id: Iac1cbda4c5b6e8edd5e6859a4d5da3bad539a9c6 Reviewed-on: https://go-review.googlesource.com/40292 Run-TryBot: Todd Neal <todd@tneal.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Todd Neal authored
open modified the plugin symbols map while ranging over it. This is normally harmless, except that the operations performed were not idempotent leading to function pointers being corrupted. Fixes #19269 Change-Id: I4b6eb1d45567161412e4a34b41f1ebf647bcc942 Reviewed-on: https://go-review.googlesource.com/40431 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Joel Sing authored
This was unintentionally emptied rather than removed in 9417c022. Change-Id: Ie6fdcf7ef55e58f12e2a2750ab448aa2d9f94d15 Reviewed-on: https://go-review.googlesource.com/40413Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alexander Menzhinsky authored
Fixes #19628 Change-Id: I19baf694c66aaca8e0d95297c97aacb40db24c47 Reviewed-on: https://go-review.googlesource.com/40250Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
Daniel Theophanes authored
Form a new method pattern where *driverConn and release functions are passed into the method. They are named DB.execDC, DB.queryDC, DB.beginDC. This allows more code to be de-duplicated when starting queries. The Stmt creation and management code are untouched. Change-Id: I24c853531e511d8a4bc1f53dd4dbdf968763b4e7 Reviewed-on: https://go-review.googlesource.com/39630 Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 Apr, 2017 16 commits
-
-
Robert Griesemer authored
For details see the discussion on the issue below. RotateLeft functions can now be inlined because the don't panic anymore for negative rotation counts. name old time/op new time/op delta RotateLeft-8 6.72ns ± 2% 1.86ns ± 0% -72.33% (p=0.016 n=5+4) RotateLeft8-8 4.41ns ± 2% 1.67ns ± 1% -62.15% (p=0.008 n=5+5) RotateLeft16-8 4.46ns ± 6% 1.65ns ± 0% -63.06% (p=0.008 n=5+5) RotateLeft32-8 4.50ns ± 5% 1.67ns ± 1% -62.86% (p=0.008 n=5+5) RotateLeft64-8 4.54ns ± 1% 1.85ns ± 1% -59.32% (p=0.008 n=5+5) https://perf.golang.org/search?q=upload:20170411.4 (Measured on 2.3 GHz Intel Core i7 running macOS 10.12.3.) For #18616. Change-Id: I0828d80d54ec24f8d44954a57b3d6aeedb69c686 Reviewed-on: https://go-review.googlesource.com/40394Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Hiroshi Ioka authored
Also reformat tables. Fixes #19889 Change-Id: I05083d2bab8bca46c4e22a415eb9b73513df6994 Reviewed-on: https://go-review.googlesource.com/40071Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
sort.Slice was added in Go 1.8. It's nice to use, and faster than sort.Sort, so it'd be nice to be able to use it in the toolchain. This CL adds obj.SortSlice, which is sort.Slice, but with a slower fallback version for bootstrapping. This CL also includes a single demo+test use. Change-Id: I2accc60b61f8e48c8ab4f1a63473e3b87af9b691 Reviewed-on: https://go-review.googlesource.com/40114 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Carlos Eduardo Seo authored
In the newest AES implementation in asm for ppc64le, this part MOVW $·rcon(SB), PTR should be MOVD $·rcon(SB), PTR since it is loading a doubleword value into PTR. Change-Id: I7e3d6ad87a2237015aeeb30c68fb409a18f2801c Reviewed-on: https://go-review.googlesource.com/40298Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
-
Joel Sing authored
OpenBSD 6.0 and later have support for PT_TLS in ld.so(1). Now that OpenBSD 6.1 has been released, OpenBSD 5.9 is no longer officially supported and Go can start generating PT_TLS for OpenBSD cgo binaries. This also allows us to remove the workarounds in the OpenBSD cgo runtime. This change also removes the environ and progname exports - these are now provided directly by ld.so(1) itself. Fixes #19932 Change-Id: I42e75ef9feb5dcd4696add5233497e3cbc48ad52 Reviewed-on: https://go-review.googlesource.com/40331Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Noticed by Cherry while reviewing CL 40252. The alternative to this is to place t on the stack, like t := obj.Prog{Ctxt: ctxt} However, there are only a couple of places where we manually construct Progs, which is useful. This isn't hot enough code to warrant breaking abstraction layers to avoid an allocation. Passes toolstash-check. Change-Id: I46c79090b60641c90ee977b750ba5c708aca8ecf Reviewed-on: https://go-review.googlesource.com/40373 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
CL 39922 made the arm assembler concurrency-safe. This CL does the same, but for s390x. The approach is similar: introduce ctxtz to hold function-local state and thread it through the assembler as necessary. One race remains after this CL, similar to CL 40252. That race is conceptually unrelated to this refactoring, and will be addressed in a separate CL. Passes toolstash-check -all. Updates #15756 Change-Id: Iabf17aa242b70c0b078c2e85dae3d93a5e512372 Reviewed-on: https://go-review.googlesource.com/40371 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <munday@ca.ibm.com>
-
Josh Bleecher Snyder authored
CL 39922 made the arm assembler concurrency-safe. This CL does the same, but for ppc64. The approach is similar: introduce ctxt9 to hold function-local state and thread it through the assembler as necessary. One race remains after this CL, similar to CL 40252. That race is conceptually unrelated to this refactoring, and will be addressed in a separate CL. Passes toolstash-check -all. Updates #15756 Change-Id: Icc37d9a971bed2184c8e66b1a64f4f2e556dc207 Reviewed-on: https://go-review.googlesource.com/40372 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
CL 39922 made the arm assembler concurrency-safe. This CL does the same, but for arm64. The approach is similar: introduce ctxt7 to hold function-local state and thread it through the assembler as necessary. One race remains after this CL, deep in aclass, in the check that a Prog does not take the address of a TLS variable. That race is conceptually unrelated to this refactoring, and will be addressed in a separate CL. Passes toolstash-check -all. Updates #15756 Change-Id: Icab1ef70008468f9a5b8bf728a77c4520bbcb67d Reviewed-on: https://go-review.googlesource.com/40252 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Josh Bleecher Snyder authored
CL 39922 made the arm assembler concurrency-safe. This CL does the same, but for mips. The approach is similar: introduce ctxt0 to hold function-local state and thread it through the assembler as necessary. One race remains after this CL, similar to CL 40252. That race is conceptually unrelated to this refactoring, and will be addressed in a separate CL. Passes toolstash-check -all. Updates #15756 Change-Id: I2c54a889aa448a4476c9a75da4dd94ef69657b16 Reviewed-on: https://go-review.googlesource.com/40370 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Ben Shi authored
The hardware divider is an optional component of ARMv7. This patch detects whether it is available in runtime and use it or not. 1. The hardware divider is detected at startup and a flag is set/clear according to a perticular bit of runtime.hwcap. 2. Each call of runtime.udiv will check this flag and decide if use the hardware division instruction. A rough test shows the performance improves 40-50% for ARMv7. And the compatibility of ARMv5/v6 is not broken. fixes #19118 Change-Id: Ic586bc9659ebc169553ca2004d2bdb721df823ac Reviewed-on: https://go-review.googlesource.com/37496 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Matthew Dempsky authored
These are never accessed. Change-Id: I45975972d19d1f263f6545c9ed648511501094c6 Reviewed-on: https://go-review.googlesource.com/40315 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Hiroshi Ioka authored
Current code could return a non-nil os.FileInfo even if there is an error. This is a bit incompatible with Stat on other OSes. Change-Id: I37b608da234f957bb89b82509649de78ccc70bbb Reviewed-on: https://go-review.googlesource.com/40330 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
This makes the core Flushplist loop clearer. We may also want to move the Sym initialization much earlier in the compiler (see discussion on CL 40254), for which this paves the way. While we're here, eliminate package log in favor of ctxt.Diag. Passes toolstash-check -all. Updates #15756 Change-Id: Ieaf848d196764a5aa82578b689af7bc6638c385a Reviewed-on: https://go-review.googlesource.com/40313 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
-
Austin Clements authored
Changing mheap_.arena_used requires several steps that are currently repeated multiple times in mheap_.sysAlloc. Consolidate these into a single function. In the future, this will also make it easier to add other auxiliary VM structures. Change-Id: Ie68837d2612e1f4ba4904acb1b6b832b15431d56 Reviewed-on: https://go-review.googlesource.com/40151 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: Ic9be3249e76da7e86cc41baa88935249a94e4a16 Reviewed-on: https://go-review.googlesource.com/40073 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 10 Apr, 2017 4 commits
-
-
Josh Bleecher Snyder authored
This avoids false positives like those found in #19880. Fixes #19880 Change-Id: I583c16cc3c71e7462a72500db9ea2547c468f8c1 Reviewed-on: https://go-review.googlesource.com/40255 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
Extract out some common boiler plate logic. Passes toolstash-check -all. Change-Id: Iddc8a733af8262558f56d13c91d9c27ee0d61330 Reviewed-on: https://go-review.googlesource.com/40253 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Fixes #19911 Change-Id: Ib2b2505fe31ce00c6ffc021a0fe5df510633b44b Reviewed-on: https://go-review.googlesource.com/40251 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Alexander Döring authored
Copy the documentation and example from cmd/go. Fixes #18840. Change-Id: Id8022762b48576fb4031de05287d07a6ed23f480 Reviewed-on: https://go-review.googlesource.com/37440Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-