- 04 Mar, 2015 15 commits
-
-
Robert Griesemer authored
Shifts are trivially implemented by combining Float.MantExp and Float.SetMantExp. Change-Id: Ia2fb49297d8ea7aa7d64c8b1318dc3dc7c8af2f7 Reviewed-on: https://go-review.googlesource.com/6671Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
This change represents Accuracy as a bit pattern rather than an ordered value; with a new value Undef which is both Below and Above. Change-Id: Ibb96294c1417fb3cf2c3cf2374c993b0a4e106b3 Reviewed-on: https://go-review.googlesource.com/6650Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Change-Id: I9a6ebb747d5b9756c214bdeb19f60820602d7a24 Reviewed-on: https://go-review.googlesource.com/6340Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
This change introduces NaNs (for situations like Inf-Inf, etc.). The implementation is incomplete (the four basic operations produce a NaN if any of the operands is an Inf or a NaN); and some operations produce incorrect accuracy for NaN arguments. These are known bugs which are documented. Change-Id: Ia88841209e47930681cef19f113e178f92ceeb33 Reviewed-on: https://go-review.googlesource.com/6540Reviewed-by: Alan Donovan <adonovan@google.com>
-
Russ Cox authored
These benchmarks show the effect of the combination of this change and Rick's pending CL 6665. Code with interior pointers is helped much more than code without, but even code without doesn't suffer too badly. benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 6989407768 6851728175 -1.97% BenchmarkFannkuch11 4416250775 4405762558 -0.24% BenchmarkFmtFprintfEmpty 134 130 -2.99% BenchmarkFmtFprintfString 491 402 -18.13% BenchmarkFmtFprintfInt 430 420 -2.33% BenchmarkFmtFprintfIntInt 748 663 -11.36% BenchmarkFmtFprintfPrefixedInt 602 534 -11.30% BenchmarkFmtFprintfFloat 728 699 -3.98% BenchmarkFmtManyArgs 2528 2507 -0.83% BenchmarkGobDecode 17448191 17749756 +1.73% BenchmarkGobEncode 14579824 14370183 -1.44% BenchmarkGzip 656489990 652669348 -0.58% BenchmarkGunzip 141254147 141099278 -0.11% BenchmarkHTTPClientServer 94111 93738 -0.40% BenchmarkJSONEncode 36305013 36696440 +1.08% BenchmarkJSONDecode 124652000 128176454 +2.83% BenchmarkMandelbrot200 6009333 5997093 -0.20% BenchmarkGoParse 7651583 7623494 -0.37% BenchmarkRegexpMatchEasy0_32 213 213 +0.00% BenchmarkRegexpMatchEasy0_1K 511 494 -3.33% BenchmarkRegexpMatchEasy1_32 186 187 +0.54% BenchmarkRegexpMatchEasy1_1K 1834 1827 -0.38% BenchmarkRegexpMatchMedium_32 427 412 -3.51% BenchmarkRegexpMatchMedium_1K 154841 153086 -1.13% BenchmarkRegexpMatchHard_32 7473 7478 +0.07% BenchmarkRegexpMatchHard_1K 233587 232272 -0.56% BenchmarkRevcomp 918797689 944528032 +2.80% BenchmarkTemplate 167665081 167773121 +0.06% BenchmarkTimeParse 631 636 +0.79% BenchmarkTimeFormat 672 666 -0.89% Change-Id: Ia923de3cdb3993b640fe0a02cbe2c7babc16f32c Reviewed-on: https://go-review.googlesource.com/6782Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Matthew Dempsky authored
Gc already calculates n as an int, so converting to int64 to call growslice doesn't serve any purpose except to emit slightly larger code on 32-bit platforms. Passing n as an int shrinks godoc's text segment by 8kB (9472633 => 9464133) when building for ARM. Change-Id: Ief9492c21d01afcb624d3f2a484df741450b788d Reviewed-on: https://go-review.googlesource.com/6231Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
SHRQ CX, DX:AX is changing to SHRQ CX, AX, DX. This is the first step: using SHRQ From=CX, From3=AX, To=DX as the preferred encoding. Once the assemblers and 6g have been updated, support for the old encoding can be removed. Change-Id: Ie603fb8ac25a6df78e42f7ddcae078a7684a7c26 Reviewed-on: https://go-review.googlesource.com/6693Reviewed-by: Rob Pike <r@golang.org>
-
Dmitry Vyukov authored
The unbounded list-based defer pool can grow infinitely. This can happen if a goroutine routinely allocates a defer; then blocks on one P; and then unblocked, scheduled and frees the defer on another P. The scenario was reported on golang-nuts list. We've been here several times. Any unbounded local caches are bad and grow to infinite size. This change introduces central defer pool; local pools become fixed-size with the only purpose of amortizing accesses to the central pool. Freedefer now executes on system stack to not consume nosplit stack space. Change-Id: I1a27695838409259d1586a0adfa9f92bccf7ceba Reviewed-on: https://go-review.googlesource.com/3967Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
-
Dmitry Vyukov authored
The unbounded list-based sudog cache can grow infinitely. This can happen if a goroutine is routinely blocked on one P and then unblocked and scheduled on another P. The scenario was reported on golang-nuts list. We've been here several times. Any unbounded local caches are bad and grow to infinite size. This change introduces central sudog cache; local caches become fixed-size with the only purpose of amortizing accesses to the central cache. The change required to move sudog cache from mcache to P, because mcache is not scanned by GC. Change-Id: I3bb7b14710354c026dcba28b3d3c8936a8db4e90 Reviewed-on: https://go-review.googlesource.com/3742Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
-
Shenghou Ma authored
The original C code is: (x->type & SHIDDEN) ? 2 : 0, however when cleaning up the code for c2go, the ternary operator is rewritten in the exact opposite way. We need a test for this, and that's being tracked as #10070. Fixes #10067. Change-Id: I24a5e021597d8bc44218c6e75bab6446513b76cf Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/6730Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
The creation of liblink and subsequent introduction of more explicit TLS handling broke 6l's (unsupported) -shared flag. This change adds -shared flags to cmd/asm and 6g and changes liblink to generate shared- library compatible instruction sequences when they are passed, and changes 6l to emit the appropriate ELF relocation. A proper fix probably also requires go tool changes. Fixes #9652. Change-Id: I7b7718fe7305c802ac994f4a5c8de68cfbe6c76b Reviewed-on: https://go-review.googlesource.com/4321Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes the linux-amd64-nocgo builder. Regression from https://golang.org/cl/6531 Change-Id: Ibffd1ecfee4a888605ed54196f53956ae42e591c Reviewed-on: https://go-review.googlesource.com/6700Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Nigel Tao authored
Change-Id: I01e328fc3644b679bacf2209c3d7ade9d8bffe53 Reviewed-on: https://go-review.googlesource.com/6551Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
cmd/asm/internal/asm no longer imports obj/$GOARCH, only obj itself. Change-Id: I7c0d107524d833b4a1b6e6a497cca4addadee570 Reviewed-on: https://go-review.googlesource.com/6670Reviewed-by: Russ Cox <rsc@golang.org>
-
Rob Pike authored
The name g is an alias for R10 and R30, respectively. Have Rconv print the alias, for consistency with the input language. Change-Id: Ic3f40037884a0c8de5089d8c8a8efbcdc38c0d56 Reviewed-on: https://go-review.googlesource.com/6630Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 03 Mar, 2015 25 commits
-
-
Brad Fitzpatrick authored
This will enable test sharding over multiple VMs, to speed trybot answers. Update #10029 Change-Id: Ie277c6459bc38005e4d6af14d22effeaa0a4667e Reviewed-on: https://go-review.googlesource.com/6531Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
David Crawshaw authored
Issue #10043 Change-Id: I6ce7f303cd96ac575f7a673dd4a459339382d22e Reviewed-on: https://go-review.googlesource.com/6692Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Crawshaw authored
We now wait until we see the completed prompt from a command before proceeding. This seems to cut down on a spurious error I have seen this afternoon. Change-Id: Ic0a3481d8c265c3c3b4449ec7ac1c2752b85b0b6 Reviewed-on: https://go-review.googlesource.com/6691Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Rob Pike authored
Just a missed case in in the handling of branches. Fixes #10065 Change-Id: I6be054d30bf1f383c12b4c7626abd5f8ae22b22e Reviewed-on: https://go-review.googlesource.com/6631Reviewed-by: Minux Ma <minux@golang.org>
-
Dave Cheney authored
Apply mask fix from 527b478e to ppc64. Change-Id: Iac62228f0f04fa8b138e21d82786026158267aaf Reviewed-on: https://go-review.googlesource.com/6582Reviewed-by: Rob Pike <r@golang.org>
-
Michael Hudson-Doyle authored
c2go produced accurate but complex constant definitions like "ElfSymBindLocal = 0 + iota - 67" which break when any constants are added above them in the list. Change them to explicit values in separate blocks by class. I wrote a little program (using awk) to dump the values of the constants: https://gist.github.com/mwhudson/82f82008279a38ce584e and confirmed that its output before and after this change is the same. Change-Id: Ib4aea4a0d688a16cdcb76af4715d1a97ec0f013c Reviewed-on: https://go-review.googlesource.com/6581 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
- use Bvec, not *Bvec, and bulk allocate backing store - use range loops - put Bvecs in BasicBlock struct instead of indexing into parallel slices Change-Id: I5cb30f50dccb4d38cc18fae422f7f132c52876be Reviewed-on: https://go-review.googlesource.com/6602Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Also change gc.Naddr to return the Addr instead of filling it in. Change-Id: I98a86705d23bee49626a12a042a4d51cabe290ea Reviewed-on: https://go-review.googlesource.com/6601Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
The C version of the compiler had just one hash table, indexed by a (name string, pkg *Pkg) pair. Because we always know the pkg during a lookup, replace the one table with a per-Pkg map[string]*Sym. This also lets us do non-allocating []byte key lookups. This CL *does* change the generated object files. In the old code, export data and init calls were emitted in "hash table order". Now they are emitted in the order in which they were added to the table. Change-Id: I5a48d5c9add996dc43ad04a905641d901522de0b Reviewed-on: https://go-review.googlesource.com/6600Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Strlit was just a poor excuse for a Go string. Use a Go string. In the one case where it was a string-or-nil (Type.Note), use a *string. Zconv was a poor excuse for %q. Use %q. The only important part about Zconv's implementation was that the compiler and linker agreed on the quoting rules. Now they both use %q instead of having two Zconvs. This CL *does* change the generated object files, because the quoted strings end up in symbol names. For example the string "\r\n" used to be named go.string."\r\n" and is now go.string."\x0d\n". Change-Id: I5c0d38e1570ffc495f0db1a20273c9564104a7e8 Reviewed-on: https://go-review.googlesource.com/6519Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
This avoids the argument appearing to escape (due to the fact that proginfo is always called via a function pointer). Change-Id: Ib9351ba18c80fd89e6a1d4f19dea386d4c657337 Reviewed-on: https://go-review.googlesource.com/6518Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Run rsc.io/grind rev 796d0f2 on C->Go conversions. This replaces various awkward := initializations with plain var declarations. Checked bit-for-bit compatibility with toolstash + buildall. Change-Id: I601101d8177894adb9b0e3fb55dfe0ed4f544716 Reviewed-on: https://go-review.googlesource.com/6517Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Crawshaw authored
On one recent job I saw an unexpected SIGSTOP, which I suspect is simply the job timeout. But the lack of other diagnostics suggests lldb just didn't see the "run" command. ----- process handle SIGHUP --stop false --pass true --notify false process handle SIGPIPE --stop false --pass true --notify false process handle SIGUSR1 --stop false --pass true --notify false process handle SIGSEGV --stop false --pass true --notify false process handle SIGBUS --stop false --pass true --notify false breakpoint set -n getwd run (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGHUP true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGPIPE true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGUSR1 true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGSEGV true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGBUS true false false (lldb) Breakpoint 1: where = libsystem_c.dylib`getwd, address = 0x2f7f7294 (lldb) Process 23755 stopped * thread #1: tid = 0x104c02, 0x1febb000 dyld`_dyld_start, stop reason = signal SIGSTOP frame #0: 0x1febb000 dyld`_dyld_start dyld`_dyld_start: -> 0x1febb000: mov r8, sp 0x1febb004: sub sp, sp, #0x10 0x1febb008: bic sp, sp, #0x7 0x1febb00c: ldr r3, [pc, #112] ; _dyld_start + 132 (lldb) go_darwin_arm_exec: timeout (stage br getwd) FAIL compress/gzip 359.226s Change-Id: Ifc2123f5ceaa6d3f9b31bb5cb6e77a2c8ec23818 Reviewed-on: https://go-review.googlesource.com/6613Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
David Crawshaw authored
Change-Id: If2d303caae933eec61634152e5d83faaba591315 Reviewed-on: https://go-review.googlesource.com/6660Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Rob Pike authored
Mishandled the mask for the arm instructions. TBR=rsc Change-Id: Idc596097c0fa61dcacdfb4aca5bc6d0b4fd40eeb Reviewed-on: https://go-review.googlesource.com/6641Reviewed-by: Rob Pike <r@golang.org>
-
David Crawshaw authored
Change-Id: I38d716de9d5a9c1b868641262067d0456d52c86d Reviewed-on: https://go-review.googlesource.com/6612Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
Error detection code copied from syscall, where presumably we actually do it right. Note that we throw the errno away. The runtime doesn't use it. Fixes #10052 Change-Id: I8de77dda6bf287276b137646c26b84fa61554ec8 Reviewed-on: https://go-review.googlesource.com/6571 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Rob Pike authored
Aconv is the pretty-printer for instruction opcodes like AMOVQ. There was one for each architecture. Make the space of A names have a different region for each architecture, much as we did for the registers, so a single global Aconv function can do the work. Each architecture registers its region as a slice of names at a given offset. The global names like CALL and JMP are now defined only once. The A values are used for indexing tables, so make it easy to do the indexing by making the offset maskable. Remove a bunch of now-duplicated architecture-specific code. Change-Id: Ib15647b7145a1c089e21e36543691a19e146b60e Reviewed-on: https://go-review.googlesource.com/6620Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
grind's goto inliner moved a continue and changed its meaning. Oops. Change-Id: Ifa2d3e1427036a606a069f356cd9b586ef22ec84 Reviewed-on: https://go-review.googlesource.com/6610Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I3078385f5e7c92fbf99af7c4ae8918c86b9f86c9 Reviewed-on: https://go-review.googlesource.com/6500Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
David Crawshaw authored
Roll forward of 54efdc59. Better testing of the build on darwin/amd64. There is still some variance between cmd/dist and the Go tool for build tag handling. Change-Id: I105669ae7f90c8c89b3839c04b182cff46be8dde Reviewed-on: https://go-review.googlesource.com/6516 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Roger Peppe authored
Previously, if there was a namespace defined on a a>b tag, the namespace was ignored when printing the parent elements. This fixes that, and also fixes the racy behaviour of printerStack.trim as discussed in https://go-review.googlesource.com/#/c/4152/10 . Fixes #9796. Change-Id: I75f97f67c08bbee151d1e0970f8462dd0f4511ef Reviewed-on: https://go-review.googlesource.com/5910Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
Josh Bleecher Snyder authored
No functional changes. This diff was generated as follows: * Manually edit cmd/internal/gc/go.go to update types and group variables. * Manually edit initialization in cmd/internal/gc/align.go--localized s/1/true. * Manually fix the handling of sign in cmd/internal/gc/walk.go in func bounded (near line 4000). * Manually update go.y and regenerate y.go. * Run gofmt -r many times to do the rest, using https://gist.github.com/josharian/0f61dbb2dff81f938e70. toolstash -cmp on the stdlib comes back green. Change-Id: I19766ed551714e51b325133e7138818d117b3a9a Reviewed-on: https://go-review.googlesource.com/6530Reviewed-by: Russ Cox <rsc@golang.org>
-
Josh Bleecher Snyder authored
This CL makes the switch walking and typechecking code more idiomatic and adds documentation. It also removes all but one global variable. No functional changes. Confirmed with toolstash -cmp on the stdlib. Change-Id: Ic3f38acc66e906edd722498839aeb557863639cf Reviewed-on: https://go-review.googlesource.com/6268Reviewed-by: Russ Cox <rsc@golang.org>
-
Mikio Hara authored
This change fixes a missing case that a routing address contains an invalid address family label but it holds a valid length of address structure. Also makes test robust. Fixes #10041. Change-Id: I2480ba273929e859896697382d1a75b01a116b98 Reviewed-on: https://go-review.googlesource.com/6391Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-