- 17 Aug, 2016 1 commit
-
-
Robert Griesemer authored
This removes some scaffolding introduced pre-1.7, introduced to fix an export format bug, and to minimize conflicts with older formats. The currently deployed and recognized format is "v1", so don't worry about other versions. This is a step towards a better scheme for internal export format versioning. For #16244. Change-Id: Ic7cf99dd2a24ad5484cc54aed44fa09332c2cf72 Reviewed-on: https://go-review.googlesource.com/27205Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Robert Griesemer <gri@golang.org>
-
- 16 Aug, 2016 39 commits
-
-
Robert Griesemer authored
Removes the encoding of this bit which was ignored but left behind for 1.7 to minimize pre-1.7 export format changes. See the issue for more details. Fixes #15772. Change-Id: I46cd7a66ad4c6003b78c64295cf3bda503ebf2dd Reviewed-on: https://go-review.googlesource.com/27201 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Jess Frazelle authored
Fixes #16156 Change-Id: I6989db4fd392583a2d490339cefc525b07c11b90 Reviewed-on: https://go-review.googlesource.com/24380Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org>
-
Josh Bleecher Snyder authored
s390x took up the last available chunk of int16 opcodes. There are RISC-V and sparc64 ports in progress out of tree, and there will likely be other architectures. Reduce the opcode space to allow more architectures to fit without increasing to int32. This is the smallest power of two that accomodates all existing architectures. All else being equal, smaller is better--smaller numbers are easier to generate immediates for and easier on the eyes when debugging. Change-Id: I4d0824b28913892fbd0579d3f90bea34e44c8946 Reviewed-on: https://go-review.googlesource.com/24223 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Robert Griesemer authored
Fixes #15323. Change-Id: I50e996e6fde6b24327cb45dd84da31deef4dcc56 Reviewed-on: https://go-review.googlesource.com/27171 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
We should check whether there is a concurrent writer at the start of every mapiternext, not just in mapaccessK (which is only called during certain map growth situations). Tests turned off by default because they are inherently flaky. Fixes #16278 Change-Id: I8b72cab1b8c59d1923bec6fa3eabc932e4e91542 Reviewed-on: https://go-review.googlesource.com/24749Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Keith Randall authored
ssaMain is no longer needed. Change-Id: I0b77f0bcd482329d73018bd80a6e068e622e191b Reviewed-on: https://go-review.googlesource.com/27190Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Only need to zero-extend to 32 bits and we get the top 32 bits zeroed for free. Only the WQ change actually generates different code. The assembler did this optimization for us in the other two cases. But we might as well do it during SSA so -S output more closely matches the actual generated instructions. Change-Id: I3e4ac50dc4da124014d4e31c86e9fc539d94f7fd Reviewed-on: https://go-review.googlesource.com/23711 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
This CL adds a safety mechanism for changing the number of opcodes available per architecture. A subsequent CL will actually make the change. Change-Id: I6332ed5514f2f153c54d11b7da0cc8a6be1c8066 Reviewed-on: https://go-review.googlesource.com/24222 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates #16737 Change-Id: Ia51fc9b06df43b7c6f7136e90b40362263c20081 Reviewed-on: https://go-review.googlesource.com/27126Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Tamir Duberstein authored
Also includes a minor golint cleanup in the tests. Change-Id: I8c0fc81479e635e7cca18d5c48c28b654afa59d8 Reviewed-on: https://go-review.googlesource.com/25380Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jaana Burcu Dogan authored
Fixes #16719. Change-Id: I20550628814e3454f17d6f8ae8b66cce17f09859 Reviewed-on: https://go-review.googlesource.com/27118Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Fixes #16306 Change-Id: If8e2f411fe9a5a5c198f10765fee7261ba8feaf2 Reviewed-on: https://go-review.googlesource.com/24836 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
This only triggers a few places in the stdlib, but it helps a lot when it does. Before: runtime.mapassign1 t=1 size=2400 args=0x20 locals=0xe0 After: runtime.mapassign1 t=1 size=2352 args=0x20 locals=0xd8 name old time/op new time/op delta MapPop100-8 19.8µs ±11% 18.4µs ± 9% -7.16% (p=0.000 n=20+19) MapPop1000-8 367µs ±17% 335µs ±11% -8.63% (p=0.000 n=19+19) MapPop10000-8 7.29ms ±15% 6.86ms ±12% -5.84% (p=0.020 n=20+20) Change-Id: I9faf32f95a6ba6a6d5d0818eab32cc271e01d10a Reviewed-on: https://go-review.googlesource.com/26666 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Cherry Zhang authored
The frontend rewriting lowers them to runtime calls on 386. It matches explicitly uint32, but missed uint. Fixes #16738. Change-Id: Iece7a45edf74615baca052a53273c208f057636d Reviewed-on: https://go-review.googlesource.com/27085 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Might as well tell the runtime how large the map is going to be. This avoids grow work and allocations while the map is being built. Will wait for 1.8. Fixes #15880 Fixes #16279 Change-Id: I377e3e5ec1e2e76ea2a50cc00810adda20ad0e79 Reviewed-on: https://go-review.googlesource.com/23558 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
Update #16415 Change-Id: I83e0966931ada2f1ed02304685bb45effdd71268 Reviewed-on: https://go-review.googlesource.com/26665 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
This CL teaches SSA to recognize code of the form // b is a boolean value, i is an int of some flavor if b { i = 1 } else { i = 0 } and use b's underlying 0/1 representation for i instead of generating jumps. Unfortunately, it does not work on the obvious code: func bool2int(b bool) int { if b { return 1 } return 0 } This is left for future work. Note that the existing phiopt optimizations also don't work for: func neg(b bool) bool { if b { return false } return true } In the meantime, runtime authors and the like can use: func bool2int(b bool) int { var i int if b { i = 1 } else { i = 0 } return i } This compiles to: "".bool2int t=1 size=16 args=0x10 locals=0x0 0x0000 00000 (x.go:25) TEXT "".bool2int(SB), $0-16 0x0000 00000 (x.go:25) FUNCDATA $0, gclocals·23e8278e2b69a3a75fa59b23c49ed6ad(SB) 0x0000 00000 (x.go:25) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0000 00000 (x.go:32) MOVBLZX "".b+8(FP), AX 0x0005 00005 (x.go:32) MOVBQZX AL, AX 0x0008 00008 (x.go:32) MOVQ AX, "".~r1+16(FP) 0x000d 00013 (x.go:32) RET The extraneous MOVBQZX is #15300. This optimization also helps range and slice. The compiler must protect against pointers pointing to the end of a slice/string. It does this by increasing a pointer by either 0 or 1 * elemsize, based on a condition. This CL optimizes away a jump in that code. This CL triggers 382 times while compiling the standard library. Updating code to utilize this optimization is left for future CLs. Updates #6011 Change-Id: Ia7c1185f8aa223c543f91a3cd6d4a2a09c691c70 Reviewed-on: https://go-review.googlesource.com/22711 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
For #16369. Change-Id: I4c9f5a66b95558adcc1bcface164b9b2b4382d2f Reviewed-on: https://go-review.googlesource.com/24979Reviewed-by: Alan Donovan <adonovan@google.com>
-
David Crawshaw authored
Fixes #16722 Change-Id: I50a0e69d3e79d13bc1860cd983267c3db087a4b8 Reviewed-on: https://go-review.googlesource.com/27119Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Don't fold constant factors into a multiply beyond the capacity of a MULQ instruction (32 bits). Fixes #16733 Change-Id: Idc213c6cb06f7c94008a8cf9e60a9e77d085fd89 Reviewed-on: https://go-review.googlesource.com/27160 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
We already inlined _, ok = e.(T) _, ok = i.(E) _, ok = e.(E) The only ok-only variants not inlined are now _, ok = i.(I) _, ok = e.(I) These call getitab, so are non-trivial. Change-Id: Ie45fd8933ee179a679b92ce925079b94cff0ee12 Reviewed-on: https://go-review.googlesource.com/26658 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Michael Pratt authored
Now that assembler opcodes have their own type, they can have a true stringer, rather than explicit calls to Aconv, which makes for nicer format strings. Change-Id: Ic77f5f8ac38b4e519dcaa08c93e7b732226f7bfe Reviewed-on: https://go-review.googlesource.com/25045 Run-TryBot: Michael Pratt <mpratt@google.com> 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
Pick up a bunch of changes and fixes. Change-Id: If4101f7185d433a4c89096bc786ee5de8eeabac0 Reviewed-on: https://go-review.googlesource.com/27123 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
No functional changes, makes vet happy. Updates #11041 Change-Id: I59f3aba46d19b86d605508978652d76a1fe7ac7b Reviewed-on: https://go-review.googlesource.com/27125 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Makes vet happy. Updates #11041 Change-Id: I23ca413c03ff387359440af8114786cd7880a048 Reviewed-on: https://go-review.googlesource.com/27124 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Fixes (legit) vet warnings. Fix some verb tenses while we're here. Updates #11041 Change-Id: I27e995f55b38f4cf584e97a67b8545e8247e83d6 Reviewed-on: https://go-review.googlesource.com/27122 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Josh Bleecher Snyder authored
Give *recordingConn the correct WriteTo signature to be an io.WriterTo. This makes vet happy. It also means that it'll report errors, which were previously being ignored. Updates #11041 Change-Id: I13f171407d63f4b62427679bff362eb74faddca5 Reviewed-on: https://go-review.googlesource.com/27121 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Caught by vet. Updates #11041 Change-Id: I4dbb2eeaf633eea5976074840064edc2349e01d8 Reviewed-on: https://go-review.googlesource.com/27120 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Josh Bleecher Snyder authored
container/list/list_test.go:274: self-assignment of e1 to e1 container/list/list_test.go:274: self-assignment of e4 to e4 container/list/list_test.go:282: self-assignment of e1 to e1 container/list/list_test.go:286: self-assignment of e1 to e1 container/list/list_test.go:286: self-assignment of e4 to e4 Updates #11041 Change-Id: Ibd90cf6a924e93497908f437b814c3fc82937f4a Reviewed-on: https://go-review.googlesource.com/27114 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Cherry Zhang authored
CL 23393 introduces PAUTOHEAP, and access of PAUTOHEAP variable is rewritten to indirection of a PAUTO variable. Mark this variable non-nil, so this indirection does not introduce extra nil checks. Change-Id: I31853eed5e60238b6c5bc0546e2e9ab340dcddd9 Reviewed-on: https://go-review.googlesource.com/26831 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
For tests, assign to _. For benchmarks, assign to a sink. Updates #11041 Change-Id: I87c5543245c7bc74dceb38902f4551768dd37948 Reviewed-on: https://go-review.googlesource.com/27116 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
We were generating format strings containing a lone %. Vet legitimately complains: cmd/compile/internal/gc/constFold_test.go:339: unrecognized printf verb ' ' The fix doesn't make for very readable code, but it is simple and obviously correct. Updates #11041 Change-Id: I90bd2d1d140887f5229752a279f7e46921472fbb Reviewed-on: https://go-review.googlesource.com/27115 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
Updates #11041 Change-Id: I77e5ca0b61ffc530ee46848721a177867c81d548 Reviewed-on: https://go-review.googlesource.com/25116 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
This is preliminary work to unifying them. Aside from Syscall9, all are identical. Syscall9 has a netbsd/openbsd variant and a dragonfly/freebsd variant. Updates #11041 Change-Id: Ia5ce95d5e9115d4c0492d5e53aa7a4316deafd1f Reviewed-on: https://go-review.googlesource.com/25115 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
This is preliminary work to unifying them. Updates #11041 Change-Id: Ibe83da3d626f1da9e8888e26cedd3af2152b42e6 Reviewed-on: https://go-review.googlesource.com/25114 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
This is preliminary work to unifying the unix amd64 assembly implementations, which is preliminary work to making the assembly vet-friendly. Updates #11041 Change-Id: Ic64985124f8fb86cc08898be2ec7fca972ced4ca Reviewed-on: https://go-review.googlesource.com/25113 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
They were identical. This will allow us to do the TODO at the top of the file only once. Updates #11041 Change-Id: I07aaca27ae46b66b65780082988bdc7546ed534b Reviewed-on: https://go-review.googlesource.com/25112 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
Darwin linker does not support BR26 reloc with non-zero addend. Fixes #16724. Change-Id: I1b5b4dc7159141bde3e273490f435c08c583afaf Reviewed-on: https://go-review.googlesource.com/27081 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Brad Fitzpatrick authored
If the server failed on us before we even tried to write any bytes, it's safe to retry the request on a new connection, regardless of the HTTP method/idempotence. Fixes #15723 Change-Id: I25360f82aac530d12d2b3eef02c43ced86e62906 Reviewed-on: https://go-review.googlesource.com/27117Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-