mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 22:04:46 +00:00
30 lines
622 B
ActionScript
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++;
|
|
}
|
|
}
|
|
}
|
|
}
|