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

◆ EmitGotoExpression()

void System.Linq.Expressions.Compiler.LambdaCompiler.EmitGotoExpression ( Expression expr,
CompilationFlags flags )
inlineprivate

Definition at line 867 of file LambdaCompiler.cs.

868 {
869 GotoExpression gotoExpression = (GotoExpression)expr;
870 LabelInfo labelInfo = ReferenceLabel(gotoExpression.Target);
871 CompilationFlags compilationFlags = flags & CompilationFlags.EmitAsTailCallMask;
872 if (compilationFlags != CompilationFlags.EmitAsNoTail)
873 {
874 compilationFlags = (labelInfo.CanReturn ? CompilationFlags.EmitAsTail : CompilationFlags.EmitAsNoTail);
876 }
877 if (gotoExpression.Value != null)
878 {
879 if (gotoExpression.Target.Type == typeof(void))
880 {
882 }
883 else
884 {
885 flags = UpdateEmitExpressionStartFlag(flags, CompilationFlags.EmitExpressionStart);
886 EmitExpression(gotoExpression.Value, flags);
887 }
888 }
889 labelInfo.EmitJump();
891 }
static CompilationFlags UpdateEmitAsTailCallFlag(CompilationFlags flags, CompilationFlags newValue)
void EmitUnreachable(Expression node, CompilationFlags flags)
static CompilationFlags UpdateEmitExpressionStartFlag(CompilationFlags flags, CompilationFlags newValue)

References System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpressionAsVoid(), System.Linq.Expressions.Compiler.LambdaCompiler.EmitUnreachable(), System.Linq.Expressions.Compiler.LambdaCompiler.ReferenceLabel(), System.Linq.Expressions.Compiler.LambdaCompiler.UpdateEmitAsTailCallFlag(), and System.Linq.Expressions.Compiler.LambdaCompiler.UpdateEmitExpressionStartFlag().

Referenced by System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression(), and System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpressionAsVoid().