in Iris/IrisCompiler/BackEnd/TextEmitter.cs [436:493]
public void Operator(Operator opr)
{
switch (opr)
{
case IrisCompiler.Operator.Equal:
WriteInstruction("ceq", null);
break;
case IrisCompiler.Operator.NotEqual:
WriteInstruction("ceq", null);
WriteInstruction("ldc.i4.1", null);
WriteInstruction("xor", null);
break;
case IrisCompiler.Operator.LessThan:
WriteInstruction("clt", null);
break;
case IrisCompiler.Operator.LessThanEqual:
WriteInstruction("cgt", null);
WriteInstruction("ldc.i4.1", null);
WriteInstruction("xor", null);
break;
case IrisCompiler.Operator.GreaterThan:
WriteInstruction("cgt", null);
break;
case IrisCompiler.Operator.GreaterThanEqual:
WriteInstruction("clt", null);
WriteInstruction("ldc.i4.1", null);
WriteInstruction("xor", null);
break;
case IrisCompiler.Operator.Add:
WriteInstruction("add", null);
break;
case IrisCompiler.Operator.Subtract:
WriteInstruction("sub", null);
break;
case IrisCompiler.Operator.Multiply:
WriteInstruction("mul", null);
break;
case IrisCompiler.Operator.Divide:
WriteInstruction("div", null);
break;
case IrisCompiler.Operator.Modulo:
WriteInstruction("rem", null);
break;
case IrisCompiler.Operator.And:
WriteInstruction("and", null);
break;
case IrisCompiler.Operator.Or:
WriteInstruction("or", null);
break;
case IrisCompiler.Operator.Negate:
WriteInstruction("neg", null);
break;
case IrisCompiler.Operator.Not:
WriteInstruction("ldc.i4.1", null);
WriteInstruction("xor", null);
break;
}
}