Пример #1
0
 public static IMOperation Create(IMInstruction instruction, List <IMOperand> operands)
 {
     return(new IMOperation()
     {
         Instruction = instruction, Operands = operands
     });
 }
Пример #2
0
 public IMOperation(IMInstruction instruction, IMOperand operand1, IMOperand operand2, IMOperand operand3)
 {
     Assert.True(instruction.NumOperands == 3, "Instruction " + instruction.Name + " expected " + instruction.NumOperands + " operands, but 3 given!");
     Instruction = instruction;
     Operands    = new List <IMOperand> {
         operand1, operand2, operand3
     };
 }
Пример #3
0
 private IMOperation(IMInstruction instruction, IMOperand operand1, IMOperand operand2)
 {
     Assert.True(instruction.NumOperands == 2, "Instruction " + instruction.Name + " expected " + instruction.NumOperands + " operands, but 2 given!");
     Instruction = instruction;
     Operands    = new List <IMOperand> {
         operand1, operand2
     };
 }
Пример #4
0
 public RelationalOperator(string figure, IMInstruction setInstruction)
 {
     Figure          = figure;
     _setInstruction = setInstruction;
 }
Пример #5
0
 public BooleanOperator(string figure, IMInstruction instruction, int precedence)
 {
     _instruction = instruction;
     Figure       = figure;
     Precedence   = precedence;
 }
Пример #6
0
 public static IMOperation BinaryOperator(IMInstruction instruction, IMOperand target, IMOperand operand1, IMOperand operand2)
 {
     return(new IMOperation(instruction, target, operand1, operand2));
 }
Пример #7
0
 private IMOperation(IMInstruction instruction)
 {
     Assert.True(instruction.NumOperands == 0, "Instruction " + instruction.Name + " expected " + instruction.NumOperands + " operands, but none given!");
     Instruction = instruction;
     Operands    = new List <IMOperand>(0);
 }