protected internal override void VisitLoadElement(LoadElement node, object data) { StackTypes stack = data as StackTypes; Verifier.ProcessLdElem(stack, new TypeEx(node.Type), false); AddTask(node.Next,stack); }
protected internal virtual void VisitLoadElement(LoadElement node, object data) { throw new NodeNotSupportedException(node); }
protected override void VisitLoadElement(LoadElement downNode, object o) { StructValue idx = this.state.Stack.Pop() as StructValue; ObjectReferenceValue arr = this.state.Stack.Pop() as ObjectReferenceValue; PointerValue ptr = new PointerToElementValue(arr.Obj as Array, SpecializingVisitor.toInt(idx)); this.loadVar(downNode, ptr, o); }
protected override void VisitLoadElement(LoadElement upNode, object o) { State state = o as State; PrimitiveBTValue idx = state.Stack.Pop() as PrimitiveBTValue; ReferenceBTValue arr = state.Stack.Pop() as ReferenceBTValue; if (idx.BTType == arr.BTType) { ReferenceBTValue elm = arr.ArrayElements; state.Stack.Push(elm.ToStack(upNode.Type)); BTType btType; if (arr.BTType == BTType.Dynamic) btType = BTType.Dynamic; else if (elm.BTType == BTType.Dynamic) btType = BTType.eXclusive; else btType = BTType.Static; Annotation.SetNodeBTType(upNode, btType); elm.Creators[this].AddCreator(upNode); } else if (idx.BTType == BTType.Static) throw new LiftException(idx); else if (arr.BTType == BTType.Static) throw new LiftException(arr); else throw new InternalException(); }
protected override void VisitLoadElement(LoadElement upNode, object o) { DepthContainer cnt = o as DepthContainer; cnt.Depth += 1; }
protected internal override void VisitLoadElement(LoadElement node, object data) { if(node.Type.Equals( typeof(IntPtr) )) generator.Emit(OpCodes.Ldelem_I); else if(node.Type.Equals( typeof(sbyte) )) generator.Emit(OpCodes.Ldelem_I1); else if(node.Type.Equals( typeof(short) )) generator.Emit(OpCodes.Ldelem_I2); else if(node.Type.Equals( typeof(int) )) generator.Emit(OpCodes.Ldelem_I4); else if(node.Type.Equals( typeof(long) )) generator.Emit(OpCodes.Ldelem_I8); else if(node.Type.Equals( typeof(UIntPtr) )) generator.Emit(OpCodes.Ldelem_I); else if(node.Type.Equals( typeof(byte) )) generator.Emit(OpCodes.Ldelem_I1); else if(node.Type.Equals( typeof(ushort) )) generator.Emit(OpCodes.Ldelem_I2); else if(node.Type.Equals( typeof(uint) )) generator.Emit(OpCodes.Ldelem_I4); else if(node.Type.Equals( typeof(ulong) )) generator.Emit(OpCodes.Ldelem_I8); else if(node.Type.Equals( typeof(float) )) generator.Emit(OpCodes.Ldelem_R4); else if(node.Type.Equals( typeof(double) )) generator.Emit(OpCodes.Ldelem_R8); else if(node.Type.Equals( typeof(object) )) generator.Emit(OpCodes.Ldelem_Ref); else throw new EmissionException(); AddTask(node.Next,null); }