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

◆ CompileLiftedLogicalBinaryExpression()

void System.Linq.Expressions.Interpreter.LightCompiler.CompileLiftedLogicalBinaryExpression ( BinaryExpression node,
bool andAlso )
inlineprivate

Definition at line 1015 of file LightCompiler.cs.

1016 {
1017 BranchLabel branchLabel = _instructions.MakeLabel();
1018 BranchLabel branchLabel2 = _instructions.MakeLabel();
1019 BranchLabel branchLabel3 = _instructions.MakeLabel();
1020 BranchLabel label = _instructions.MakeLabel();
1021 LocalDefinition definition = _locals.DefineLocal(Expression.Parameter(node.Left.Type), _instructions.Count);
1022 LocalDefinition definition2 = _locals.DefineLocal(Expression.Parameter(node.Left.Type), _instructions.Count);
1023 Compile(node.Left);
1026 _instructions.EmitLoad(null, typeof(object));
1030 if (andAlso)
1031 {
1033 }
1034 else
1035 {
1037 }
1039 LocalDefinition definition3 = _locals.DefineLocal(Expression.Parameter(node.Right.Type), _instructions.Count);
1040 Compile(node.Right);
1043 _instructions.EmitLoad(null, typeof(object));
1047 if (andAlso)
1048 {
1050 }
1051 else
1052 {
1054 }
1056 _instructions.EmitLoad(null, typeof(object));
1059 _instructions.EmitLoad(andAlso ? Utils.BoxedTrue : Utils.BoxedFalse, typeof(object));
1063 _instructions.EmitLoad(andAlso ? Utils.BoxedFalse : Utils.BoxedTrue, typeof(object));
1067 _instructions.EmitLoad(null, typeof(object));
1074 }
void EmitEqual(Type type, bool liftedToNull=false)
void EmitBranch(OffsetInstruction instruction, BranchLabel label)
void Compile(Expression expr, bool asVoid)
void UndefineLocal(LocalDefinition definition, int end)
LocalDefinition DefineLocal(ParameterExpression variable, int start)

References System.Linq.Expressions.Interpreter.LightCompiler._instructions, System.Linq.Expressions.Interpreter.LightCompiler._locals, System.Linq.Expressions.Utils.BoxedFalse, System.Linq.Expressions.Utils.BoxedTrue, System.Linq.Expressions.Interpreter.LightCompiler.Compile(), System.Linq.Expressions.Interpreter.InstructionList.Count, System.Linq.Expressions.Interpreter.LocalVariables.DefineLocal(), System.Linq.Expressions.Interpreter.InstructionList.EmitBranch(), System.Linq.Expressions.Interpreter.InstructionList.EmitBranchFalse(), System.Linq.Expressions.Interpreter.InstructionList.EmitBranchTrue(), System.Linq.Expressions.Interpreter.InstructionList.EmitEqual(), System.Linq.Expressions.Interpreter.InstructionList.EmitLoad(), System.Linq.Expressions.Interpreter.InstructionList.EmitLoadLocal(), System.Linq.Expressions.Interpreter.InstructionList.EmitStoreLocal(), System.Linq.Expressions.Interpreter.InstructionList.MakeLabel(), System.Linq.Expressions.Interpreter.InstructionList.MarkLabel(), System.Linq.Expressions.Expression< TDelegate >.Parameter(), and System.Linq.Expressions.Interpreter.LocalVariables.UndefineLocal().

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