Skip to content

Commit 4838dd3

Browse files
committed
Fix #277
1 parent 26cc497 commit 4838dd3

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

src/compiler/iroptimizer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,11 @@ class IROptimizer {
565565
this.addPossibleExitState(state);
566566
break;
567567
}
568+
case StackOpcode.CONTROL_WAIT_UNTIL: {
569+
modified = state.clear() || modified;
570+
modified = this.analyzeInputs(inputs, state) || modified;
571+
break;
572+
}
568573
case StackOpcode.PROCEDURE_CALL: {
569574
modified = this.analyzeInputs(inputs, state) || modified;
570575
modified = this.analyzeInputs(inputs.inputs, state) || modified;
2.86 KB
Binary file not shown.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// TW Snapshot
2+
// Input SHA-256: 2422e407892596fbf410e032196131f9bae718563fd80b1ff32cf972859c034b
3+
4+
// Sprite1 script
5+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
6+
const b0 = runtime.getOpcodeFunction("looks_say");
7+
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
8+
return function* genXYZ () {
9+
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "e", null);
10+
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
11+
b1.value = "bwah";
12+
while (!(("" + b1.value).toLowerCase() === "bleh".toLowerCase())) {
13+
yield;
14+
}
15+
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null);
16+
retire(); return;
17+
}; })
18+
19+
// Sprite1 script
20+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
21+
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
22+
return function* genXYZ () {
23+
b0.value = (1 + 2);
24+
thread.timer = timer();
25+
var a0 = Math.max(0, 1000 * 0);
26+
runtime.requestRedraw();
27+
yield;
28+
while (thread.timer.timeElapsed() < a0) {
29+
yield;
30+
}
31+
thread.timer = null;
32+
b0.value = "bleh";
33+
retire(); return;
34+
}; })
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// TW Snapshot
2+
// Input SHA-256: 2422e407892596fbf410e032196131f9bae718563fd80b1ff32cf972859c034b
3+
4+
// Sprite1 script
5+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
6+
const b0 = runtime.getOpcodeFunction("looks_say");
7+
const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
8+
return function* genXYZ () {
9+
yield* executeInCompatibilityLayer({"MESSAGE":"plan 0",}, b0, false, false, "e", null);
10+
startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" });
11+
b1.value = "bwah";
12+
while (!(("" + b1.value).toLowerCase() === "bleh".toLowerCase())) {
13+
yield;
14+
}
15+
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null);
16+
retire(); return;
17+
}; })
18+
19+
// Sprite1 script
20+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
21+
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
22+
return function* genXYZ () {
23+
b0.value = (1 + 2);
24+
thread.timer = timer();
25+
var a0 = Math.max(0, 1000 * 0);
26+
runtime.requestRedraw();
27+
yield;
28+
while (thread.timer.timeElapsed() < a0) {
29+
yield;
30+
}
31+
thread.timer = null;
32+
b0.value = "bleh";
33+
retire(); return;
34+
}; })

0 commit comments

Comments
 (0)