]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: use string instead of LSym in Pcln
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 3 Apr 2017 14:50:56 +0000 (07:50 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 3 Apr 2017 15:19:47 +0000 (15:19 +0000)
commit26308fb4813377def1391ad4ea383f9178c2d16a
treeb53d88fcddd7983c6e6a6e5bcc07dd279eb053c7
parent719c7b03ba5d8bdea937a6b21564fa82539d3661
cmd/internal/obj: use string instead of LSym in Pcln

In a concurrent backend, Ctxt.Lookup will need some
form of concurrency protection, which will make it
more expensive.

This CL changes the pcln table builder to track
filenames as strings rather than LSyms.
Those strings are then converted into LSyms
at the last moment, for writing the object file.

This CL removes over 85% of the calls to Ctxt.Lookup
in a run of make.bash.

Passes toolstash-check.

Updates #15756

Change-Id: I3c53deff6f16f2643169f3bdfcc7aca2ca58b0a4
Reviewed-on: https://go-review.googlesource.com/39291
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/obj/line.go
src/cmd/internal/obj/line_test.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/objfile.go
src/cmd/internal/obj/pcln.go