Use abi.(*Type).IfaceIndir instead.
Change-Id: I55a1a593d76601fb615d131abcf1b32012741e8c
GitHub-Last-Rev:
14de2a9d673dcd305a850e7b9217949160433488
GitHub-Pull-Request: golang/go#67228
Reviewed-on: https://go-review.googlesource.com/c/go/+/583756
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
}
t := typ.common()
fl := flag(t.Kind())
- if ifaceIndir(t) {
+ if t.IfaceIndir() {
return Value{t, unsafe_New(t), fl | flagIndir}
}
return Value{t, nil, fl}
}
return toRType(t)
}
-
-// ifaceIndir reports whether t is stored indirectly in an interface value.
-func ifaceIndir(t *abi.Type) bool {
- return abi.Kind(t.Kind_)&abi.KindDirectIface == 0
-}
e := (*abi.EmptyInterface)(unsafe.Pointer(&i))
// First, fill in the data portion of the interface.
switch {
- case ifaceIndir(t):
+ case t.IfaceIndir():
if v.flag&flagIndir == 0 {
panic("bad indir")
}
return Value{}
}
f := flag(t.Kind())
- if ifaceIndir(t) {
+ if t.IfaceIndir() {
f |= flagIndir
}
return Value{t, e.Data, f}