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

◆ TryPushLabelBlock()

bool System.Linq.Expressions.Compiler.LambdaCompiler.TryPushLabelBlock ( Expression node)
inlineprivate

Definition at line 901 of file LambdaCompiler.cs.

902 {
903 switch (node.NodeType)
904 {
905 default:
906 if (_labelBlock.Kind != LabelScopeKind.Expression)
907 {
908 PushLabelBlock(LabelScopeKind.Expression);
909 return true;
910 }
911 return false;
912 case ExpressionType.Label:
913 if (_labelBlock.Kind == LabelScopeKind.Block)
914 {
915 LabelTarget target = ((LabelExpression)node).Target;
916 if (_labelBlock.ContainsTarget(target))
917 {
918 return false;
919 }
921 {
922 return false;
923 }
924 }
926 return true;
927 case ExpressionType.Block:
928 if (!(node is SpilledExpressionBlock))
929 {
932 {
934 }
935 return true;
936 }
937 goto default;
938 case ExpressionType.Switch:
939 {
941 SwitchExpression switchExpression = (SwitchExpression)node;
942 foreach (SwitchCase @case in switchExpression.Cases)
943 {
944 DefineBlockLabels(@case.Body);
945 }
947 return true;
948 }
949 case ExpressionType.Convert:
950 if (!(node.Type != typeof(void)))
951 {
953 return true;
954 }
955 goto default;
956 case ExpressionType.Conditional:
957 case ExpressionType.Goto:
958 case ExpressionType.Loop:
960 return true;
961 }
962 }

References System.Linq.Expressions.Compiler.LambdaCompiler._labelBlock, System.Linq.Expressions.Compiler.LabelScopeInfo.ContainsTarget(), System.Linq.Expressions.Compiler.LambdaCompiler.DefineBlockLabels(), System.Linq.Expressions.Compiler.LabelScopeInfo.Kind, System.Linq.Expressions.Compiler.LabelScopeInfo.Parent, and System.Linq.Expressions.Compiler.LambdaCompiler.PushLabelBlock().

Referenced by System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpressionStart().