@@ -624,7 +624,7 @@ func (v Value) call(op string, in []Value) []Value {
624
624
}
625
625
626
626
// Handle pointers passed in registers.
627
- if ! ifaceIndir ( tv ) {
627
+ if ! tv . IfaceIndir ( ) {
628
628
// Pointer-valued data gets put directly
629
629
// into v.ptr.
630
630
if steps [0 ].kind != abiStepPointer {
@@ -714,7 +714,7 @@ func callReflect(ctxt *makeFuncImpl, frame unsafe.Pointer, retValid *bool, regs
714
714
v := Value {typ , nil , flag (typ .Kind ())}
715
715
steps := abid .call .stepsForValue (i )
716
716
if st := steps [0 ]; st .kind == abiStepStack {
717
- if ifaceIndir ( typ ) {
717
+ if typ . IfaceIndir ( ) {
718
718
// value cannot be inlined in interface data.
719
719
// Must make a copy, because f might keep a reference to it,
720
720
// and we cannot let f keep a reference to the stack frame
@@ -728,7 +728,7 @@ func callReflect(ctxt *makeFuncImpl, frame unsafe.Pointer, retValid *bool, regs
728
728
v .ptr = * (* unsafe .Pointer )(add (ptr , st .stkOff , "1-ptr" ))
729
729
}
730
730
} else {
731
- if ifaceIndir ( typ ) {
731
+ if typ . IfaceIndir ( ) {
732
732
// All that's left is values passed in registers that we need to
733
733
// create space for the values.
734
734
v .flag |= flagIndir
@@ -914,7 +914,7 @@ func storeRcvr(v Value, p unsafe.Pointer) {
914
914
// the interface data word becomes the receiver word
915
915
iface := (* nonEmptyInterface )(v .ptr )
916
916
* (* unsafe .Pointer )(p ) = iface .word
917
- } else if v .flag & flagIndir != 0 && ! ifaceIndir ( t ) {
917
+ } else if v .flag & flagIndir != 0 && ! t . IfaceIndir ( ) {
918
918
* (* unsafe .Pointer )(p ) = * (* unsafe .Pointer )(v .ptr )
919
919
} else {
920
920
* (* unsafe .Pointer )(p ) = v .ptr
@@ -1232,7 +1232,7 @@ func (v Value) Elem() Value {
1232
1232
case Pointer :
1233
1233
ptr := v .ptr
1234
1234
if v .flag & flagIndir != 0 {
1235
- if ifaceIndir ( v .typ ()) {
1235
+ if v .typ (). IfaceIndir ( ) {
1236
1236
// This is a pointer to a not-in-heap object. ptr points to a uintptr
1237
1237
// in the heap. That uintptr is the address of a not-in-heap object.
1238
1238
// In general, pointers to not-in-heap objects can be total junk.
@@ -2258,7 +2258,7 @@ func (v Value) recv(nb bool) (val Value, ok bool) {
2258
2258
t := tt .Elem
2259
2259
val = Value {t , nil , flag (t .Kind ())}
2260
2260
var p unsafe.Pointer
2261
- if ifaceIndir ( t ) {
2261
+ if t . IfaceIndir ( ) {
2262
2262
p = unsafe_New (t )
2263
2263
val .ptr = p
2264
2264
val .flag |= flagIndir
@@ -3297,7 +3297,7 @@ func New(typ Type) Value {
3297
3297
}
3298
3298
t := & typ .(* rtype ).t
3299
3299
pt := ptrTo (t )
3300
- if ifaceIndir ( pt ) {
3300
+ if pt . IfaceIndir ( ) {
3301
3301
// This is a pointer to a not-in-heap type.
3302
3302
panic ("reflect: New of type that may not be allocated in heap (possibly undefined cgo C type)" )
3303
3303
}
0 commit comments