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