Exemple #1
0
        /* Performs initializing of value
         * (corresponds to CILPE.CFG.InitValue class)
         */
        public void Perform_InitValue(Type type)
        {
            Value val = Pop();

            if (!(val is PointerValue))
            {
                throw new InvalidOperandException();
            }

            PointerValue ptr = val as PointerValue;
            object       obj = ptr.GetReferencedObject();

            if (obj.GetType() != type)
            {
                throw new InvalidOperandException();
            }

            ptr.SetZeroValue();
        }
Exemple #2
0
 public override object GetReferencedObject()
 {
     return(field.GetValue(ptr.GetReferencedObject()));
 }