mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: rewrite to use linksym helpers [generated]
Passes toolstash -cmp.
[git-generate]
cd src/cmd/compile/internal/gc
pkgs=$(grep -l -w Linksym ../*/*.go | xargs dirname | grep -v '/gc$' | sort -u)
rf '
ex . '"$(echo $pkgs)"' {
import "cmd/compile/internal/ir"
import "cmd/compile/internal/reflectdata"
import "cmd/compile/internal/staticdata"
import "cmd/compile/internal/types"
avoid reflectdata.TypeLinksym
avoid reflectdata.TypeLinksymLookup
avoid reflectdata.TypeLinksymPrefix
avoid staticdata.FuncLinksym
var f *ir.Func
var n *ir.Name
var s string
var t *types.Type
f.Sym().Linksym() -> f.Linksym()
n.Sym().Linksym() -> n.Linksym()
reflectdata.TypeSym(t).Linksym() -> reflectdata.TypeLinksym(t)
reflectdata.TypeSymPrefix(s, t).Linksym() -> reflectdata.TypeLinksymPrefix(s, t)
staticdata.FuncSym(n.Sym()).Linksym() -> staticdata.FuncLinksym(n)
types.TypeSymLookup(s).Linksym() -> reflectdata.TypeLinksymLookup(s)
}
'
Change-Id: I7a3ae1dcd61bcdf4a29f708ff12f7f80c2b280c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/280640
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
25c613c02d
commit
ec59b197d5
17 changed files with 44 additions and 44 deletions
|
|
@ -104,7 +104,7 @@ func genhash(t *types.Type) *obj.LSym {
|
|||
// For other sizes of plain memory, we build a closure
|
||||
// that calls memhash_varlen. The size of the memory is
|
||||
// encoded in the first slot of the closure.
|
||||
closure := types.TypeSymLookup(fmt.Sprintf(".hashfunc%d", t.Width)).Linksym()
|
||||
closure := TypeLinksymLookup(fmt.Sprintf(".hashfunc%d", t.Width))
|
||||
if len(closure.P) > 0 { // already generated
|
||||
return closure
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ func genhash(t *types.Type) *obj.LSym {
|
|||
break
|
||||
}
|
||||
|
||||
closure := TypeSymPrefix(".hashfunc", t).Linksym()
|
||||
closure := TypeLinksymPrefix(".hashfunc", t)
|
||||
if len(closure.P) > 0 { // already generated
|
||||
return closure
|
||||
}
|
||||
|
|
@ -347,7 +347,7 @@ func geneq(t *types.Type) *obj.LSym {
|
|||
case types.AMEM:
|
||||
// make equality closure. The size of the type
|
||||
// is encoded in the closure.
|
||||
closure := types.TypeSymLookup(fmt.Sprintf(".eqfunc%d", t.Width)).Linksym()
|
||||
closure := TypeLinksymLookup(fmt.Sprintf(".eqfunc%d", t.Width))
|
||||
if len(closure.P) != 0 {
|
||||
return closure
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ func geneq(t *types.Type) *obj.LSym {
|
|||
break
|
||||
}
|
||||
|
||||
closure := TypeSymPrefix(".eqfunc", t).Linksym()
|
||||
closure := TypeLinksymPrefix(".eqfunc", t)
|
||||
if len(closure.P) > 0 { // already generated
|
||||
return closure
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue