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

◆ CompileLabelExpression()

void System.Linq.Expressions.Interpreter.LightCompiler.CompileLabelExpression ( Expression expr)
inlineprivate

Definition at line 1273 of file LightCompiler.cs.

1274 {
1275 LabelExpression labelExpression = (LabelExpression)expr;
1276 LabelInfo info = null;
1277 if (_labelBlock.Kind == LabelScopeKind.Block)
1278 {
1280 if (info == null && _labelBlock.Parent.Kind == LabelScopeKind.Switch)
1281 {
1283 }
1284 }
1285 if (info == null)
1286 {
1288 }
1289 if (labelExpression.DefaultValue != null)
1290 {
1291 if (labelExpression.Target.Type == typeof(void))
1292 {
1293 CompileAsVoid(labelExpression.DefaultValue);
1294 }
1295 else
1296 {
1297 Compile(labelExpression.DefaultValue);
1298 }
1299 }
1300 _instructions.MarkLabel(info.GetLabel(this));
1301 }
bool TryGetLabelInfo(LabelTarget target, [NotNullWhen(true)] out LabelInfo info)
void Compile(Expression expr, bool asVoid)

References System.Linq.Expressions.Interpreter.LightCompiler._instructions, System.Linq.Expressions.Interpreter.LightCompiler._labelBlock, System.Linq.Expressions.Interpreter.LightCompiler.Compile(), System.Linq.Expressions.Interpreter.LightCompiler.CompileAsVoid(), System.Linq.Expressions.Interpreter.LightCompiler.DefineLabel(), System.info, System.Linq.Expressions.Interpreter.LabelScopeInfo.Kind, System.Linq.Expressions.Interpreter.InstructionList.MarkLabel(), System.Linq.Expressions.Interpreter.LabelScopeInfo.Parent, and System.Linq.Expressions.Interpreter.LabelScopeInfo.TryGetLabelInfo().

Referenced by System.Linq.Expressions.Interpreter.LightCompiler.CompileNoLabelPush(), and System.Linq.Expressions.Interpreter.LightCompiler.CompileSwitchExpression().