- 03 Mar, 2015 27 commits
-
-
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>
-
David Crawshaw authored
This reverts commit 54efdc59. Broken on darwin. Change-Id: Ic74275f36d30975263340e2b4045226eae71b16a Reviewed-on: https://go-review.googlesource.com/6514Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
David Crawshaw authored
A future change will include an NSTimeZone hook so we can determine the device's current time zone. Change-Id: Ia4bd6b955e4cb720c518055541b66ff57a4dd303 Reviewed-on: https://go-review.googlesource.com/6511Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
David Crawshaw authored
See golang.org/cl/6511. Change-Id: I2145a42877ed6b78400f29c2ef18969870dab5c3 Reviewed-on: https://go-review.googlesource.com/6512Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Mikio Hara authored
This change removes wrongly added API entries for OpenBSD from the candidate list. Change-Id: Ibadfb9003ced6d3338794e4f3072054e65211e4a Reviewed-on: https://go-review.googlesource.com/6550Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Nigel Tao authored
components. This fixes decoding JPEG images where the component selector is 0. Such images are rare, but not impossible. Change-Id: I6d221bce01cce8cc0440e117543233371782ca22 Reviewed-on: https://go-review.googlesource.com/6421Reviewed-by: Rob Pike <r@golang.org>
-
- 02 Mar, 2015 13 commits
-
-
Rob Pike authored
It is unused and should have been deleted when Rconv was made a global function. Change-Id: Id745dcee6f0769604cabde04887c6d0c94855405 Reviewed-on: https://go-review.googlesource.com/6521Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rahul Chaudhry authored
This is a followup to http://golang.org/cl/6280. clang -pie fails to link misc/cgo/test on freebsd-amd64. Change-Id: I6f9575d6bb579f4d38d70707fb9c92e303e30e6f Reviewed-on: https://go-review.googlesource.com/6520 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Robert Griesemer authored
Change-Id: I2a60ea4a196eef1af5d2aae6cc239c64bddb6fb2 Reviewed-on: https://go-review.googlesource.com/6301Reviewed-by: Alan Donovan <adonovan@google.com>
-
Rahul Chaudhry authored
PIE binaries can be built by the Go compiler in external link mode with extldflags="-pie". These binaries support ASLR (address space layout randomization) when executed on systems with appropriate kernel/dynamic linker support. This CL enables some cgo tests to run with -pie as a sanity check (in addition to the other linker flag combinations they already test). I have tested this functionality more thoroughly by building the full compiler testsuite (test/...) and standard library tests with -pie and executing them remotely on ChromeOS devices for all three linux architectures (linux_amd64, linux_386, and linux_arm). Change-Id: I3f644a72e94c3341f3360dfee58db5ec3a591e26 Reviewed-on: https://go-review.googlesource.com/6280Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
This script is getting very close to complete, and is complex enough that I'd like to get what's there so far reviewed. With it the builder is left failing on eight packages. Two of those involve correcting GOROOT which may need modifications to this script, the others are either a unix sockets bug I have to hunt down or are caused by lldb getting stuck on SIGSEGV, a TODO. Change-Id: I5ff933800167b6764b51ad195da7dcda61d59ff8 Reviewed-on: https://go-review.googlesource.com/6404Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Rob Pike authored
Have the implementations of each architecture declare the one-operand, destination-writing instructions instead of splitting the information between there and asm. Change-Id: I44899435011a4a7a398ed03c0801e9f81cc8c905 Reviewed-on: https://go-review.googlesource.com/6490Reviewed-by: Russ Cox <rsc@golang.org>
-
David Crawshaw authored
Change-Id: I49cda99f81b754e25fad1483de373f7d07d64808 Reviewed-on: https://go-review.googlesource.com/6452Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Broke some tests that assume $GORACE is unset (because it never is). Those tests are arguably wrong, but this is more robust. Change-Id: Id56daa160c9e7e01f301c1386791e410bbd5deef Reviewed-on: https://go-review.googlesource.com/6480Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Crawshaw authored
This is a roll forward of 2adc3bd6. It occurred to me that we will want this code on both darwin/arm and darwin/arm64. Removing _arm from the file name conveniently avoids #10032. Change-Id: I3a96a3e7020907d9307af8f696e26ad55b2060f0 Reviewed-on: https://go-review.googlesource.com/6460Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
Run rsc.io/grind rev a26569f on C->Go conversions. The new change in grind is the inlining of goto targets. If code says 'goto x' and the block starting at label x is unreachable except through that goto and the code can be moved to where the goto is without changing the meaning of its variable names, grind does that move. Simlarly, a goto to a plain return statement turns into that return statement (even if there are other paths to the return statement). Combined, these remove many long-distance gotos, which in turn makes it possible to reduce the scope of more variable declarations. (Because gotos can't jump across declarations, the gotos were keeping the declarations from moving.) Checked bit-for-bit compatibility with toolstash + buildall. Reduces compiler runtime in html/template by about 12%. Change-Id: Id727c0bd7763a61aa22f3daa00aeb8fccbc057a3 Reviewed-on: https://go-review.googlesource.com/6472Reviewed-by: Aram Hăvărneanu <aram@mgk.ro> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Russ Cox authored
There's no point to having them in every GOOS_GOARCH directory, since they are neither GOOS- nor GOARCH-specific. (There used to be other headers that were.) This makes building for additional toolchains easier: no need to run make.bash at all. Fixes #10049. Change-Id: I710ecaafd7a5c8cad85ccd595ea9cb6058f553b3 Reviewed-on: https://go-review.googlesource.com/6471Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Change-Id: I2cae17d3f0d208c7ed1089bc5cb8f81022fcd36e Reviewed-on: https://go-review.googlesource.com/6470Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
Replaced by Ctxt.ByteOrder, which uses the standard binary.ByteOrder type. Change-Id: I06cec0674c153a9ad75ff937f7eb934891effd0b Reviewed-on: https://go-review.googlesource.com/6450Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Rob Pike <r@golang.org>
-