public void ProcessStatementSpawn(DMASTProcStatementSpawn statementSpawn) { DMExpression.Emit(_dmObject, _proc, statementSpawn.Delay); string afterSpawnLabel = _proc.NewLabelName(); _proc.Spawn(afterSpawnLabel); ProcessBlockInner(statementSpawn.Body); //Prevent the new thread from executing outside its own code _proc.PushNull(); _proc.Return(); _proc.AddLabel(afterSpawnLabel); }
public void VisitProcStatementSpawn(DMASTProcStatementSpawn statementSpawn) { SimplifyExpression(ref statementSpawn.Time); statementSpawn.Body.Visit(this); }