mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-08-02 15:42:36 +00:00
Fixed #1894 Switches vs loops decompilation (now with two passes)
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -110,6 +110,7 @@ package
|
||||
TestVector2;
|
||||
TestWhileAnd;
|
||||
TestWhileBreak;
|
||||
TestWhileBreak2;
|
||||
TestWhileContinue;
|
||||
TestWhileTry;
|
||||
TestWhileTry2;
|
||||
|
||||
@@ -20,7 +20,7 @@ package tests
|
||||
}
|
||||
trace("gg");
|
||||
} while (k < 10);
|
||||
trace("ss");
|
||||
}
|
||||
trace("ss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ package tests
|
||||
{
|
||||
obj = {};
|
||||
var item = {};
|
||||
//for each (var item in obj)
|
||||
//{
|
||||
for each (var item in obj)
|
||||
{
|
||||
switch (item["key"])
|
||||
{
|
||||
case 1:
|
||||
@@ -21,9 +21,9 @@ package tests
|
||||
case 4:
|
||||
return item;
|
||||
};
|
||||
//};
|
||||
};
|
||||
};
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
58
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestWhileBreak2.as
vendored
Normal file
58
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestWhileBreak2.as
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestWhileBreak2
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
|
||||
var k:int = 8;
|
||||
while(true)
|
||||
{
|
||||
trace("X");
|
||||
if (k == 1) {
|
||||
trace("A");
|
||||
return;
|
||||
}
|
||||
trace("Y");
|
||||
if (k < 10)
|
||||
{
|
||||
trace("k1");
|
||||
if (k == 2)
|
||||
{
|
||||
trace("B");
|
||||
if (k > 1)
|
||||
{
|
||||
trace("B1");
|
||||
break;
|
||||
}
|
||||
trace("B2");
|
||||
}
|
||||
trace("Z");
|
||||
|
||||
if (k == 3)
|
||||
{
|
||||
trace("C");
|
||||
break;
|
||||
}
|
||||
|
||||
trace("Z2");
|
||||
|
||||
if (k == 4)
|
||||
{
|
||||
trace("D");
|
||||
break;
|
||||
}
|
||||
trace("k2");
|
||||
}
|
||||
trace("E");
|
||||
if (k == 2) {
|
||||
trace("E1");
|
||||
return;
|
||||
}
|
||||
trace("gg");
|
||||
}
|
||||
trace("ss");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user