aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/link.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2017-04-06 12:51:55 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2017-04-10 16:18:50 +0000
commitdcf643f1fd39f98baa4686c1b3baf5691e5773d3 (patch)
tree7ccee148c83001b942b992d6501f449b43cd906e /src/cmd/internal/obj/link.go
parent62aeb77764dcb5487e6557d207aa19879745e03e (diff)
downloadgo-dcf643f1fd39f98baa4686c1b3baf5691e5773d3.tar.xz
cmd/internal/obj/arm: make assembler concurrency-safe
Move global state from obj.Link to a new function-local state struct arm.ctxt5. This ends up being cleaner than threading all the state through as parameters; there's a lot of it. While we're here, move newprog from a parameter to ctxt5. We reserve the variable name c for ctxt5, so a few local variables named c have been renamed. Instead of lazily initializing deferreturn and Sym_div and friends, initialize them up front. Passes toolstash-check -all. Updates #15756 Change-Id: Ifb4e4b9879e4e1f25e6168d8b7b2a25a3390dc11 Reviewed-on: https://go-review.googlesource.com/39922 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/internal/obj/link.go')
-rw-r--r--src/cmd/internal/obj/link.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go
index fd07851f3b..0c0a9f5bbf 100644
--- a/src/cmd/internal/obj/link.go
+++ b/src/cmd/internal/obj/link.go
@@ -726,17 +726,12 @@ type Link struct {
PosTable src.PosTable
InlTree InlTree // global inlining tree used by gc/inl.go
Imports []string
- Sym_div *LSym
- Sym_divu *LSym
- Sym_mod *LSym
- Sym_modu *LSym
Plan9privates *LSym
Printp *Prog
Blitrl *Prog
Elitrl *Prog
Instoffset int64
Autosize int32
- Armsize int32
Pc int64
DiagFunc func(string, ...interface{})
DebugInfo func(fn *LSym, curfn interface{}) []*dwarf.Var // if non-nil, curfn is a *gc.Node