public static bool AreEqual(AssTarget x, AssTarget y)
 {
     if (x.GetType() != y.GetType())
         return false;
     switch (MethodName(x.GetType().ToString()))
     {
         case "IntegerConstant": return ((IntegerConstant)x).Value == ((IntegerConstant)y).Value;
         case "BinaryConstant": return ((BinaryConstant)x).Value == ((BinaryConstant)y).Value;
         case "ByteConstant": return ((ByteConstant)x).Value == ((ByteConstant)y).Value;
         case "HexadecimalConstant": return ((HexadecimalConstant)x).Value == ((HexadecimalConstant)y).Value;
         case "OctalConstant": return ((OctalConstant)x).Value == ((OctalConstant)y).Value;
         case "ParamRegister": return ((ParamRegister)x).Position == ((ParamRegister)y).Position;
         case "Register": return ((Register)x).Value == ((Register)y).Value;
         case "RegisterOffset": return ((RegisterOffset)x).Register == ((RegisterOffset)y).Register && ((RegisterOffset)x).IntOffset == ((RegisterOffset)y).IntOffset && ((RegisterOffset)x).LabelOffset == ((RegisterOffset)y).LabelOffset;
         default: return false;
     }
 }
Esempio n. 2
0
 public Xor(AssTarget val1, AssTarget val2)
 {
     Val1 = val1;
     Val2 = val2;
 }
Esempio n. 3
0
 public Shr(AssTarget value, AssTarget target)
 {
     Value = value;
     Target = target;
 }
Esempio n. 4
0
 public Mult(AssTarget value, AssTarget target)
 {
     Value = value;
     Target = target;
 }
Esempio n. 5
0
 public Divide(AssTarget value, AssTarget target)
 {
     Value = value;
     Target = target;
 }
Esempio n. 6
0
 public Move(AssTarget from, AssTarget to)
 {
     From = from;
     To = to;
 }
Esempio n. 7
0
 public Compare(AssTarget val1, AssTarget val2)
 {
     Val1 = val1;
     Val2 = val2;
 }
Esempio n. 8
0
 public And(AssTarget val1, AssTarget val2)
 {
     Val1 = val1;
     Val2 = val2;
 }
Esempio n. 9
0
 public Add(AssTarget value, AssTarget target)
 {
     Value = value;
     Target = target;
 }
Esempio n. 10
0
 public Pop(AssTarget target)
 {
     Target = target;
 }
Esempio n. 11
0
 public Push(AssTarget target)
 {
     Target = target;
 }
Esempio n. 12
0
 public Lea(AssTarget from, AssTarget to)
 {
     From = from;
     To = to;
 }