Files
jpexs-decompiler/libsrc/ffdec_lib/testdata/as3_new/src/tests/TestOptimizationWhile.as
2024-10-13 20:43:18 +02:00

30 lines
622 B
ActionScript

package tests
{
public class TestOptimizationWhile
{
public function run():*
{
// Add more than 3 variables.
// Optimization happens from register 4 on.
// (setlocal X takes more bytes than dup)
var a:int = 1;
var b:int = 2;
var c:int = 3;
var d:int = 4;
while(true)
{
d = Math.round(Math.random() * 10);
if(d >= 10)
{
break;
}
trace("xxx");
d++;
}
}
}
}