예제 #1
0
 public IRLinearizedLocation(IRLinearizedLocation pLinearizedTarget)
 {
     Type = pLinearizedTarget.Type;
     switch (Type)
     {
         case IRLinearizedLocationType.Null: break;
         case IRLinearizedLocationType.Local: Local = pLinearizedTarget.Local; break;
         case IRLinearizedLocationType.LocalAddress: LocalAddress = pLinearizedTarget.LocalAddress; break;
         case IRLinearizedLocationType.Parameter: Parameter = pLinearizedTarget.Parameter; break;
         case IRLinearizedLocationType.ParameterAddress: ParameterAddress = pLinearizedTarget.ParameterAddress; break;
         case IRLinearizedLocationType.ConstantI4: ConstantI4 = pLinearizedTarget.ConstantI4; break;
         case IRLinearizedLocationType.ConstantI8: ConstantI8 = pLinearizedTarget.ConstantI8; break;
         case IRLinearizedLocationType.ConstantR4: ConstantR4 = pLinearizedTarget.ConstantR4; break;
         case IRLinearizedLocationType.ConstantR8: ConstantR8 = pLinearizedTarget.ConstantR8; break;
         case IRLinearizedLocationType.Field: Field = pLinearizedTarget.Field; break;
         case IRLinearizedLocationType.FieldAddress: FieldAddress = pLinearizedTarget.FieldAddress; break;
         case IRLinearizedLocationType.StaticField: StaticField = pLinearizedTarget.StaticField; break;
         case IRLinearizedLocationType.StaticFieldAddress: StaticFieldAddress = pLinearizedTarget.StaticFieldAddress; break;
         case IRLinearizedLocationType.Indirect: Indirect = pLinearizedTarget.Indirect; break;
         case IRLinearizedLocationType.SizeOf: SizeOf = pLinearizedTarget.SizeOf; break;
         case IRLinearizedLocationType.ArrayElement: ArrayElement = pLinearizedTarget.ArrayElement; break;
         case IRLinearizedLocationType.ArrayElementAddress: ArrayElementAddress = pLinearizedTarget.ArrayElementAddress; break;
         case IRLinearizedLocationType.ArrayLength: ArrayLength = pLinearizedTarget.ArrayLength; break;
         case IRLinearizedLocationType.FunctionAddress: FunctionAddress = pLinearizedTarget.FunctionAddress; break;
         case IRLinearizedLocationType.RuntimeHandle: RuntimeHandle = pLinearizedTarget.RuntimeHandle; break;
         case IRLinearizedLocationType.String: String = pLinearizedTarget.String; break;
         default: throw new ArgumentException("Type");
     }
 }
예제 #2
0
        public IRLinearizedLocation(IRLinearizedLocation pLinearizedTarget)
        {
            Type = pLinearizedTarget.Type;
            switch (Type)
            {
            case IRLinearizedLocationType.Null: break;

            case IRLinearizedLocationType.Local: Local = pLinearizedTarget.Local; break;

            case IRLinearizedLocationType.LocalAddress: LocalAddress = pLinearizedTarget.LocalAddress; break;

            case IRLinearizedLocationType.Parameter: Parameter = pLinearizedTarget.Parameter; break;

            case IRLinearizedLocationType.ParameterAddress: ParameterAddress = pLinearizedTarget.ParameterAddress; break;

            case IRLinearizedLocationType.ConstantI4: ConstantI4 = pLinearizedTarget.ConstantI4; break;

            case IRLinearizedLocationType.ConstantI8: ConstantI8 = pLinearizedTarget.ConstantI8; break;

            case IRLinearizedLocationType.ConstantR4: ConstantR4 = pLinearizedTarget.ConstantR4; break;

            case IRLinearizedLocationType.ConstantR8: ConstantR8 = pLinearizedTarget.ConstantR8; break;

            case IRLinearizedLocationType.Field: Field = pLinearizedTarget.Field; break;

            case IRLinearizedLocationType.FieldAddress: FieldAddress = pLinearizedTarget.FieldAddress; break;

            case IRLinearizedLocationType.StaticField: StaticField = pLinearizedTarget.StaticField; break;

            case IRLinearizedLocationType.StaticFieldAddress: StaticFieldAddress = pLinearizedTarget.StaticFieldAddress; break;

            case IRLinearizedLocationType.Indirect: Indirect = pLinearizedTarget.Indirect; break;

            case IRLinearizedLocationType.SizeOf: SizeOf = pLinearizedTarget.SizeOf; break;

            case IRLinearizedLocationType.ArrayElement: ArrayElement = pLinearizedTarget.ArrayElement; break;

            case IRLinearizedLocationType.ArrayElementAddress: ArrayElementAddress = pLinearizedTarget.ArrayElementAddress; break;

            case IRLinearizedLocationType.ArrayLength: ArrayLength = pLinearizedTarget.ArrayLength; break;

            case IRLinearizedLocationType.FunctionAddress: FunctionAddress = pLinearizedTarget.FunctionAddress; break;

            case IRLinearizedLocationType.RuntimeHandle: RuntimeHandle = pLinearizedTarget.RuntimeHandle; break;

            case IRLinearizedLocationType.String: String = pLinearizedTarget.String; break;

            default: throw new ArgumentException("Type");
            }
        }