- 16 Aug, 2016 32 commits
-
-
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>
-
Josh Bleecher Snyder authored
Follow-up to CL 26661 Change-Id: I67c58d17313094675cf0f30ce50d486818ae0dcb Reviewed-on: https://go-review.googlesource.com/27113 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Gyu-Ho Lee authored
Preallocate keys slice with the length of paxHeaders map to prevent slice growth with append operations. Change-Id: Ic9a927c4eaa775690a4ef912d61dd06f38e11510 Reviewed-on: https://go-review.googlesource.com/23782Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Change-Id: Iedf9000e3bb1fa73b4c3669eae846e85f1f5fdfe Reviewed-on: https://go-review.googlesource.com/24489 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Let the kernel pick a port for testing, and have the server in the child process tell the parent (benchmarking) process the port that was selected. Fixes flakes like seen in https://golang.org/cl/27050 (and previously) Change-Id: Ia2b705dc4152f70e0a5725015bdae09984d09d53 Reviewed-on: https://go-review.googlesource.com/27051 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Jan Mercl authored
Methods of FileSet are documented to be safe for concurrent use by multiple goroutines, so FileSet is protected by a mutex and all its methods use it to prevent concurrent mutations. All methods of File that mutate the respective FileSet, including AddLine, do also lock its mutex, but that does not help when PositionFor is invoked concurrently and reads without synchronization what AddLine mutates. The change adds acquiring a RLock around the racy call of File.position and the respective test. Fixes #16548 Change-Id: Iecaaa02630b2532cb29ab555376633ee862315dd Reviewed-on: https://go-review.googlesource.com/25345Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Carlos C authored
`bytes` and `strings` are pretty similar to each other, this commit brings `strings` examples to its counter-part. Partially addresses #16360 Change-Id: I551320eaa78be9df69012035f1c3333f500e04c9 Reviewed-on: https://go-review.googlesource.com/25062Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Chris Broadfoot authored
Change-Id: Ib17f6643efd49e2bca188c4faa505f79832d18b1 Reviewed-on: https://go-review.googlesource.com/27110Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I8085ed43d63215237a4871cc1e44257132a7f5de Reviewed-on: https://go-review.googlesource.com/27130Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Sina Siadat authored
The heap.Fix function calls both down and up. If the element is moved down, we don't need to call up and we could save a comparison. (per suggestion by Radu Berinde) Fixes #16098. Change-Id: I83a74710e66cf0d274d8c0743338c26f89f31afe Reviewed-on: https://go-review.googlesource.com/24273Reviewed-by: Robert Griesemer <gri@golang.org>
-
Michael Hudson-Doyle authored
When dynamically linking, a type symbol's name is replaced with a name based on the SHA1 of the name as type symbol's names can be very long. However, this can make a type's symbol name longer in some cases. So skip it in that case. One of the symbols this changes the treatment of is 'type.string' and that fixes a bug where -X doesn't work when dynamically linking. Fixes #16671 Change-Id: If5269038261b76fb0ec52e25a9c1d64129631e3c Reviewed-on: https://go-review.googlesource.com/26890 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Brad Fitzpatrick authored
We already had special cases for 0 and 1. Add 2 and 3 for now too. To be removed if the compiler is improved later (#6714). This halves the number of allocations and total bytes allocated via common filepath.Join calls, improving filepath.Walk performance. Noticed as part of investigating filepath.Walk in #16399. Change-Id: If7b1bb85606d4720f3ebdf8de7b1e12ad165079d Reviewed-on: https://go-review.googlesource.com/25005Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Generated with: stringer -type AddrType cmd/internal/obj Change-Id: I74509cffab774035c5ca2ac0634638d73dbd33f3 Reviewed-on: https://go-review.googlesource.com/26657 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 still depends on Curfn, but it's progress. Updates #15756 Change-Id: Ic32fe56f44fcfbc023e7668d4dee07f8b47bf3a4 Reviewed-on: https://go-review.googlesource.com/26661 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
This fixes the following vet warnings: go/types/builtins.go:437: arg call for printf verb %s of wrong type: *go/ast.CallExpr go/types/builtins.go:598: arg call for printf verb %s of wrong type: *go/ast.CallExpr Updates #11041 Change-Id: I746d054e8e49b330fbdf961912a98f55dd5f3ff9 Reviewed-on: https://go-review.googlesource.com/26997 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Josh Bleecher Snyder authored
Fixes #16464 Change-Id: Ibf5625c1b5fa3abd18623023f18664e8f81fa45a Reviewed-on: https://go-review.googlesource.com/26996 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Carlos C authored
Fixes #16648 Change-Id: I3ab21ab33ca3f41219de9518ac6a39f49131e5e5 Reviewed-on: https://go-review.googlesource.com/26692Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
This allows the compiler to remove a bounds check. math/big/nat.go:681: index bounds check elided math/big/nat.go:683: index bounds check elided Change-Id: Ieecb89ec5e988761b06764bd671672015cd58e9d Reviewed-on: https://go-review.googlesource.com/26663 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ilya Tocar authored
VPSHUFD should take an unsigned argument to be consistent with PSHUFD. Also fix all usage. Fixes #16499 Change-Id: Ie699c102afed0379445914a251710365b14d89b6 Reviewed-on: https://go-review.googlesource.com/25383 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
It was not responsive to the sizes param. Remove it, and unwind the extra layers. Fixes #16316 Change-Id: I940a57184a1601f52348d4bff8638f3f7462f5cd Reviewed-on: https://go-review.googlesource.com/26995 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Brad Fitzpatrick authored
autopkg == localpkg, so it appears to be a remnant of earlier code. Change-Id: I65b6c074535e877317cbf9f1f35e94890f0ebf14 Reviewed-on: https://go-review.googlesource.com/26662Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
1) Removed mark field from declInfo struct. Instead use a visited map in ordering.go which was the only use place for the mark field. 2) Introduced objSet type for the common map[Object]bool type. 3) Improved comments. Change-Id: I7544e7458d844b0ca08193f11de6238d317eaf2d Reviewed-on: https://go-review.googlesource.com/24153Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
The old algorithm operated on a dependency graph that included all objects (including functions) for simplicity: it was based directly on the dependencies collected for each object during type checking an object's initialization expression. It also used that graph to compute the objects involved in an erroneous initialization cycle. Cycles that consist only of (mutually recursive) functions are permitted in initialization code; so those cycles were silently ignored if encountered. However, such cycles still inflated the number of dependencies a variable might have (due to the cycle), which in some cases lead to the wrong variable being scheduled for initialization before the one with the inflated dependency count. Correcting for the cycle when it is found is too late since at that point another variable may have already been scheduled. The new algorithm computes the initialization dependency graph as before but adds an extra pass during which functions are eliminated from the graph (and their dependencies are "back-propagated"). This eliminates the problem of cycles only involving functions (there are no functions). When a cycle is found, the new code computes the cycle path from the original object dependencies so it can still include functions on the path as before, for the same detailed error message. The new code also more clearly distinguishes between objects that can be in the dependency graph (constants, variables, functions), and objects that cannot, by introducing the dependency type, a new subtype of Object. As a consequence, the dependency graph is smaller. Fixes #10709. Change-Id: Ib58d6ea65cfb279041a0286a2c8e865f11d244eb Reviewed-on: https://go-review.googlesource.com/24131Reviewed-by: Alan Donovan <adonovan@google.com>
-
Brad Fitzpatrick authored
The Darwin-only restriction was because we were late in the Go 1.7 cycle when the test was added. In the process, I noticed Gettimeofday wasn't in the "unimplemented midden heap" section of syscall_nacl.go, despite this line in the original go1.txt: pkg syscall, func Gettimeofday(*Timeval) error So, add it, returning ENOSYS like the others. Change-Id: Id7e02e857b753f8d079bee335c22368734e92254 Reviewed-on: https://go-review.googlesource.com/26772 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Quentin Smith <quentin@golang.org>
-
Hiroshi Ioka authored
Code movement only. If someone finds function 'foo' in "foo_linux.go", they will expect that the Window version of 'foo' exists in "foo_windows.go". Current code doesn't follow this manner. For example, 'sameFile' exists in "file_unix.go", "stat_plan9.go" and "types_windows.go". The CL address that problem by following rules: * readdir family => dir.go, dir_$GOOS.go * stat family => stat.go, stat_$GOOS.go * path-functions => path_$GOOS.go * sameFile => types.go, types_$GOOS.go * process-functions => exec.go, exec_$GOOS.go * hostname => sys.go, sys_$GOOS.go Change-Id: Ic3c64663ce0b2a364d7a414351cd3c772e70187b Reviewed-on: https://go-review.googlesource.com/27035 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Gerrit Code Review authored
-
Keith Randall authored
Merging from dev.ssa back into master. Contains complete SSA backends for arm, arm64, 386, amd64p32. Work in progress for PPC64. Change-Id: Ifd7075e3ec6f88f776e29f8c7fd55830328897fd
-
- 15 Aug, 2016 5 commits
-
-
Chris Broadfoot authored
Change-Id: Ieae5831b35768a625bf735a38f3d938f23f0b77b Reviewed-on: https://go-review.googlesource.com/27057Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Chris Broadfoot authored
Change-Id: Id83e0371b7232b01be83640ef1e47f9026cf2a23 Reviewed-on: https://go-review.googlesource.com/27055Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Chris Broadfoot authored
Fixes #15820. Change-Id: Ia5d5237754e77774a3a6049765eea163911f41c9 Reviewed-on: https://go-review.googlesource.com/25592Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Chase authored
Passes ssa_test. Requires a few new instructions and some scratchpad memory to move data between G and F registers. Also fixed comparisons to be correct in case of NaN. Added missing instructions for run.bash. Removed some FP registers that are apparently "reserved" (but that are also apparently also unused except for a gratuitous multiplication by two when y = x+x would work just as well). Currently failing stack splits. Updates #16010. Change-Id: I73b161bfff54445d72bd7b813b1479f89fc72602 Reviewed-on: https://go-review.googlesource.com/26813 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Cherry Zhang authored
Add more ARM64 optimizations: - use hardware zero register when it is possible. - use shifted ops. The assembler supports shifted ops but not documented, nor knows how to print it. This CL adds them. - enable fast division. This was disabled because it makes the old backend generate slower code. But with SSA it generates faster code. Turn on SSA by default, also adjust tests. Change-Id: I7794479954c83bb65008dcb457bc1e21d7496da6 Reviewed-on: https://go-review.googlesource.com/26950 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
- 11 Aug, 2016 3 commits
-
-
Keith Randall authored
We shouldn't issue instructions like MOVL foo(SB), AX directly from the SSA backend. Instead we should do LEAL foo(SB), AX; MOVL (AX), AX. This simplifies obj logic because now only LEAL needs to be treated specially. The register allocator uses the LEAL to in effect allocate the temporary register required for the shared library thunk calls. Also, the LEALs can now be CSEd. So code like var g int func f() { g += 5 } Requires only one thunk call instead of 2. Change-Id: Ib87d465f617f73af437445871d0ea91a630b2355 Reviewed-on: https://go-review.googlesource.com/26814 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
In position-independent 386 code, loading floating-point constants from the constant pool requires two steps: materializing the address of the constant pool entry (requires calling a thunk) and then loading from that address. Before this CL, the materializing happened implicitly in CX, which clobbered that register. Change-Id: Id094e0fb2d3be211089f299e8f7c89c315de0a87 Reviewed-on: https://go-review.googlesource.com/26811 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
Mostly mirrors ARM, includes: - constant folding - simplification of load, store, extension, and arithmetics - nilcheck removal Change-Id: Iffaa5fcdce100fe327429ecab316cb395e543469 Reviewed-on: https://go-review.googlesource.com/26710 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-