diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3AssembledDecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3AssembledDecompileTest.java index 70869bd41..40ef974d1 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3AssembledDecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3AssembledDecompileTest.java @@ -122,7 +122,6 @@ public class ActionScript3AssembledDecompileTest extends ActionScript3DecompileT + "case 0:\r\n" + "var _loc2_:String = \"X\";\r\n" + "return;\r\n" - //+ "break;\r\n" + "case 1:\r\n" + "_loc2_ = \"A\";\r\n" + "break;\r\n" @@ -159,6 +158,52 @@ public class ActionScript3AssembledDecompileTest extends ActionScript3DecompileT false); } + @Test + public void testSwitchJoin() { + decompileMethod("assembled", "testSwitchJoin", "trace(\"before\");\r\n" + + "var _loc2_:int = 57;\r\n" + + "switch(_loc2_)\r\n" + + "{\r\n" + + "case 0:\r\n" + + "case 3:\r\n" + + "trace(\"0-3\");\r\n" + + "break;\r\n" + + "case 1:\r\n" + + "case 6:\r\n" + + "trace(\"1-6\");\r\n" + + "addr106:\r\n" + + "trace(\"F\");\r\n" + + "break;\r\n" + + "case 5:\r\n" + + "trace(\"5\");\r\n" + + "addr103:\r\n" + + "trace(\"E\");\r\n" + + "§§goto(addr106);\r\n" + + "case 7:\r\n" + + "trace(\"7\");\r\n" + + "addr100:\r\n" + + "trace(\"D\");\r\n" + + "§§goto(addr103);\r\n" + + "case 2:\r\n" + + "trace(\"2\");\r\n" + + "addr97:\r\n" + + "trace(\"C\");\r\n" + + "§§goto(addr100);\r\n" + + "case 8:\r\n" + + "trace(\"8\");\r\n" + + "addr94:\r\n" + + "trace(\"B\");\r\n" + + "§§goto(addr97);\r\n" + + "default:\r\n" + + "trace(\"def\");\r\n" + + "trace(\"A\");\r\n" + + "§§goto(addr94);\r\n" + + "}\r\n" + + "trace(\"G\");\r\n" + + "return null;\r\n", + false); + } + @Test public void testTryDoWhile() { decompileMethod("assembled", "testTryDoWhile", "trace(\"first\");\r\n" diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicAirDecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicAirDecompileTest.java index 6565c9fec..eabdc7eb1 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicAirDecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicAirDecompileTest.java @@ -203,6 +203,38 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile false); } + @Test + public void testDeobfuscation() { + decompileMethod("classic_air", "testDeobfuscation", "var r:int = Math.random();\r\n" + + "var t:Boolean = true;\r\n" + + "var f:Boolean = false;\r\n" + + "if(r > 5 && t)\r\n" + + "{\r\n" + + "trace(\"A\");\r\n" + + "}\r\n" + + "if(r > 10 || f)\r\n" + + "{\r\n" + + "trace(\"B\");\r\n" + + "}\r\n" + + "if(t && r > 15)\r\n" + + "{\r\n" + + "trace(\"C\");\r\n" + + "}\r\n" + + "if(f || r > 20)\r\n" + + "{\r\n" + + "trace(\"D\");\r\n" + + "}\r\n" + + "if(f)\r\n" + + "{\r\n" + + "trace(\"trash1\");\r\n" + + "}\r\n" + + "if(!t)\r\n" + + "{\r\n" + + "trace(\"trash2\");\r\n" + + "}\r\n", + false); + } + @Test public void testDoWhile() { decompileMethod("classic_air", "testDoWhile", "var a:int = 8;\r\n" @@ -740,6 +772,28 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile false); } + @Test + public void testIgnoreAndOr() { + decompileMethod("classic_air", "testIgnoreAndOr", "var k:int = Math.random();\r\n" + + "if(k > 5)\r\n" + + "{\r\n" + + "trace(\"A\");\r\n" + + "}\r\n" + + "if(k > 10)\r\n" + + "{\r\n" + + "trace(\"B\");\r\n" + + "}\r\n" + + "if(k > 15)\r\n" + + "{\r\n" + + "trace(\"C\");\r\n" + + "}\r\n" + + "if(k > 20)\r\n" + + "{\r\n" + + "trace(\"D\");\r\n" + + "}\r\n", + false); + } + @Test public void testInc2() { decompileMethod("classic_air", "testInc2", "var a:* = [1];\r\n" diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicDecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicDecompileTest.java index 5e5dc9fe0..107282e99 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicDecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassicDecompileTest.java @@ -201,6 +201,38 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes false); } + @Test + public void testDeobfuscation() { + decompileMethod("classic", "testDeobfuscation", "var r:int = Math.random();\r\n" + + "var t:Boolean = true;\r\n" + + "var f:Boolean = false;\r\n" + + "if(r > 5 && t)\r\n" + + "{\r\n" + + "trace(\"A\");\r\n" + + "}\r\n" + + "if(r > 10 || f)\r\n" + + "{\r\n" + + "trace(\"B\");\r\n" + + "}\r\n" + + "if(t && r > 15)\r\n" + + "{\r\n" + + "trace(\"C\");\r\n" + + "}\r\n" + + "if(f || r > 20)\r\n" + + "{\r\n" + + "trace(\"D\");\r\n" + + "}\r\n" + + "if(f)\r\n" + + "{\r\n" + + "trace(\"trash1\");\r\n" + + "}\r\n" + + "if(!t)\r\n" + + "{\r\n" + + "trace(\"trash2\");\r\n" + + "}\r\n", + false); + } + @Test public void testDoWhile() { decompileMethod("classic", "testDoWhile", "var a:* = 8;\r\n" @@ -731,6 +763,28 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes false); } + @Test + public void testIgnoreAndOr() { + decompileMethod("classic", "testIgnoreAndOr", "var k:int = Math.random();\r\n" + + "if(k > 5)\r\n" + + "{\r\n" + + "trace(\"A\");\r\n" + + "}\r\n" + + "if(k > 10)\r\n" + + "{\r\n" + + "trace(\"B\");\r\n" + + "}\r\n" + + "if(k > 15)\r\n" + + "{\r\n" + + "trace(\"C\");\r\n" + + "}\r\n" + + "if(k > 20)\r\n" + + "{\r\n" + + "trace(\"D\");\r\n" + + "}\r\n", + false); + } + @Test public void testInc2() { decompileMethod("classic", "testInc2", "var a:* = [1];\r\n" diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileDecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileDecompileTest.java index d325840b0..71fd19103 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileDecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileDecompileTest.java @@ -77,6 +77,23 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi false); } + @Test(dataProvider = "swfNamesProvider") + public void testTryCatchInIf(String swfUsed) { + decompileMethod(swfUsed, "testTryCatchInIf", "var a:int = Math.random();\r\n" + + "if(a > 10)\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "return 1;\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "}\r\n" + + "}\r\n" + + "return 2;\r\n", + false); + } + @Test(dataProvider = "swfNamesProvider") public void testTryCatchInWhile(String swfUsed) { decompileMethod(swfUsed, "testTryCatchInWhile", "trace(\"before loop\");\r\n" @@ -139,6 +156,55 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi false); } + @Test(dataProvider = "swfNamesProvider") + public void testTryCatchInWhile3(String swfUsed) { + decompileMethod(swfUsed, "testTryCatchInWhile3", "var a:int = 0;\r\n" + + "a = 0;\r\n" + + "trace(\"before loop\");\r\n" + + "while(a > 5)\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "return \"intry return\";\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "trace(\"in catch\");\r\n" + + "a++;\r\n" + + "continue;\r\n" + + "}\r\n" + + "}\r\n" + + "return \"OK\";\r\n", + false); + } + + @Test(dataProvider = "swfNamesProvider") + public void testTryCatchInWhile4(String swfUsed) { + decompileMethod(swfUsed, "testTryCatchInWhile4", "var a:int = 0;\r\n" + + "a = 0;\r\n" + + "while(true)\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "trace(\"try2\");\r\n" + + "if(a == 10)\r\n" + + "{\r\n" + + "trace(\"br\");\r\n" + + "break;\r\n" + + "}\r\n" + + "return;\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "trace(\"in catch2\");\r\n" + + "trace(\"a=\" + a);\r\n" + + "continue;\r\n" + + "}\r\n" + + "}\r\n" + + "trace(\"after\");\r\n", + false); + } + @Test(dataProvider = "swfNamesProvider") public void testTryCatchLoop(String swfUsed) { decompileMethod(swfUsed, "testTryCatchLoop", "var j:int = 0;\r\n" @@ -169,6 +235,29 @@ public class ActionScript3CrossCompileDecompileTest extends ActionScript3Decompi false); } + @Test(dataProvider = "swfNamesProvider") + public void testTryCatchLoopBreak(String swfUsed) { + decompileMethod(swfUsed, "testTryCatchLoopBreak", "var a:int = 0;\r\n" + + "a = 0;\r\n" + + "trace(\"before loop\");\r\n" + + "try\r\n" + + "{\r\n" + + "trace(\"in try1\");\r\n" + + "while(a < 10)\r\n" + + "{\r\n" + + "trace(\"a=\" + a);\r\n" + + "a++;\r\n" + + "}\r\n" + + "trace(\"in try2\");\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "trace(\"in catch\");\r\n" + + "}\r\n" + + "trace(\"after\");\r\n", + false); + } + @Test(dataProvider = "swfNamesProvider") public void testTryFinally(String swfUsed) { decompileMethod(swfUsed, "testTryFinally", "trace(\"before try\");\r\n" diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileSwfToolsDecompileTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileSwfToolsDecompileTest.java index c9f7b2197..36510089d 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileSwfToolsDecompileTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3CrossCompileSwfToolsDecompileTest.java @@ -68,6 +68,23 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript false); } + @Test + public void testTryCatchInIf() { + decompileMethod("swftools", "testTryCatchInIf", "var _loc1_:int = Math.random();\r\n" + + "if(_loc1_ > 10)\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "return 1;\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "}\r\n" + + "}\r\n" + + "return 2;\r\n", + false); + } + @Test public void testTryCatchInWhile() { decompileMethod("swftools", "testTryCatchInWhile", "trace(\"before loop\");\r\n" @@ -130,6 +147,57 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript false); } + @Test + public void testTryCatchInWhile3() { + decompileMethod("swftools", "testTryCatchInWhile3", "var _loc1_:int = 0;\r\n" + + "_loc1_ = 0;\r\n" + + "trace(\"before loop\");\r\n" + + "for(; _loc1_ > 5; §§goto(addr15))\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "return \"intry return\";\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "addr15:\r\n" + + "trace(\"in catch\");\r\n" + + "_loc1_++;\r\n" + + "continue;\r\n" + + "}\r\n" + + "}\r\n" + + "return \"OK\";\r\n", + false); + } + + @Test + public void testTryCatchInWhile4() { + decompileMethod("swftools", "testTryCatchInWhile4", "var _loc1_:int = 0;\r\n" + + "_loc1_ = 0;\r\n" + + "for(; true; §§goto(addr23))\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "trace(\"try2\");\r\n" + + "if(_loc1_ == 10)\r\n" + + "{\r\n" + + "trace(\"br\");\r\n" + + "break;\r\n" + + "}\r\n" + + "return;\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "addr23:\r\n" + + "trace(\"in catch2\");\r\n" + + "trace(\"a=\" + _loc1_);\r\n" + + "continue;\r\n" + + "}\r\n" + + "}\r\n" + + "trace(\"after\");\r\n", + false); + } + @Test public void testTryCatchLoop() { decompileMethod("swftools", "testTryCatchLoop", "var _loc1_:int = 0;\r\n" @@ -159,6 +227,79 @@ public class ActionScript3CrossCompileSwfToolsDecompileTest extends ActionScript false); } + @Test + public void testTryCatchLoopBreak() { + decompileMethod("swftools", "testTryCatchLoopBreak", "var _loc1_:int = 0;\r\n" + + "_loc1_ = 0;\r\n" + + "trace(\"before loop\");\r\n" + + "try\r\n" + + "{\r\n" + + "trace(\"in try1\");\r\n" + + "while(_loc1_ < 10)\r\n" + + "{\r\n" + + "trace(\"a=\" + _loc1_);\r\n" + + "_loc1_++;\r\n" + + "}\r\n" + + "trace(\"in try2\");\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "trace(\"in catch\");\r\n" + + "}\r\n" + + "trace(\"after\");\r\n", + false); + } + + @Test + public void testTryCatchLoopBreak2() { + decompileMethod("swftools", "testTryCatchLoopBreak2", "var _loc1_:int = 0;\r\n" + + "_loc1_ = 0;\r\n" + + "trace(\"before loop\");\r\n" + + "for(; _loc1_ < 20; §§goto(addr17))\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "trace(\"in try\");\r\n" + + "return;\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "addr17:\r\n" + + "trace(\"in catch\");\r\n" + + "trace(\"a=\" + _loc1_);\r\n" + + "continue;\r\n" + + "}\r\n" + + "}\r\n" + + "trace(\"after\");\r\n", + false); + } + + @Test + public void testTryCatchLoopBreak3() { + decompileMethod("swftools", "testTryCatchLoopBreak3", "var _loc1_:int = 0;\r\n" + + "_loc1_ = 0;\r\n" + + "trace(\"before loop\");\r\n" + + "while(true)\r\n" + + "{\r\n" + + "try\r\n" + + "{\r\n" + + "trace(\"in try\");\r\n" + + "}\r\n" + + "catch(e:Error)\r\n" + + "{\r\n" + + "trace(\"in catch1\");\r\n" + + "break;\r\n" + + "}\r\n" + + "catch(e:EOFError)\r\n" + + "{\r\n" + + "trace(\"in catch2\");\r\n" + + "break;\r\n" + + "}\r\n" + + "}\r\n" + + "trace(\"after\");\r\n", + false); + } + @Test public void testTryFinally() { decompileMethod("swftools", "testTryFinally", "trace(\"before try\");\r\n" diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.abc b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.abc index 58cd749ca..7e800452d 100644 Binary files a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.abc and b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.abc differ diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.asasm index 2132415f1..b12efa1d3 100644 --- a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.asasm +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/as3_assembled-0.main.asasm @@ -19,5 +19,6 @@ program #include "tests/TestDeclareReg.script.asasm" #include "tests/TestTryDoWhile.script.asasm" #include "tests/TestTryDoWhile2.script.asasm" + #include "tests/TestSwitchJoin.script.asasm" ; place to add next end ; program diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwitchJoin.class.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwitchJoin.class.asasm new file mode 100644 index 000000000..c40405f3f --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwitchJoin.class.asasm @@ -0,0 +1,195 @@ +class + refid "tests:TestSwitchJoin" + instance QName(PackageNamespace("tests"), "TestSwitchJoin") + extends QName(PackageNamespace(""), "Object") + flag SEALED + flag PROTECTEDNS + protectedns ProtectedNamespace("tests:TestSwitchJoin") + iinit + refid "tests:TestSwitchJoin/instance/init" + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + code + getlocal0 + pushscope + + getlocal0 + constructsuper 0 + + returnvoid + end ; code + end ; body + end ; method + trait method QName(PackageNamespace(""), "run") + method + refid "tests:TestSwitchJoin/instance/run" + returns QName(PackageNamespace(""), "void") + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + code + getlocal0 + pushscope + findproperty QName(PackageNamespace(""),"trace") + pushstring "before" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs0079 + ofs0010: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "0-3" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs0150 + ofs001f: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "1-6" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs0146 + ofs002e: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "5" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs013c + ofs003d: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "7" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs0132 + ofs004c: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "2" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs0128 + ofs005b: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "8" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs011e + ofs006a: + label + findproperty QName(PackageNamespace(""),"trace") + pushstring "def" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + jump ofs0114 + ofs0079: + pushbyte 57 + setlocal2 + getlocal2 + setlocal3 + pushbyte 0 + getlocal3 + ifstrictne ofs008b + pushbyte 0 + jump ofs00f2 + ofs008b: + pushbyte 3 + getlocal3 + ifstrictne ofs0098 + pushbyte 1 + jump ofs00f2 + ofs0098: + pushbyte 1 + getlocal3 + ifstrictne ofs00a5 + pushbyte 2 + jump ofs00f2 + ofs00a5: + pushbyte 6 + getlocal3 + ifstrictne ofs00b2 + pushbyte 3 + jump ofs00f2 + ofs00b2: + pushbyte 5 + getlocal3 + ifstrictne ofs00bf + pushbyte 4 + jump ofs00f2 + ofs00bf: + pushbyte 7 + getlocal3 + ifstrictne ofs00cc + pushbyte 5 + jump ofs00f2 + ofs00cc: + pushbyte 2 + getlocal3 + ifstrictne ofs00d9 + pushbyte 6 + jump ofs00f2 + ofs00d9: + pushbyte 8 + getlocal3 + ifstrictne ofs00e6 + pushbyte 7 + jump ofs00f2 + ofs00e6: + jump ofs00f0 + pushbyte 8 + jump ofs00f0 + ofs00f0: + pushbyte 8 + ofs00f2: + kill 3 + lookupswitch ofs006a, [ofs0010, ofs0010, ofs001f, ofs001f, ofs002e, ofs003d, ofs004c, ofs005b, ofs006a] + ofs0114: + findproperty QName(PackageNamespace(""),"trace") + pushstring "A" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs011e: + findproperty QName(PackageNamespace(""),"trace") + pushstring "B" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs0128: + findproperty QName(PackageNamespace(""),"trace") + pushstring "C" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs0132: + findproperty QName(PackageNamespace(""),"trace") + pushstring "D" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs013c: + findproperty QName(PackageNamespace(""),"trace") + pushstring "E" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs0146: + findproperty QName(PackageNamespace(""),"trace") + pushstring "F" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs0150: + findproperty QName(PackageNamespace(""),"trace") + pushstring "G" + callpropvoid QName(PackageNamespace(""),"trace"), 1 + pushnull + returnvalue + end ; code + end ; body + end ; method + end ; trait + end ; instance + cinit + refid "tests:TestSwitchJoin/class/init" + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + code + getlocal0 + pushscope + + returnvoid + end ; code + end ; body + end ; method +end ; class diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwitchJoin.script.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwitchJoin.script.asasm new file mode 100644 index 000000000..9a6525d0f --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestSwitchJoin.script.asasm @@ -0,0 +1,29 @@ +script + sinit + refid "tests:TestSwitchJoin/init" + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + code + getlocal0 + pushscope + + findpropstrict Multiname("TestSwitchJoin", [PackageNamespace("tests")]) + getlex QName(PackageNamespace(""), "Object") + pushscope + + getlex Multiname("Object", [PrivateNamespace(null, "tests:TestSwitchJoin"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")]) + newclass "tests:TestSwitchJoin" + popscope + initproperty QName(PackageNamespace("tests"), "TestSwitchJoin") + + returnvoid + end ; code + end ; body + end ; method + trait class QName(PackageNamespace("tests"), "TestSwitchJoin") + #include "TestSwitchJoin.class.asasm" + end ; trait +end ; script diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/bin/as3_assembled.swf b/libsrc/ffdec_lib/testdata/as3_assembled/bin/as3_assembled.swf index 6daed0f0a..1cd61aa1a 100644 Binary files a/libsrc/ffdec_lib/testdata/as3_assembled/bin/as3_assembled.swf and b/libsrc/ffdec_lib/testdata/as3_assembled/bin/as3_assembled.swf differ