Consider this code:
function funFun() {
with (player) {
this.chat = "hi";
};
temp.fn = function() {
temp.sum = 0;
for (temp.i = 1; temp.i < 10; temp.i++) {
temp.sum += temp.i;
}
return temp.sum;
};
echo(temp.fn());
}
echo("FooBar");
function onCreated() {
setTimer(1);
temp.baz = function(temp.i) {echo(temp.i*2);};
temp.baz(5);
funFun();
}
function onTimeOut() {
echo("Hi!");
setTimer(1);
}

echo("FooBar"); is clearly between functions, and should be executed by the GS2 engine, but it is unreachable in the compiler output.
The corrected output would make the jmp at instruction 0 go to 76 instead of 150. Also, in the CFG, there is an additional return which is unreachable.
Consider this code:
echo("FooBar");is clearly between functions, and should be executed by the GS2 engine, but it is unreachable in the compiler output.The corrected output would make the jmp at instruction 0 go to 76 instead of 150. Also, in the CFG, there is an additional return which is unreachable.