After CL 436435 chain, the only case left where we create an ONAME node
with nil Func is interface method from imported package.
Change-Id: I9d9144916d01712283f2b116973f88965715fea3
Reviewed-on: https://go-review.googlesource.com/c/go/+/468816
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
if n.Selection.Nname != nil {
// TODO(austin): Nname is nil for interface method
// expressions (I.M), so we can't attach a Func to
- // those here. reflectdata.methodWrapper generates the
- // Func.
+ // those here.
fn.Func = n.Selection.Nname.(*Name).Func
}
return fn
flags bitset16
DictIndex uint16 // index of the dictionary entry describing the type of this variable declaration plus 1
sym *types.Sym
- Func *Func // TODO(austin): nil for I.M, eqFor, hashfor, and hashmem
+ Func *Func // TODO(austin): nil for I.M
Offset_ int64
val constant.Value
Opt interface{} // for use by escape analysis
// callTargetLSym returns the correct LSym to call 'callee' using its ABI.
func callTargetLSym(callee *ir.Name) *obj.LSym {
if callee.Func == nil {
- // TODO(austin): This happens in a few cases of
- // compiler-generated functions. These are all
- // ABIInternal. It would be better if callee.Func was
- // never nil and we didn't need this case.
+ // TODO(austin): This happens in case of interface method I.M from imported package.
+ // It's ABIInternal, and would be better if callee.Func was never nil and we didn't
+ // need this case.
return callee.Linksym()
}