Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CompileArithmetic()

void System.Linq.Expressions.Interpreter.LightCompiler.CompileArithmetic ( ExpressionType nodeType,
Expression left,
Expression right )
inlineprivate

Definition at line 707 of file LightCompiler.cs.

708 {
709 Compile(left);
710 Compile(right);
711 switch (nodeType)
712 {
713 case ExpressionType.Add:
714 _instructions.EmitAdd(left.Type, @checked: false);
715 break;
716 case ExpressionType.AddChecked:
717 _instructions.EmitAdd(left.Type, @checked: true);
718 break;
719 case ExpressionType.Subtract:
720 _instructions.EmitSub(left.Type, @checked: false);
721 break;
722 case ExpressionType.SubtractChecked:
723 _instructions.EmitSub(left.Type, @checked: true);
724 break;
725 case ExpressionType.Multiply:
726 _instructions.EmitMul(left.Type, @checked: false);
727 break;
728 case ExpressionType.MultiplyChecked:
729 _instructions.EmitMul(left.Type, @checked: true);
730 break;
731 case ExpressionType.Divide:
732 _instructions.EmitDiv(left.Type);
733 break;
734 case ExpressionType.Modulo:
735 _instructions.EmitModulo(left.Type);
736 break;
737 default:
739 }
740 }
void Compile(Expression expr, bool asVoid)

References System.Linq.Expressions.Interpreter.LightCompiler._instructions, System.Linq.Expressions.Interpreter.LightCompiler.Compile(), System.Linq.Expressions.Interpreter.InstructionList.EmitAdd(), System.Linq.Expressions.Interpreter.InstructionList.EmitDiv(), System.Linq.Expressions.Interpreter.InstructionList.EmitModulo(), System.Linq.Expressions.Interpreter.InstructionList.EmitMul(), System.Linq.Expressions.Interpreter.InstructionList.EmitSub(), System.Linq.Expressions.Expression< TDelegate >.Type, and System.Dynamic.Utils.ContractUtils.Unreachable.

Referenced by System.Linq.Expressions.Interpreter.LightCompiler.CompileBinaryExpression().