aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/obj.go
AgeCommit message (Collapse)Author
2016-12-01cmd/internal/obj: rename obj.go to line.goMatthew Dempsky
This file is entirely about the implementation of LineHist, and I can never remember which generic filename in cmd/internal/obj has it. Rename to line.go to match the already existing line_test.go. Change-Id: Id01f3339dc550c9759569d5610d808b17bca44d0 Reviewed-on: https://go-review.googlesource.com/33803 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-21cmd/internal/obj: remove unused GOROOT-related fieldsMatthew Dempsky
Change-Id: I6634f70d6bd1a4eced47eda69a2d9b207d222a1b Reviewed-on: https://go-review.googlesource.com/29470 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-03-21cmd/internal/obj: change linkgetline from C to Go func styleJosh Bleecher Snyder
Passes toolstash -cmp. Change-Id: I8725dee490778be9c1fd31990a6b27df9713c3c9 Reviewed-on: https://go-review.googlesource.com/20957 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-23[dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranchKeith Randall
Semi-regular merge from tip to dev.ssa. Change-Id: If7d2269f267bcbc0ecd3a483d349951044470e3f
2016-02-19cmd/internal/obj: hoist fieldtrack code out of x86 back endRuss Cox
Change-Id: I38e59088c37426d914ce2b4dfc79f3d476e06f49 Reviewed-on: https://go-review.googlesource.com/19617 Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-01-07[dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranchKeith Randall
Semi-regular merge from tip into dev.ssa. Change-Id: I1627d7c7e6892cd4f1f5da5f3e07389ff1d677ce
2016-01-04cmd/link: use current GOROOT for source file paths for standard libraryRuss Cox
This CL changes the source file information in the standard library's .a files to say "$GOROOT/src/runtime/chan.go" (with a literal "$GOROOT") instead of spelling out the actual directory. The linker then substitutes the actual $GOROOT (or $GOROOT_FINAL) as appropriate. If people download a binary distribution to an alternate location, following the instructions at https://golang.org/doc/install#install, the code before this CL would end up with source paths pointing to /usr/local/go no matter where the actual sources were. Now the source paths for built binaries will point to the actual sources (hopefully). The source line information in distributed binaries is not affected: those will still say /usr/local/go. But binaries people build themselves (their own programs, not the go distribution programs) will be correct. Fixing this path also fixes the lookup of the runtime-gdb.py file. Fixes #5533. Change-Id: I03729baae3fbd8cd636e016275ee5ad2606e4663 Reviewed-on: https://go-review.googlesource.com/18200 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-08-17[dev.ssa] cmd/compile: fix dev.ssa buildJosh Bleecher Snyder
Broken by CL 13472. Change-Id: Ib65331b291c8fab4238ca91e085779bb954d70e8 Reviewed-on: https://go-review.googlesource.com/13638 Reviewed-by: David Chase <drchase@google.com>
2015-08-13[dev.ssa] cmd/compile: add HTML SSA printerJosh Bleecher Snyder
This is an initial implementation. There are many rough edges and TODOs, which will hopefully be polished out with use. Fixes #12071. Change-Id: I1d6fd5a343063b5200623bceef2c2cfcc885794e Reviewed-on: https://go-review.googlesource.com/13472 Reviewed-by: Keith Randall <khr@golang.org>
2015-05-15cmd/internal/obj: update callers to Linkline{fmt,hist} and removeMatthew Dempsky
Does the TODOs added by https://golang.org/cl/7623. Passes rsc.io/toolstash/buildall. Change-Id: I23913a8f03834640e9795d48318febb3f88c10f9 Reviewed-on: https://go-review.googlesource.com/9160 Reviewed-by: Russ Cox <rsc@golang.org>
2015-03-17cmd/internal/obj: reimplement line historyRuss Cox
In addition to possibly being clearer code, this replaces an O(n) lookup with an O(log n) lookup. Change-Id: I0a574c536a965a87f7ad6dcdcc30f737bc771cd5 Reviewed-on: https://go-review.googlesource.com/7623 Reviewed-by: Rob Pike <r@golang.org>
2015-03-05cmd/internal/ld: cache file name construction in linkgetlineRuss Cox
This avoids repeated allocation and map lookups when constructing the pcln tables. For 6g compiling cmd/internal/gc/*.go this saves about 8% wall time. Change-Id: I6a1a80e278ae2c2a44bd1537015ea7b4e7a4d6ca Reviewed-on: https://go-review.googlesource.com/6793 Reviewed-by: Rob Pike <r@golang.org>
2015-03-05cmd/internal: rewrite fmt.Sprintf("%s", x) to xRuss Cox
Change-Id: I764933f4928bb9d0d119fbfe44a193ce1449b61e Reviewed-on: https://go-review.googlesource.com/6791 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2015-02-23[dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead codeRuss Cox
Ran rsc.io/grind rev 6f0e601 on the source files. The cleanups move var declarations as close to the use as possible, splitting disjoint uses of the var into separate variables. They also remove dead code (especially in func sudoaddable), which helps with the var moving. There's more cleanup to come, but this alone cuts the time spent compiling html/template on my 2013 MacBook Pro from 3.1 seconds to 2.3 seconds. Change-Id: I4de499f47b1dd47a560c310bbcde6b08d425cfd6 Reviewed-on: https://go-review.googlesource.com/5637 Reviewed-by: Rob Pike <r@golang.org>
2015-02-05[dev.cc] cmd/internal/obj: reconvert from liblinkRuss Cox
cmd/internal/obj reconverted using rsc.io/c2go rev 2a95256. - Brings in new, more regular Prog, Addr definitions - Add Prog* argument to oclass in liblink/asm[68].c, for c2go conversion. - Update objwriter for change in TEXT size encoding. - Merge 5a, 6a, 8a, 9a changes into new5a, new6a, new8a, new9a (by hand). - Add +build ignore to cmd/asm/internal/{addr,arch,asm}, cmd/asm. They need to be updated for the changes. - Reenable verifyAsm in cmd/go. - Reenable GOOBJ=2 mode by default in liblink. All architectures build successfully again. Change-Id: I2c845c5d365aa484b570476898171bee657b626d Reviewed-on: https://go-review.googlesource.com/3963 Reviewed-by: Rob Pike <r@golang.org>
2015-01-21[dev.cc] cmd/internal/obj: reconvert from liblinkRuss Cox
Using rsc.io/c2go repo revision 60c9302. - Export a few symbols needed by assemblers. - Implement Getgoroot etc directly, and add Getgoversion. - Removes dependency on Go 1.4 go/build. - Change magic history name <no name> to <pop> The <pop> change requires adjustment to the liblink serializer. Change-Id: If5fb52ac9e91d50805263070b3fc5cc05d8b7632 Reviewed-on: https://go-review.googlesource.com/3141 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2015-01-21[dev.cc] cmd/internal/obj: convert liblink C to GoRuss Cox
This CL adds the real cmd/internal/obj packages. Collectively they correspond to the liblink library. The conversion was done using rsc.io/c2go's run script at rsc.io/c2go repo version 706fac7. This is not the final conversion, just the first working draft. There will be more updates, but this works well enough to use with go tool objwriter and pass all.bash. Change-Id: I9359e835425f995a392bb2fcdbebf29511477bed Reviewed-on: https://go-review.googlesource.com/3046 Reviewed-by: Ian Lance Taylor <iant@golang.org>