mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: remove unneeded indirection
Thanks to package reorganizing, we can remove types.TypeLinkSym by simply having its only callers use reflectdata.TypeLinksym directly. Passes toolstash -cmp. Change-Id: I5bc5dbb6bf0664af43ae5130cfe1f19bd23b2bfe Reviewed-on: https://go-review.googlesource.com/c/go/+/280644 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
171fc6f223
commit
6f30c95048
5 changed files with 3 additions and 31 deletions
|
|
@ -190,9 +190,6 @@ func Main(archInit func(*ssagen.ArchInfo)) {
|
|||
types.PtrSize = ssagen.Arch.LinkArch.PtrSize
|
||||
types.RegSize = ssagen.Arch.LinkArch.RegSize
|
||||
types.MaxWidth = ssagen.Arch.MAXWIDTH
|
||||
types.TypeLinkSym = func(t *types.Type) *obj.LSym {
|
||||
return reflectdata.TypeLinksym(t)
|
||||
}
|
||||
|
||||
typecheck.Target = new(ir.Package)
|
||||
|
||||
|
|
@ -202,9 +199,6 @@ func Main(archInit func(*ssagen.ArchInfo)) {
|
|||
|
||||
base.AutogeneratedPos = makePos(src.NewFileBase("<autogenerated>", "<autogenerated>"), 1, 0)
|
||||
|
||||
types.TypeLinkSym = func(t *types.Type) *obj.LSym {
|
||||
return reflectdata.TypeLinksym(t)
|
||||
}
|
||||
typecheck.Init()
|
||||
|
||||
// Parse input.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue