/* 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(); }
internal Variable this[PointerValue ptr] { get { return this.hash[ptr] as Variable; } set { this.hash[ptr] = value; } }
private void storeVar(Node downNode, PointerValue ptr, object o) { PointerToNode ptrUpNode = (o as Data).PointerToNode; ptrUpNode = new PointerToNode(ptrUpNode.Node = new StoreVar(this.varsHash[ptr])); ptr.SetZeroValue(); this.AddTask(downNode.Next, ptrUpNode); }
private void loadVar(Node downNode, PointerValue ptr, object o) { PointerToNode ptrUpNode = (o as Data).PointerToNode; ptrUpNode = new PointerToNode(ptrUpNode.Node = new LoadVar(this.varsHash[ptr])); this.AddTask(downNode.Next, ptrUpNode); }
public PointerToStructFieldValue(PointerValue ptr, FieldInfo field) { this.ptr = ptr; this.field = field; }