protected internal override void VisitConvertValue(ConvertValue node, object data) { StackTypes stack = data as StackTypes; Verifier.ProcessConv(node.Type, stack); AddTask(node.Next,stack); }
protected internal virtual void VisitConvertValue(ConvertValue node, object data) { throw new NodeNotSupportedException(node); }
protected override void VisitConvertValue(ConvertValue upNode, object o) { }
protected override void VisitConvertValue(ConvertValue upNode, object o) { State state = o as State; BTValue val = state.Stack[0] as PrimitiveBTValue; Annotation.SetNodeBTType(upNode, val.BTType); }
protected internal override void VisitConvertValue(ConvertValue node, object data) { if(node.Type.Equals(typeof(IntPtr))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_I_Un); else generator.Emit(OpCodes.Conv_Ovf_I); else generator.Emit(OpCodes.Conv_I); else if(node.Type.Equals(typeof(sbyte))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_I1_Un); else generator.Emit(OpCodes.Conv_Ovf_I1); else generator.Emit(OpCodes.Conv_I1); else if(node.Type.Equals(typeof(short))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_I2_Un); else generator.Emit(OpCodes.Conv_Ovf_I2); else generator.Emit(OpCodes.Conv_I2); else if(node.Type.Equals(typeof(int))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_I4_Un); else generator.Emit(OpCodes.Conv_Ovf_I4); else generator.Emit(OpCodes.Conv_I4); else if(node.Type.Equals(typeof(long))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_I8_Un); else generator.Emit(OpCodes.Conv_Ovf_I8); else generator.Emit(OpCodes.Conv_I8); else if(node.Type.Equals(typeof(UIntPtr))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_U_Un); else generator.Emit(OpCodes.Conv_Ovf_U); else generator.Emit(OpCodes.Conv_U); else if(node.Type.Equals(typeof(byte))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_U1_Un); else generator.Emit(OpCodes.Conv_Ovf_U1); else generator.Emit(OpCodes.Conv_U1); else if(node.Type.Equals(typeof(ushort))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_U2_Un); else generator.Emit(OpCodes.Conv_Ovf_U2); else generator.Emit(OpCodes.Conv_U2); else if(node.Type.Equals(typeof(uint))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_U4_Un); else generator.Emit(OpCodes.Conv_Ovf_U4); else generator.Emit(OpCodes.Conv_U4); else if(node.Type.Equals(typeof(ulong))) if(node.Overflow) if(node.Unsigned) generator.Emit(OpCodes.Conv_Ovf_U8_Un); else generator.Emit(OpCodes.Conv_Ovf_U8); else generator.Emit(OpCodes.Conv_U8); else if(node.Type.Equals(typeof(float))) if(node.Unsigned) generator.Emit(OpCodes.Conv_R_Un); else generator.Emit(OpCodes.Conv_R4); else if(node.Type.Equals(typeof(double))) generator.Emit(OpCodes.Conv_R8); AddTask(node.Next,null); }