]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: refactor Linksym creation
authorMatthew Dempsky <mdempsky@google.com>
Sun, 17 Jan 2021 10:38:41 +0000 (02:38 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 19 Jan 2021 02:41:42 +0000 (02:41 +0000)
commit4a4212c0e59dee4458be2f5c85262e54f127c500
tree77ec7dd6539ebd89c751fbcc8278812b9e1922e1
parent4f5c603c0f4375d7612feedfd4d5bef41a4060ee
[dev.regabi] cmd/compile: refactor Linksym creation

Currently there's a lot of logic within package types for creating
Linksyms. This CL pulls it out into base, where it can be more easily
reused by other compiler code that shouldn't need to depend on package
types.

Package base probably isn't the best place for this, but it's
convenient because it's a package that types already depends on. It's
also where the Ctxt object lives, which these functions depend upon.

Passes toolstash -cmp w/ -gcflags=all=-abiwrap.

Change-Id: I50d8b7e4596955205036969eab24d7dab053b363
Reviewed-on: https://go-review.googlesource.com/c/go/+/284231
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/base/base.go
src/cmd/compile/internal/base/link.go [new file with mode: 0644]
src/cmd/compile/internal/dwarfgen/dwarf.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/ssagen/abi.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/staticdata/data.go
src/cmd/compile/internal/typecheck/syms.go
src/cmd/compile/internal/types/sym.go