As the document of Sym.Linksym said, we replace
reflectdata.TypeSym(t).Linksym() with reflectdata.TypeLinksym(t).
Change-Id: I578eb159e552e60cd05d2aa1560f91797a6629ef
GitHub-Last-Rev:
d096cba8f08506d7c5248dbf0179e5aef77e8f65
GitHub-Pull-Request: golang/go#66088
Reviewed-on: https://go-review.googlesource.com/c/go/+/568715
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
typeAssertGen++
c := rttype.NewCursor(lsym, 0, rttype.TypeAssert)
c.Field("Cache").WritePtr(typecheck.LookupRuntimeVar("emptyTypeAssertCache"))
- c.Field("Inter").WritePtr(reflectdata.TypeSym(target).Linksym())
+ c.Field("Inter").WritePtr(reflectdata.TypeLinksym(target))
c.Field("CanFail").WriteBool(canFail)
objw.Global(lsym, int32(rttype.TypeAssert.Size()), obj.LOCAL)
lsym.Gotype = reflectdata.TypeLinksym(rttype.TypeAssert)
c.Field("NCases").WriteInt(int64(len(interfaceCases)))
array, sizeDelta := c.Field("Cases").ModifyArray(len(interfaceCases))
for i, c := range interfaceCases {
- array.Elem(i).WritePtr(reflectdata.TypeSym(c.typ.Type()).Linksym())
+ array.Elem(i).WritePtr(reflectdata.TypeLinksym(c.typ.Type()))
}
objw.Global(lsym, int32(rttype.InterfaceSwitch.Size()+sizeDelta), obj.LOCAL)
// The GC only needs to see the first pointer in the structure (all the others