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

◆ CompileTryFaultExpression()

void System.Linq.Expressions.Interpreter.LightCompiler.CompileTryFaultExpression ( TryExpression expr)
inlineprivate

Definition at line 1562 of file LightCompiler.cs.

1563 {
1565 BranchLabel branchLabel = _instructions.MakeLabel();
1568 bool flag = expr.Type != typeof(void);
1569 Compile(expr.Body, !flag);
1571 _instructions.EmitGoto(branchLabel, flag, flag, flag);
1573 BranchLabel branchLabel2 = _instructions.MakeLabel();
1576 CompileAsVoid(expr.Fault);
1578 enterTryFaultInstruction.SetTryHandler(new TryFaultHandler(count, count2, branchLabel2.TargetIndex, _instructions.Count));
1582 }
EnterTryFaultInstruction EmitEnterTryFault(BranchLabel tryEnd)
void EmitGoto(BranchLabel label, bool hasResult, bool hasValue, bool labelTargetGetsValue)
void EmitEnterFault(BranchLabel faultStartLabel)
void Compile(Expression expr, bool asVoid)

References System.Linq.Expressions.Interpreter.LightCompiler._instructions, System.Linq.Expressions.TryExpression.Body, System.Linq.Expressions.Interpreter.LightCompiler.Compile(), System.Linq.Expressions.Interpreter.LightCompiler.CompileAsVoid(), System.Linq.Expressions.Interpreter.InstructionList.Count, System.Linq.count, System.Linq.Expressions.Interpreter.InstructionList.EmitEnterFault(), System.Linq.Expressions.Interpreter.InstructionList.EmitEnterTryFault(), System.Linq.Expressions.Interpreter.InstructionList.EmitGoto(), System.Linq.Expressions.Interpreter.InstructionList.EmitLeaveFault(), System.Linq.Expressions.TryExpression.Fault, System.Linq.Expressions.Interpreter.InstructionList.MakeLabel(), System.Linq.Expressions.Interpreter.InstructionList.MarkLabel(), System.Linq.Expressions.Interpreter.LightCompiler.PopLabelBlock(), and System.Linq.Expressions.Interpreter.LightCompiler.PushLabelBlock().

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