diff --git a/CHANGELOG.md b/CHANGELOG.md index afeb9c7d7..be7a80b2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed +- [#2474] Gotos incorrectly decompiled ## [24.0.1] - 2025-06-27 ### Fixed @@ -3874,6 +3876,7 @@ Major version of SWF to XML export changed to 2. [alpha 9]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha8...alpha9 [alpha 8]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha7...alpha8 [alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7 +[#2474]: https://www.free-decompiler.com/flash/issues/2474 [#2476]: https://www.free-decompiler.com/flash/issues/2476 [#2404]: https://www.free-decompiler.com/flash/issues/2404 [#1418]: https://www.free-decompiler.com/flash/issues/1418 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 70809a773..f4519b3ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -1391,6 +1391,7 @@ public class AVM2Graph extends Graph { List stopPart2 = new ArrayList<>(stopPart); List stopPartKind2 = new ArrayList<>(stopPartKind); stopPart2.add(exAfterPart); + stopPartKind2.add(StopPartKind.OTHER); if (defaultPart != null) { stopPart2.add(defaultPart); stopPartKind2.add(StopPartKind.OTHER); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index 9a95fe09b..598edea19 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -989,6 +989,7 @@ public class Graph { processIfGotos2(new ArrayList<>(), gotos, ret, ret); processIfGotos(gotos, ret, ret); + processScriptEnd(ret); Map usages = new HashMap<>(); Map lastUsage = new HashMap<>(); @@ -1673,6 +1674,26 @@ public class Graph { } } + private void processScriptEnd(List ret) { + if (!ret.isEmpty()) { + if (ret.get(ret.size() - 1) instanceof ScriptEndItem) { + ret.remove(ret.size() - 1); + processScriptEnd(ret); + return; + } + if (ret.get(ret.size() - 1) instanceof Block) { + Block blk = (Block) ret.get(ret.size() - 1); + if (blk instanceof SwitchItem) { + return; + } + + for (List sub : blk.getSubs()) { + processScriptEnd(sub); + } + } + } + } + /** * Processes ifs. * @@ -2879,9 +2900,9 @@ public class Graph { if (stopPart.contains(part)) { - /*boolean hasBlockClosesAfter = false; + boolean isRealStopPart = false; //this weird stuff handles some goto problems: - loopi: + /*loopi: for (int i = 0; i < stopPartKind.size(); i++) { if (stopPart.get(i) == part) { for (int j = i + 1; j < stopPartKind.size(); j++) { @@ -2893,17 +2914,31 @@ public class Graph { } } } + }*/ + + //isRealStopPart = stopPart.get(stopPart.size() - 1) == part; + for (int i = stopPartKind.size() - 1; i >= 0; i--) { + if (stopPartKind.get(i) == StopPartKind.OTHER && stopPart.get(i) == part) { + isRealStopPart = true; + break; + } + if (stopPartKind.get(i) == StopPartKind.BLOCK_CLOSE) { + if (stopPart.get(i) == part) { + isRealStopPart = true; + } + break; + } } - if (!hasBlockClosesAfter) {*/ - if (currentLoop != null) { - currentLoop.phase = 0; + if (isRealStopPart) { + if (currentLoop != null) { + currentLoop.phase = 0; + } + if (debugPrintGraph) { + System.err.println("Stopped on part " + part); + } + return ret; } - if (debugPrintGraph) { - System.err.println("Stopped on part " + part); - } - return ret; - //} } if (code.size() <= part.start) { @@ -2927,6 +2962,7 @@ public class Graph { if (firstCodePos == -1) { firstCodePos = firstCode.size(); } + ((GraphPartMarkedArrayList) firstCode).clearCurrentParts(); ((GraphPartMarkedArrayList) firstCode).startPart(part); } @@ -3308,7 +3344,8 @@ public class Graph { List stopPartKind2 = new ArrayList<>(stopPartKind); if ((!isEmpty) && (next != null)) { - if (!stopPart2.contains(next)) { //?? might be a break or something + //if (!stopPart2.contains(next)) + { //?? might be a break or something stopPart2.add(next); stopPartKind2.add(StopPartKind.BLOCK_CLOSE); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java index e7ab428ef..3a9ccfc46 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/ScriptEndItem.java @@ -39,6 +39,7 @@ public class ScriptEndItem extends GraphTargetItem implements ExitItem { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + writer.append("return;"); return writer; } @@ -49,7 +50,7 @@ public class ScriptEndItem extends GraphTargetItem implements ExitItem { @Override public boolean isEmpty() { - return true; + return false; } @Override 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 07fd458c6..5a4edbd15 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 @@ -283,12 +283,13 @@ public class ActionScript3AssembledDecompileTest extends ActionScript3DecompileT + "if(b)\r\n" + "{\r\n" + "trace(\"a\");\r\n" + + "addr39:\r\n" + + "trace(\"c\");\r\n" + "}\r\n" + "break;\r\n" + "}\r\n" + "trace(\"b\");\r\n" - + "trace(\"c\");\r\n" - + "break;\r\n" + + "§§goto(addr39);\r\n" + "case 2:\r\n" + "trace(\"case2\");\r\n" + "}\r\n", diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassTest.java index 39c640a89..743e18a40 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/as3decompile/ActionScript3ClassTest.java @@ -726,7 +726,7 @@ public class ActionScript3ClassTest extends ActionScript3DecompileTestBase { public void testHaxeStaticVars() { /* Static vars in Haxe are initialized in script initializer (normal flash uses class initializer) - */ + */ decompileScriptPack("haxe", "tests_classes.TestStaticVars", "package tests_classes\n" + "{\n" + " public class TestStaticVars\n" diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java index 808b08290..9bf6b806c 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3Generator.java @@ -61,7 +61,7 @@ public class AS3Generator { sortedPacks.put(pack.getClassPath().toRawString(), pack); } s.append("/*\r\n" - + " * Copyright (C) 2010-2024 JPEXS, All rights reserved.\r\n" + + " * Copyright (C) 2010-2025 JPEXS, All rights reserved.\r\n" + " * \r\n" + " * This library is free software; you can redistribute it and/or\r\n" + " * modify it under the terms of the GNU Lesser General Public\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 b39578ba0..17a3ba11b 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 6cbcdf71a..f3fd6eeea 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 @@ -35,5 +35,9 @@ program #include "tests/TestSwitchMostCommon.script.asasm" #include "tests/TestXmlStar.script.asasm" #include "tests/TestLocalRegIf.script.asasm" + #include "tests/TestGoto.script.asasm" + #include "tests/TestGoto2.script.asasm" + #include "tests/TestAlwaysBreak.script.asasm" + #include "tests/TestAlwaysBreak2.script.asasm" ; place to add next end ; program diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak.class.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak.class.asasm new file mode 100644 index 000000000..8fedda177 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak.class.asasm @@ -0,0 +1,101 @@ +class + refid "tests:TestAlwaysBreak" + instance QName(PackageNamespace("tests"), "TestAlwaysBreak") + extends QName(PackageNamespace(""), "Object") + flag SEALED + flag PROTECTEDNS + protectedns ProtectedNamespace("tests:TestAlwaysBreak") + iinit + refid "tests:TestAlwaysBreak/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:TestAlwaysBreak/instance/run" + returns QName(PackageNamespace(""), "void") + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + code + getlocal0 + pushscope + + debug 1, "v", 0, 15 + jump ofs0055 + ofs000c: + label + pushbyte 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + getlocal1 + pushbyte 4 + ifngt ofs0048 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + getlocal1 + pushbyte 10 + ifngt ofs003e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + jump ofs005a + ofs003e: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "d" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + ofs0048: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "e" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + jump ofs005a + ofs0055: + pushtrue + iftrue ofs000c + ofs005a: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "f" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + returnvoid + + returnvoid + end ; code + end ; body + end ; method + end ; trait + end ; instance + cinit + refid "tests:TestAlwaysBreak/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/TestAlwaysBreak.script.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak.script.asasm new file mode 100644 index 000000000..66341c64f --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak.script.asasm @@ -0,0 +1,29 @@ +script + sinit + refid "tests:TestAlwaysBreak/init" + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + code + getlocal0 + pushscope + + findpropstrict Multiname("TestAlwaysBreak", [PackageNamespace("tests")]) + getlex QName(PackageNamespace(""), "Object") + pushscope + + getlex Multiname("Object", [PrivateNamespace(null, "tests:TestAlwaysBreak"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")]) + newclass "tests:TestAlwaysBreak" + popscope + initproperty QName(PackageNamespace("tests"), "TestAlwaysBreak") + + returnvoid + end ; code + end ; body + end ; method + trait class QName(PackageNamespace("tests"), "TestAlwaysBreak") + #include "TestAlwaysBreak.class.asasm" + end ; trait +end ; script diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak2.class.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak2.class.asasm new file mode 100644 index 000000000..cef4d28b2 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak2.class.asasm @@ -0,0 +1,100 @@ +class + refid "tests:TestAlwaysBreak2" + instance QName(PackageNamespace("tests"), "TestAlwaysBreak2") + extends QName(PackageNamespace(""), "Object") + flag SEALED + flag PROTECTEDNS + protectedns ProtectedNamespace("tests:TestAlwaysBreak2") + iinit + refid "tests:TestAlwaysBreak2/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:TestAlwaysBreak2/instance/run" + returns QName(PackageNamespace(""), "void") + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + code + getlocal0 + pushscope + + debug 1, "v", 0, 15 + jump ofs0055 + ofs000c: + label + pushbyte 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + getlocal1 + pushbyte 4 + ifngt ofs0048 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + getlocal1 + pushbyte 10 + ifngt ofs003e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + jump ofs005a + ofs003e: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "d" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + ofs0048: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "e" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + jump ofs005a + ofs0055: + jump ofs000c + ofs005a: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]) + pushstring "f" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAlwaysBreak"),ProtectedNamespace("tests:TestAlwaysBreak"),StaticProtectedNs("tests:TestAlwaysBreak"),PrivateNamespace("TestAlwaysBreak.as$33")]), 1 + returnvoid + + returnvoid + end ; code + end ; body + end ; method + end ; trait + end ; instance + cinit + refid "tests:TestAlwaysBreak2/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/TestAlwaysBreak2.script.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak2.script.asasm new file mode 100644 index 000000000..efaff1824 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestAlwaysBreak2.script.asasm @@ -0,0 +1,29 @@ +script + sinit + refid "tests:TestAlwaysBreak2/init" + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + code + getlocal0 + pushscope + + findpropstrict Multiname("TestAlwaysBreak2", [PackageNamespace("tests")]) + getlex QName(PackageNamespace(""), "Object") + pushscope + + getlex Multiname("Object", [PrivateNamespace(null, "tests:TestAlwaysBreak2"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")]) + newclass "tests:TestAlwaysBreak2" + popscope + initproperty QName(PackageNamespace("tests"), "TestAlwaysBreak2") + + returnvoid + end ; code + end ; body + end ; method + trait class QName(PackageNamespace("tests"), "TestAlwaysBreak2") + #include "TestAlwaysBreak2.class.asasm" + end ; trait +end ; script diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto.class.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto.class.asasm new file mode 100644 index 000000000..742fe4f20 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto.class.asasm @@ -0,0 +1,111 @@ +class + refid "tests:TestGoto" + instance QName(PackageNamespace("tests"), "TestGoto") + extends QName(PackageNamespace(""), "Object") + flag SEALED + flag PROTECTEDNS + protectedns ProtectedNamespace("tests:TestGoto") + iinit + refid "tests:TestGoto/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:TestGoto/instance/run" + returns QName(PackageNamespace(""), "void") + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + code + getlocal0 + pushscope + + debug 1, "v", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + getlocal1 + pushbyte 1 + ifngt ofs003e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + getlocal1 + pushbyte 2 + ifngt ofs0031 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "goto" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + jump ofs0061 + ofs0031: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + jump ofs0047 + ofs003e: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + ofs0047: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "d" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + getlocal1 + pushbyte 3 + ifngt ofs006f + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "e" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + ofs0061: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "f" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + jump ofs0079 + ofs006f: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "g" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + ofs0079: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]) + pushstring "end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto"),ProtectedNamespace("tests:TestGoto"),StaticProtectedNs("tests:TestGoto"),PrivateNamespace("TestGoto.as$31")]), 1 + returnvoid + + returnvoid + end ; code + end ; body + end ; method + end ; trait + end ; instance + cinit + refid "tests:TestGoto/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/TestGoto.script.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto.script.asasm new file mode 100644 index 000000000..946165cc5 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto.script.asasm @@ -0,0 +1,29 @@ +script + sinit + refid "tests:TestGoto/init" + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + code + getlocal0 + pushscope + + findpropstrict Multiname("TestGoto", [PackageNamespace("tests")]) + getlex QName(PackageNamespace(""), "Object") + pushscope + + getlex Multiname("Object", [PrivateNamespace(null, "tests:TestGoto"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")]) + newclass "tests:TestGoto" + popscope + initproperty QName(PackageNamespace("tests"), "TestGoto") + + returnvoid + end ; code + end ; body + end ; method + trait class QName(PackageNamespace("tests"), "TestGoto") + #include "TestGoto.class.asasm" + end ; trait +end ; script diff --git a/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto2.class.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto2.class.asasm new file mode 100644 index 000000000..7f01a6086 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto2.class.asasm @@ -0,0 +1,121 @@ +class + refid "tests:TestGoto2" + instance QName(PackageNamespace("tests"), "TestGoto2") + extends QName(PackageNamespace(""), "Object") + flag SEALED + flag PROTECTEDNS + protectedns ProtectedNamespace("tests:TestGoto2") + iinit + refid "tests:TestGoto2/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:TestGoto2/instance/run" + returns QName(PackageNamespace(""), "void") + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + code + getlocal0 + pushscope + + debug 1, "v", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + getlocal1 + pushbyte 1 + ifngt ofs003e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + getlocal1 + pushbyte 2 + ifngt ofs0031 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "goto" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + jump ofs0074 + ofs0031: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + jump ofs0047 + ofs003e: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + ofs0047: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "d" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + getlocal1 + pushbyte 3 + ifngt ofs008c + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "e" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + getlex Multiname("b",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushbyte 5 + ifngt ofs007e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "f" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + ofs0074: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "g" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + ofs007e: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "h" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + jump ofs0096 + ofs008c: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "i" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + ofs0096: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]) + pushstring "end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGoto2"),ProtectedNamespace("tests:TestGoto2"),StaticProtectedNs("tests:TestGoto2"),PrivateNamespace("TestGoto2.as$32")]), 1 + returnvoid + + returnvoid + end ; code + end ; body + end ; method + end ; trait + end ; instance + cinit + refid "tests:TestGoto2/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/TestGoto2.script.asasm b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto2.script.asasm new file mode 100644 index 000000000..74ca55a71 --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as3_assembled/abc/as3_assembled-0/tests/TestGoto2.script.asasm @@ -0,0 +1,29 @@ +script + sinit + refid "tests:TestGoto2/init" + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + code + getlocal0 + pushscope + + findpropstrict Multiname("TestGoto2", [PackageNamespace("tests")]) + getlex QName(PackageNamespace(""), "Object") + pushscope + + getlex Multiname("Object", [PrivateNamespace(null, "tests:TestGoto2"), PackageNamespace(""), PackageNamespace("tests"), PackageInternalNs("tests"), Namespace("http://adobe.com/AS3/2006/builtin")]) + newclass "tests:TestGoto2" + popscope + initproperty QName(PackageNamespace("tests"), "TestGoto2") + + returnvoid + end ; code + end ; body + end ; method + trait class QName(PackageNamespace("tests"), "TestGoto2") + #include "TestGoto2.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 a98b47fe1..692633add 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