public VMSlot GetValue(VMContext ctx, PointerType type) { var inst = instance; if (field.DeclaringType.IsValueType && instance is IReference) { inst = ((IReference)instance).GetValue(ctx, PointerType.OBJECT).ToObject(field.DeclaringType); } return(VMSlot.FromObject(field.GetValue(inst), field.FieldType)); }
public VMSlot GetValue(VMContext ctx, PointerType type) { TypedReference typedRef; if (_ptr != null) { *&typedRef = *(TypedReference *)_ptr.Value; } else { *(PseudoTypedRef *)&typedRef = _typedRef; } return(VMSlot.FromObject(TypedReference.ToObject(typedRef), __reftype(typedRef))); }