Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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)));
        }