diff --git a/.gitignore b/.gitignore index 79aa4e583..d7320c97f 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ hs_err_pid*.log /libsrc/ffdec_lib/testdata/decompile/ /libsrc/ffdec_lib/testdata/recompile/ /libsrc/ffdec_lib/testdata/directediting/ +/libsrc/ffdec_lib/testactual/ /libsrc/ffdec_lib/coverage.ec /libsrc/ffdec_lib/revision.txt /libsrc/ffdec_lib/releases/ diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java new file mode 100644 index 000000000..232fb6f74 --- /dev/null +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2010-2026 JPEXS, All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. + */ +package com.jpexs.decompiler.flash; + +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.ScriptPack; +import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; +import com.jpexs.decompiler.flash.abc.types.ConvertData; +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; +import com.jpexs.decompiler.flash.helpers.CodeFormatting; +import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter; +import com.jpexs.decompiler.flash.importers.As3ScriptReplaceException; +import com.jpexs.decompiler.flash.importers.As3ScriptReplacerFactory; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.helpers.Helper; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import static org.testng.Assert.fail; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * + * @author JPEXS + */ +public class ActionScript3DirectEditingPCodeTest { + + @BeforeClass + public void init() { + Configuration.autoDeobfuscate.set(false); + Configuration.simplifyExpressions.set(false); + Configuration._debugCopy.set(false); + Configuration.useFlexAs3Compiler.set(false); + } + + @Test + public void testDirectEditingPCode() throws IOException, InterruptedException, AVM2ParseException, CompilationException { + String filePath = "testdata/as3_new/bin/as3_new.flex.swf"; + File expectedDir = new File("testexpected/as3_new"); + File actualDir = new File("testactual/as3_new"); + + if (!actualDir.exists()) { + actualDir.mkdirs(); + } + + + File playerSWC = Configuration.getPlayerSWC(); + if (playerSWC == null) { + throw new IOException("Player SWC library not found, please place it to " + Configuration.getFlashLibPath()); + } + try { + SWF swf = new SWF(new BufferedInputStream(new FileInputStream(filePath)), false); + if (swf.isAS3()) { + List allAbcs = new ArrayList<>(); + for (ABCContainerTag ct : swf.getAbcList()) { + allAbcs.add(ct.getABC()); + } + for (ABC abc : allAbcs) { + for (int s = 0; s < abc.script_info.size(); s++) { + HighlightedTextWriter htw = new HighlightedTextWriter(new CodeFormatting(), false); + ScriptPack en = abc.script_info.get(s).getPacks(abc, s, null, allAbcs).get(0); + String classPathString = en.getClassPath().toString(); + + try { + en.toSource(swf.getAbcIndex(), htw, abc.script_info.get(s).traits.traits, new ConvertData(), ScriptExportMode.AS, false, false, false); + htw.finishHilights(); + String original = htw.toString(); + abc.replaceScriptPack(As3ScriptReplacerFactory.createFFDec() /*TODO: test the otherone*/, en, original, new ArrayList<>()); + + htw = new HighlightedTextWriter(new CodeFormatting(), false); + en = abc.script_info.get(s).getPacks(abc, s, null, allAbcs).get(0); + en.toSource(swf.getAbcIndex(), htw, abc.script_info.get(s).traits.traits, new ConvertData(), ScriptExportMode.PCODE, false, false, false); + htw.finishHilights(); + String modifiedPcode = htw.toString(); + String classDirPath = classPathString.replace(".", "/"); + File actualFile = new File(actualDir.getAbsolutePath() + "/" + classDirPath + ".as"); + File expectedFile = new File(expectedDir.getAbsolutePath() + "/" + classDirPath + ".as"); + File outParent = actualFile.getParentFile(); + if (!outParent.exists()) { + outParent.mkdirs(); + } + FileOutputStream fos = new FileOutputStream(actualFile); + fos.write(modifiedPcode.getBytes("UTF-8")); + fos.close(); + + if (!expectedFile.exists()) { + fail("Expected file " + expectedFile.getAbsolutePath() + " does not exists!"); + } + + String expectedText = Helper.readTextFile(expectedFile.getAbsolutePath()); + String actualText = modifiedPcode; + + expectedText = expectedText.replace("\r\n", "\n"); + actualText = actualText.replace("\r\n", "\n"); + + if (!Objects.equals(actualText, expectedText)) { + fail("Files are not same - " + actualDir.getPath() + "/" + classDirPath + ".as"); + } + } catch (As3ScriptReplaceException ex) { + fail("Exception during decompilation - file: " + filePath + " class: " + classPathString + " msg:" + ex.getMessage(), ex); + } catch (Exception ex) { + fail("Exception during decompilation - file: " + filePath + " class: " + classPathString + " msg:" + ex.getMessage(), ex); + throw ex; + } + } + } + } + } catch (Exception ex) { + fail("Exception during decompilation: " + filePath + ":" + ex.getMessage(), ex); + } + } +} diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java index 12793db76..07f7323a5 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/DirectEditingTest.java @@ -85,11 +85,9 @@ public class DirectEditingTest extends FileTestBase { dotest = true; } if (!dotest) { - System.out.println("Skipped:" + classPathString); continue; } - - System.out.println("Recompiling:" + classPathString + "..."); + try { en.toSource(swf.getAbcIndex(), htw, abc.script_info.get(s).traits.traits, new ConvertData(), ScriptExportMode.AS, false, false, false); htw.finishHilights(); diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3DirectEditingPCodeGenerator.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3DirectEditingPCodeGenerator.java new file mode 100644 index 000000000..65ec9a871 --- /dev/null +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS3DirectEditingPCodeGenerator.java @@ -0,0 +1,84 @@ +package com.jpexs.decompiler.flash.generators; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.abc.ABC; +import com.jpexs.decompiler.flash.abc.ScriptPack; +import com.jpexs.decompiler.flash.abc.types.ConvertData; +import com.jpexs.decompiler.flash.configuration.Configuration; +import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; +import com.jpexs.decompiler.flash.helpers.CodeFormatting; +import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter; +import com.jpexs.decompiler.flash.importers.As3ScriptReplaceException; +import com.jpexs.decompiler.flash.importers.As3ScriptReplacerFactory; +import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author JPEXS + */ +public class AS3DirectEditingPCodeGenerator { + public static void main(String[] args) throws IOException, InterruptedException { + String filePath = "testdata/as3_new/bin/as3_new.flex.swf"; + File outDir = new File("testexpected/as3_new"); + + + Configuration.autoDeobfuscate.set(false); + Configuration.simplifyExpressions.set(false); + Configuration._debugCopy.set(false); + Configuration.useFlexAs3Compiler.set(false); + + if (!outDir.exists()) { + outDir.mkdirs(); + } + + SWF swf = new SWF(new BufferedInputStream(new FileInputStream(filePath)), false); + + boolean dotest = false; + List allAbcs = new ArrayList<>(); + for (ABCContainerTag ct : swf.getAbcList()) { + allAbcs.add(ct.getABC()); + } + for (ABC abc : allAbcs) { + for (int s = 0; s < abc.script_info.size(); s++) { + HighlightedTextWriter htw = new HighlightedTextWriter(new CodeFormatting(), false); + ScriptPack en = abc.script_info.get(s).getPacks(abc, s, null, allAbcs).get(0); + String classPathString = en.getClassPath().toString(); + + try { + en.toSource(swf.getAbcIndex(), htw, abc.script_info.get(s).traits.traits, new ConvertData(), ScriptExportMode.AS, false, false, false); + htw.finishHilights(); + String original = htw.toString(); + abc.replaceScriptPack(As3ScriptReplacerFactory.createFFDec() /*TODO: test the otherone*/, en, original, new ArrayList<>()); + + htw = new HighlightedTextWriter(new CodeFormatting(), false); + en = abc.script_info.get(s).getPacks(abc, s, null, allAbcs).get(0); + en.toSource(swf.getAbcIndex(), htw, abc.script_info.get(s).traits.traits, new ConvertData(), ScriptExportMode.PCODE, false, false, false); + htw.finishHilights(); + String modifiedPcode = htw.toString(); + String classDirPath = classPathString.replace(".", "/"); + File outFile = new File(outDir.getAbsolutePath() + "/" + classDirPath + ".as"); + File outParent = outFile.getParentFile(); + if (!outParent.exists()) { + outParent.mkdirs(); + } + FileOutputStream fos = new FileOutputStream(outFile); + fos.write(modifiedPcode.getBytes("UTF-8")); + fos.close(); + + } catch (As3ScriptReplaceException ex) { + throw new RuntimeException("Exception during decompilation - file: " + filePath + " class: " + classPathString + " msg:" + ex.getMessage(), ex); + } catch (Exception ex) { + throw new RuntimeException("Exception during decompilation - file: " + filePath + " class: " + classPathString + " msg:" + ex.getMessage(), ex); + } + } + } + System.exit(0); + } +} diff --git a/libsrc/ffdec_lib/testexpected/as3_new/Main.as b/libsrc/ffdec_lib/testexpected/as3_new/Main.as new file mode 100644 index 000000000..b13c25942 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/Main.as @@ -0,0 +1,143 @@ +package +{ + import flash.display.Sprite; + import flash.events.Event; + import tests_classes.TestScriptInitializer; + + public class Main extends Sprite + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 8 + maxscopedepth 9 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function Main() + { + method + name "Main/Main" + returns null + + body + maxstack 3 + localcount 1 + initscopedepth 9 + maxscopedepth 10 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlex QName(PackageNamespace(""),"stage") + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0018 + getlocal0 + callpropvoid QName(PrivateNamespace("Main"),"init"), 0 + jump ofs0024 + ofs0018: + findpropstrict QName(PackageNamespace(""),"addEventListener") + getlex QName(PackageNamespace("flash.events"),"Event") + getproperty QName(PackageNamespace(""),"ADDED_TO_STAGE") + getlocal0 + getproperty QName(PrivateNamespace("Main"),"init") + callpropvoid QName(PackageNamespace(""),"addEventListener"), 2 + ofs0024: + returnvoid + end ; code + end ; body + end ; method + } + + private function init(e:Event = null) : void + { + trait method QName(PrivateNamespace("Main"),"init") + dispid 0 + method + name "Main/private/init" + flag HAS_OPTIONAL + param QName(PackageNamespace("flash.events"),"Event") + optional Null() + returns QName(PackageNamespace(""),"void") + + body + maxstack 3 + localcount 2 + initscopedepth 9 + maxscopedepth 10 + + code + getlocal0 + pushscope + debug 1, "e", 0, 0 + findpropstrict QName(PackageNamespace(""),"removeEventListener") + getlex QName(PackageNamespace("flash.events"),"Event") + getproperty QName(PackageNamespace(""),"ADDED_TO_STAGE") + getlocal0 + getproperty QName(PrivateNamespace("Main"),"init") + callpropvoid QName(PackageNamespace(""),"removeEventListener"), 2 + findpropstrict QName(PackageNamespace("tests_classes"),"TestScriptInitializer") + constructprop QName(PackageNamespace("tests_classes"),"TestScriptInitializer"), 0 + pop + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 8 + + code + getlocal0 + pushscope + getscopeobject 0 + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace("flash.events"),"EventDispatcher") + pushscope + getlex QName(PackageNamespace("flash.display"),"DisplayObject") + pushscope + getlex QName(PackageNamespace("flash.display"),"InteractiveObject") + pushscope + getlex QName(PackageNamespace("flash.display"),"DisplayObjectContainer") + pushscope + getlex QName(PackageNamespace("flash.display"),"Sprite") + pushscope + getlex QName(PackageNamespace("flash.display"),"Sprite") + newclass 0 + popscope + popscope + popscope + popscope + popscope + popscope + initproperty QName(PackageNamespace(""),"Main") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestActivationArguments.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestActivationArguments.as new file mode 100644 index 000000000..3cdc5fc96 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestActivationArguments.as @@ -0,0 +1,132 @@ +package tests +{ + public class TestActivationArguments + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestActivationArguments() + { + method + name "tests:TestActivationArguments/TestActivationArguments" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestActivationArguments/run" + flag NEED_ACTIVATION + flag NEED_ARGUMENTS + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"arguments") + slotid 1 + type QName(PackageNamespace(""),"Array") + end ; trait + trait slot QName(PackageInternalNs("tests"),"func") + slotid 2 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "arguments", 0, 0 + debug 1, "+$activation", 1, 0 + newactivation + dup + setlocal2 + pushscope + getscopeobject 1 + getlocal1 + coerce QName(PackageNamespace(""),"Array") + setslot 1 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 2 + getscopeobject 1 + getslot 1 + getproperty Multiname("length",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestActivationArguments"),ProtectedNamespace("tests:TestActivationArguments"),StaticProtectedNs("tests:TestActivationArguments"),PrivateNamespace("TestActivationArguments.as$0")]) + pushbyte 0 + ifngt ofs0038 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestActivationArguments"),ProtectedNamespace("tests:TestActivationArguments"),StaticProtectedNs("tests:TestActivationArguments"),PrivateNamespace("TestActivationArguments.as$0")]) + getscopeobject 1 + getslot 1 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestActivationArguments"),ProtectedNamespace("tests:TestActivationArguments"),StaticProtectedNs("tests:TestActivationArguments"),PrivateNamespace("TestActivationArguments.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestActivationArguments"),ProtectedNamespace("tests:TestActivationArguments"),StaticProtectedNs("tests:TestActivationArguments"),PrivateNamespace("TestActivationArguments.as$0")]), 1 + ofs0038: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestActivationArguments",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestActivationArguments") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestAlwaysBreak.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestAlwaysBreak.as new file mode 100644 index 000000000..0d1dfe566 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestAlwaysBreak.as @@ -0,0 +1,138 @@ +package tests +{ + public class TestAlwaysBreak + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestAlwaysBreak() + { + method + name "tests:TestAlwaysBreak/TestAlwaysBreak" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestAlwaysBreak/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "v", 0, 13 + pushbyte 0 + convert_i + setlocal1 + pushbyte 5 + convert_i + 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$0")]) + 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$0")]), 1 + jump ofs004d + ofs001a: + label + getlocal1 + pushbyte 4 + ifngt ofs0042 + 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$0")]) + 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$0")]), 1 + getlocal1 + pushbyte 10 + ifngt ofs003b + 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$0")]) + 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$0")]), 1 + jump ofs0052 + ofs003b: + 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$0")]) + 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$0")]), 1 + ofs0042: + 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$0")]) + 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$0")]), 1 + jump ofs0052 + ofs004d: + pushtrue + iftrue ofs001a + ofs0052: + 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$0")]) + 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$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestAlwaysBreak",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestAlwaysBreak") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestAndOrCoercion.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestAndOrCoercion.as new file mode 100644 index 000000000..57f5a3949 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestAndOrCoercion.as @@ -0,0 +1,309 @@ +package tests +{ + import tests_classes.mypackage1.TestClass; + import tests_classes.mypackage1.TestInterface; + + public class TestAndOrCoercion + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var ti:TestInterface; + + private var tc:TestClass; + + private var i:int = 5; + + private var j:int = 6; + + private var tx:TestInterface; + + public function TestAndOrCoercion() + { + method + name "tests:TestAndOrCoercion/TestAndOrCoercion" + returns null + + body + maxstack 3 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iftrue ofs0014 + pop + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"tc") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + ofs0014: + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"tx") + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : TestInterface + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestAndOrCoercion/run" + returns QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + + body + maxstack 4 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "x", 0, 26 + debug 1, "y", 1, 27 + debug 1, "z", 2, 28 + debug 1, "a", 3, 30 + debug 1, "b", 4, 31 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iftrue ofs0050 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iffalse ofs0050 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + ofs0050: + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + setlocal1 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iffalse ofs0070 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + ofs0070: + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + setlocal2 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"tc") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + dup + convert_b + iftrue ofs0090 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"tc") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + ofs0090: + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + setlocal3 + getlocal0 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iffalse ofs00b1 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + ofs00b1: + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce_a + dup + convert_b + iffalse ofs00ce + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce_a + ofs00ce: + coerce_a + setlocal 4 + pushbyte 1 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"i") + dup + convert_b + iftrue ofs00e0 + pop + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"j") + ofs00e0: + add + convert_i + setlocal 5 + getlocal0 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iffalse ofs0102 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + ofs0102: + callpropvoid QName(PackageNamespace(""),"test"), 1 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + dup + convert_b + iffalse ofs0122 + pop + getlocal0 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + dup + setlocal 6 + setproperty QName(PrivateNamespace("tests:TestAndOrCoercion"),"ti") + getlocal 6 + kill 6 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + ofs0122: + returnvalue + end ; code + end ; body + end ; method + } + + public function test(p:TestInterface) : void + { + trait method QName(PackageNamespace(""),"test") + dispid 0 + method + name "tests:TestAndOrCoercion/test" + param QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "p", 0, 0 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestAndOrCoercion",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestAndOrCoercion") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestArguments.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestArguments.as new file mode 100644 index 000000000..405739838 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestArguments.as @@ -0,0 +1,101 @@ +package tests +{ + public class TestArguments + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestArguments() + { + method + name "tests:TestArguments/TestArguments" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestArguments/run" + flag NEED_ARGUMENTS + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "arguments", 0, 0 + getlocal1 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestArguments"),ProtectedNamespace("tests:TestArguments"),StaticProtectedNs("tests:TestArguments"),PrivateNamespace("TestArguments.as$0")]) + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestArguments",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestArguments") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestBitwiseOperands.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestBitwiseOperands.as new file mode 100644 index 000000000..98b292ba9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestBitwiseOperands.as @@ -0,0 +1,141 @@ +package tests +{ + public class TestBitwiseOperands + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestBitwiseOperands() + { + method + name "tests:TestBitwiseOperands/TestBitwiseOperands" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestBitwiseOperands/run" + returns null + + body + maxstack 2 + localcount 9 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + debug 1, "d", 3, 16 + debug 1, "e", 4, 17 + debug 1, "f", 5, 18 + debug 1, "g", 6, 19 + debug 1, "h", 7, 20 + pushbyte 100 + convert_i + setlocal1 + getlocal1 + pushshort 2303 + bitand + convert_i + setlocal2 + pushshort 2303 + getlocal1 + bitand + convert_i + setlocal3 + getlocal1 + pushshort 1152 + bitor + convert_i + setlocal 4 + pushshort 1152 + getlocal1 + bitor + convert_i + setlocal 5 + getlocal1 + pushshort 1601 + bitxor + convert_i + setlocal 6 + pushshort 1601 + getlocal1 + bitxor + convert_i + setlocal 7 + pushshort 384 + bitnot + convert_i + setlocal 8 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestBitwiseOperands",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestBitwiseOperands") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCallCall.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCallCall.as new file mode 100644 index 000000000..a01ce495b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCallCall.as @@ -0,0 +1,113 @@ +package tests +{ + import flash.utils.getDefinitionByName; + + public class TestCallCall + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestCallCall() + { + method + name "tests:TestCallCall/TestCallCall" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestCallCall/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "o", 0, 15 + debug 1, "o2", 1, 16 + findpropstrict QName(PackageNamespace("flash.utils"),"getDefinitionByName") + pushstring "Object" + constructprop QName(PackageNamespace("flash.utils"),"getDefinitionByName"), 1 + getglobalscope + call 0 + coerce_a + setlocal1 + findpropstrict QName(PackageNamespace("flash.utils"),"getDefinitionByName") + pushstring "Object" + callproperty QName(PackageNamespace("flash.utils"),"getDefinitionByName"), 1 + construct 0 + coerce_a + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestCallCall",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestCallCall") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCallLocal.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCallLocal.as new file mode 100644 index 000000000..a47d3e896 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCallLocal.as @@ -0,0 +1,139 @@ +package tests +{ + public class TestCallLocal + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestCallLocal() + { + method + name "tests:TestCallLocal/TestCallLocal" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function getF() : Function + { + trait method QName(PackageNamespace(""),"getF") + dispid 0 + method + name "tests:TestCallLocal/getF" + flag NEED_ACTIVATION + returns QName(PackageNamespace(""),"Function") + + body + maxstack 2 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + newfunction 3 + returnvalue + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestCallLocal/run" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "f", 0, 21 + debug 1, "b", 1, 22 + getlocal0 + callproperty QName(PackageNamespace(""),"getF"), 0 + coerce QName(PackageNamespace(""),"Function") + setlocal1 + getlocal1 + getglobalscope + pushbyte 1 + pushbyte 3 + call 2 + convert_i + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestCallLocal",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestCallLocal") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCatchFinally.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCatchFinally.as new file mode 100644 index 000000000..2245c628f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCatchFinally.as @@ -0,0 +1,174 @@ +package tests +{ + public class TestCatchFinally + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestCatchFinally() + { + method + name "tests:TestCatchFinally/TestCatchFinally" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestCatchFinally/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 4 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type null + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 5 + coerce_a + setslot 1 + ofs0012: + getscopeobject 1 + pushbyte 9 + coerce_a + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]) + pushstring "intry" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]), 1 + ofs0020: + jump ofs003b + ofs0024: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]) + pushstring "incatch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]), 1 + popscope + kill 2 + ofs003b: + pushbyte -1 + ofs003d: + jump ofs005c + ofs0041: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + pushscope + popscope + kill 2 + coerce_a + setlocal3 + pushbyte 0 + jump ofs005c + label + pop + ofs0057: + label + getlocal3 + kill 3 + throw + ofs005c: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]) + pushstring "infinally" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]), 1 + lookupswitch ofs006b, [ofs0057] + ofs006b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]) + pushstring "after" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCatchFinally"),ProtectedNamespace("tests:TestCatchFinally"),StaticProtectedNs("tests:TestCatchFinally"),PrivateNamespace("TestCatchFinally.as$0")]), 1 + returnvoid + end ; code + try from ofs0012 to ofs0020 target ofs0024 type null name QName(PackageNamespace(""),"e") end + try from ofs0012 to ofs003d target ofs0041 type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestCatchFinally",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestCatchFinally") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChain2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChain2.as new file mode 100644 index 000000000..3678d9aac --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChain2.as @@ -0,0 +1,162 @@ +package tests +{ + public class TestChain2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestChain2() + { + method + name "tests:TestChain2/TestChain2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestChain2/run" + returns null + + body + maxstack 2 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "g", 0, 13 + debug 1, "h", 1, 14 + debug 1, "extraLine", 2, 15 + debug 1, "r", 3, 16 + debug 1, "t", 4, 17 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal1 + pushfalse + convert_b + setlocal2 + pushfalse + convert_b + setlocal3 + pushbyte 7 + convert_i + setlocal 4 + pushbyte 0 + convert_i + setlocal 5 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestChain2"),"getInt"), 0 + convert_i + setlocal 5 + getlocal 5 + pushbyte 1 + add + getlocal1 + getproperty QName(PackageNamespace(""),"length") + ifnlt ofs0047 + inclocal_i 5 + pushtrue + convert_b + setlocal2 + ofs0047: + getlocal 5 + pushbyte 0 + ifnge ofs0056 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChain2"),ProtectedNamespace("tests:TestChain2"),StaticProtectedNs("tests:TestChain2"),PrivateNamespace("TestChain2.as$0")]) + pushstring "ch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChain2"),ProtectedNamespace("tests:TestChain2"),StaticProtectedNs("tests:TestChain2"),PrivateNamespace("TestChain2.as$0")]), 1 + ofs0056: + returnvoid + end ; code + end ; body + end ; method + } + + private function getInt() : int + { + trait method QName(PrivateNamespace("tests:TestChain2"),"getInt") + dispid 0 + method + name "tests:TestChain2/private/getInt" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 5 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestChain2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestChain2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments1.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments1.as new file mode 100644 index 000000000..307f6aba0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments1.as @@ -0,0 +1,120 @@ +package tests +{ + public class TestChainedAssignments1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestChainedAssignments1() + { + method + name "tests:TestChainedAssignments1/TestChainedAssignments1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestChainedAssignments1/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 14 + debug 1, "b", 1, 15 + debug 1, "c", 2, 16 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments1"),ProtectedNamespace("tests:TestChainedAssignments1"),StaticProtectedNs("tests:TestChainedAssignments1"),PrivateNamespace("TestChainedAssignments1.as$0")]) + pushstring "c = b = a = 5;" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments1"),ProtectedNamespace("tests:TestChainedAssignments1"),StaticProtectedNs("tests:TestChainedAssignments1"),PrivateNamespace("TestChainedAssignments1.as$0")]), 1 + pushbyte 0 + convert_i + setlocal1 + pushbyte 0 + convert_i + setlocal2 + pushbyte 0 + convert_i + setlocal3 + pushbyte 5 + convert_i + dup + setlocal1 + convert_i + dup + setlocal2 + convert_i + setlocal3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestChainedAssignments1",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestChainedAssignments1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments2.as new file mode 100644 index 000000000..08107da64 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments2.as @@ -0,0 +1,177 @@ +package tests +{ + public class TestChainedAssignments2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestChainedAssignments2() + { + method + name "tests:TestChainedAssignments2/TestChainedAssignments2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestChainedAssignments2/run" + returns null + + body + maxstack 5 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "e", 0, 14 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments2"),ProtectedNamespace("tests:TestChainedAssignments2"),StaticProtectedNs("tests:TestChainedAssignments2"),PrivateNamespace("TestChainedAssignments2.as$0")]) + pushstring "e.attrib1 = e.attrib2 = e.attrib3 = 10;" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments2"),ProtectedNamespace("tests:TestChainedAssignments2"),StaticProtectedNs("tests:TestChainedAssignments2"),PrivateNamespace("TestChainedAssignments2.as$0")]), 1 + findpropstrict QName(PrivateNamespace("TestChainedAssignments2.as$0"),"TestClass") + constructprop QName(PrivateNamespace("TestChainedAssignments2.as$0"),"TestClass"), 0 + coerce QName(PrivateNamespace("TestChainedAssignments2.as$0"),"TestClass") + setlocal1 + getlocal1 + getlocal1 + getlocal1 + pushbyte 10 + dup + setlocal2 + setproperty Multiname("attrib3",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments2"),ProtectedNamespace("tests:TestChainedAssignments2"),StaticProtectedNs("tests:TestChainedAssignments2"),PrivateNamespace("TestChainedAssignments2.as$0")]) + getlocal2 + kill 2 + dup + setlocal2 + setproperty Multiname("attrib2",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments2"),ProtectedNamespace("tests:TestChainedAssignments2"),StaticProtectedNs("tests:TestChainedAssignments2"),PrivateNamespace("TestChainedAssignments2.as$0")]) + getlocal2 + kill 2 + setproperty Multiname("attrib1",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments2"),ProtectedNamespace("tests:TestChainedAssignments2"),StaticProtectedNs("tests:TestChainedAssignments2"),PrivateNamespace("TestChainedAssignments2.as$0")]) + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib1:int; + + public var attrib2:int; + + public var attrib3:int; + + public function TestClass() + { + method + name "TestChainedAssignments2.as$0:TestClass/TestClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestChainedAssignments2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestChainedAssignments2") + findpropstrict Multiname("TestClass",[PrivateNamespace("TestChainedAssignments2.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestChainedAssignments2.as$0"),"TestClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments3.as new file mode 100644 index 000000000..aa535ace0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments3.as @@ -0,0 +1,124 @@ +package tests +{ + public class TestChainedAssignments3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var prop:int; + + public function TestChainedAssignments3() + { + method + name "tests:TestChainedAssignments3/TestChainedAssignments3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestChainedAssignments3/run" + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 15 + debug 1, "b", 1, 16 + pushbyte 0 + convert_i + setlocal1 + pushbyte 0 + convert_i + setlocal2 + getlocal0 + pushbyte 4 + convert_i + dup + setlocal2 + convert_i + dup + setlocal1 + setproperty QName(PrivateNamespace("tests:TestChainedAssignments3"),"prop") + getlocal1 + pushbyte 2 + ifne ofs002f + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments3"),ProtectedNamespace("tests:TestChainedAssignments3"),StaticProtectedNs("tests:TestChainedAssignments3"),PrivateNamespace("TestChainedAssignments3.as$0")]) + pushstring "OK: " + getlocal1 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments3"),ProtectedNamespace("tests:TestChainedAssignments3"),StaticProtectedNs("tests:TestChainedAssignments3"),PrivateNamespace("TestChainedAssignments3.as$0")]), 1 + ofs002f: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestChainedAssignments3",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestChainedAssignments3") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments4.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments4.as new file mode 100644 index 000000000..6409ce4ac --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestChainedAssignments4.as @@ -0,0 +1,151 @@ +package tests +{ + public class TestChainedAssignments4 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var prop:int; + + public function TestChainedAssignments4() + { + method + name "tests:TestChainedAssignments4/TestChainedAssignments4" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestChainedAssignments4/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 5 + localcount 3 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"slota") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"slotb") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"slotc") + slotid 3 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"f") + slotid 4 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments4"),ProtectedNamespace("tests:TestChainedAssignments4"),StaticProtectedNs("tests:TestChainedAssignments4"),PrivateNamespace("TestChainedAssignments4.as$0")]) + pushstring "slotc = slotb = slota = 5;" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestChainedAssignments4"),ProtectedNamespace("tests:TestChainedAssignments4"),StaticProtectedNs("tests:TestChainedAssignments4"),PrivateNamespace("TestChainedAssignments4.as$0")]), 1 + getscopeobject 1 + pushbyte 0 + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + getscopeobject 1 + pushbyte 0 + setslot 3 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 4 + getscopeobject 1 + getscopeobject 1 + getscopeobject 1 + pushbyte 5 + dup + setlocal2 + setslot 1 + getlocal2 + kill 2 + dup + setlocal2 + setslot 2 + getlocal2 + kill 2 + setslot 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestChainedAssignments4",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestChainedAssignments4") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCollidingTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCollidingTry.as new file mode 100644 index 000000000..cb6e48eda --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCollidingTry.as @@ -0,0 +1,163 @@ +package tests +{ + public class TestCollidingTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestCollidingTry() + { + method + name "tests:TestCollidingTry/TestCollidingTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestCollidingTry/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"e") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 0 + setslot 1 + ofs0011: + getscopeobject 1 + pushbyte 0 + setslot 1 + ofs0017: + jump ofs0034 + ofs001b: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]) + getscopeobject 2 + getslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]), 1 + popscope + kill 2 + ofs0034: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]) + pushstring "x" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]), 1 + ofs003b: + jump ofs0058 + ofs003f: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]) + getscopeobject 2 + getslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]), 1 + popscope + kill 2 + ofs0058: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]) + pushstring "y" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCollidingTry"),ProtectedNamespace("tests:TestCollidingTry"),StaticProtectedNs("tests:TestCollidingTry"),PrivateNamespace("TestCollidingTry.as$0")]), 1 + returnvoid + end ; code + try from ofs0011 to ofs0017 target ofs001b type null name QName(PackageNamespace(""),"e") end + try from ofs0034 to ofs003b target ofs003f type null name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestCollidingTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestCollidingTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestComma.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestComma.as new file mode 100644 index 000000000..d2b6b32f5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestComma.as @@ -0,0 +1,117 @@ +package tests +{ + public class TestComma + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestComma() + { + method + name "tests:TestComma/TestComma" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestComma/run" + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + pushbyte 5 + convert_i + setlocal1 + pushbyte 0 + convert_i + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestComma"),ProtectedNamespace("tests:TestComma"),StaticProtectedNs("tests:TestComma"),PrivateNamespace("TestComma.as$0")]) + getlocal1 + pushbyte 4 + ifngt ofs0026 + pushbyte 5 + convert_i + setlocal2 + getlocal1 + jump ofs0028 + ofs0026: + pushbyte 35 + ofs0028: + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestComma"),ProtectedNamespace("tests:TestComma"),StaticProtectedNs("tests:TestComma"),PrivateNamespace("TestComma.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestComma",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestComma") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestComplexExpressions.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestComplexExpressions.as new file mode 100644 index 000000000..cc398ae3c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestComplexExpressions.as @@ -0,0 +1,121 @@ +package tests +{ + public class TestComplexExpressions + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestComplexExpressions() + { + method + name "tests:TestComplexExpressions/TestComplexExpressions" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestComplexExpressions/run" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + debug 1, "j", 1, 14 + pushbyte 0 + convert_i + setlocal1 + pushbyte 0 + convert_i + setlocal2 + getlocal1 + getlocal1 + getlocal1 + dup + increment_i + convert_i + setlocal1 + add + convert_i + dup + setlocal1 + add + convert_i + dup + setlocal1 + convert_i + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestComplexExpressions",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestComplexExpressions") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCompoundAssignments.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCompoundAssignments.as new file mode 100644 index 000000000..89b57fc3c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestCompoundAssignments.as @@ -0,0 +1,329 @@ +package tests +{ + public class TestCompoundAssignments + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var attr:int = 0; + + public function TestCompoundAssignments() + { + method + name "tests:TestCompoundAssignments/TestCompoundAssignments" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function calc() : int + { + trait method QName(PackageNamespace(""),"calc") + dispid 0 + method + name "tests:TestCompoundAssignments/calc" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 5 + returnvalue + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestCompoundAssignments/run" + flag NEED_ACTIVATION + returns QName(PackageNamespace(""),"void") + + body + maxstack 4 + localcount 3 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"t") + slotid 1 + type QName(PrivateNamespace("TestCompoundAssignments.as$0"),"MyTest") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 2 + type null + end ; trait + trait slot QName(PackageInternalNs("tests"),"a") + slotid 3 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 10 + pushbyte 20 + pushbyte 30 + newarray 3 + coerce_a + setslot 2 + getscopeobject 1 + pushbyte 0 + setslot 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "a += 5" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 3 + pushbyte 5 + add + convert_i + setslot 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "arr[call()] = arr[call()] + 2;" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getscopeobject 1 + getslot 2 + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getscopeobject 1 + getslot 2 + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushbyte 2 + add + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + getscopeobject 1 + findpropstrict QName(PrivateNamespace("TestCompoundAssignments.as$0"),"MyTest") + constructprop QName(PrivateNamespace("TestCompoundAssignments.as$0"),"MyTest"), 0 + coerce QName(PrivateNamespace("TestCompoundAssignments.as$0"),"MyTest") + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "t.attr *= 10" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getscopeobject 1 + getslot 1 + getscopeobject 1 + getslot 1 + getproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushbyte 10 + multiply + setproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "attr -= 5" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getlocal0 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestCompoundAssignments"),"attr") + pushbyte 5 + subtract + setproperty QName(PrivateNamespace("tests:TestCompoundAssignments"),"attr") + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "arr[2] += 5" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getscopeobject 1 + getslot 2 + pushbyte 2 + getscopeobject 1 + getslot 2 + pushbyte 2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushbyte 5 + add + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "arr[call()] /= 5" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getscopeobject 1 + getslot 2 + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getscopeobject 1 + getslot 2 + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushbyte 5 + divide + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "arr[call()][call()] &= 10;" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + getscopeobject 1 + getslot 2 + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getscopeobject 1 + getslot 2 + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + getlocal0 + callproperty QName(PackageNamespace(""),"calc"), 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushbyte 10 + bitand + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + ofs00e2: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + pushstring "in try" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + ofs00e9: + jump ofs0106 + ofs00ed: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + getlex Multiname("e",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + getproperty Multiname("message",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestCompoundAssignments"),ProtectedNamespace("tests:TestCompoundAssignments"),StaticProtectedNs("tests:TestCompoundAssignments"),PrivateNamespace("TestCompoundAssignments.as$0")]), 1 + popscope + kill 2 + ofs0106: + returnvoid + end ; code + try from ofs00e2 to ofs00e9 target ofs00ed type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + class MyTest + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attr:int = 0; + + public function MyTest() + { + method + name "TestCompoundAssignments.as$0:MyTest/MyTest" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestCompoundAssignments",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestCompoundAssignments") + findpropstrict Multiname("MyTest",[PrivateNamespace("TestCompoundAssignments.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestCompoundAssignments.as$0"),"MyTest") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestContinueLevels.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestContinueLevels.as new file mode 100644 index 000000000..24fc54b25 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestContinueLevels.as @@ -0,0 +1,260 @@ +package tests +{ + public class TestContinueLevels + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestContinueLevels() + { + method + name "tests:TestContinueLevels/TestContinueLevels" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestContinueLevels/run" + returns null + + body + maxstack 2 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "b", 0, 13 + debug 1, "c", 1, 14 + debug 1, "d", 2, 15 + debug 1, "e", 3, 16 + debug 1, "a", 4, 17 + pushundefined + coerce_a + setlocal1 + pushundefined + coerce_a + setlocal2 + pushundefined + coerce_a + setlocal3 + pushundefined + coerce_a + setlocal 4 + pushbyte 5 + coerce_a + setlocal 5 + jump ofs0096 + ofs0031: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]) + pushstring "fiftyseven multiply a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]), 1 + pushbyte 0 + coerce_a + setlocal1 + jump ofs005e + ofs0041: + label + getlocal1 + pushbyte 10 + ifne ofs004d + jump ofs0065 + ofs004d: + getlocal1 + pushbyte 15 + ifne ofs0058 + jump ofs0065 + ofs0058: + getlocal1 + pushbyte 1 + add + coerce_a + setlocal1 + ofs005e: + getlocal1 + pushbyte 50 + iflt ofs0041 + ofs0065: + jump ofs00ea + ofs0069: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]) + pushstring "thirteen" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]), 1 + ofs0071: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]) + pushstring "fourteen" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]), 1 + jump ofs00ea + ofs007d: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]) + pushstring "eightynine" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]), 1 + jump ofs00ea + ofs0089: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]) + pushstring "default clause" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]), 1 + label + jump ofs00ea + ofs0096: + getlocal 5 + setlocal 6 + pushbyte 57 + getlocal 5 + multiply + getlocal 6 + ifstrictne ofs00ab + pushbyte 0 + jump ofs00d7 + ofs00ab: + pushbyte 13 + getlocal 6 + ifstrictne ofs00b9 + pushbyte 1 + jump ofs00d7 + ofs00b9: + pushbyte 14 + getlocal 6 + ifstrictne ofs00c7 + pushbyte 2 + jump ofs00d7 + ofs00c7: + pushbyte 89 + getlocal 6 + ifstrictne ofs00d5 + pushbyte 3 + jump ofs00d7 + ofs00d5: + pushbyte -1 + ofs00d7: + kill 6 + lookupswitch ofs0089, [ofs0031, ofs0069, ofs0071, ofs007d] + ofs00ea: + pushbyte 0 + coerce_a + setlocal2 + jump ofs0143 + ofs00f2: + label + pushbyte 0 + coerce_a + setlocal3 + jump ofs012f + ofs00fb: + label + pushbyte 0 + coerce_a + setlocal 4 + getlocal 4 + pushbyte 50 + ifnlt ofs012d + getlocal 4 + pushbyte 9 + ifne ofs0115 + jump ofs0136 + ofs0115: + getlocal 4 + pushbyte 20 + ifne ofs0121 + jump ofs013d + ofs0121: + getlocal 4 + pushbyte 8 + ifeq ofs012d + jump ofs014a + ofs012d: + inclocal 3 + ofs012f: + getlocal3 + pushbyte 25 + iflt ofs00fb + ofs0136: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestContinueLevels"),ProtectedNamespace("tests:TestContinueLevels"),StaticProtectedNs("tests:TestContinueLevels"),PrivateNamespace("TestContinueLevels.as$0")]), 1 + ofs013d: + getlocal2 + pushbyte 1 + add + coerce_a + setlocal2 + ofs0143: + getlocal2 + pushbyte 8 + iflt ofs00f2 + ofs014a: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestContinueLevels",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestContinueLevels") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as new file mode 100644 index 000000000..d6ee33229 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as @@ -0,0 +1,501 @@ +package tests +{ + import flash.utils.Dictionary; + import flash.utils.getTimer; + import tests_classes.TestConvertParent; + + public class TestConvert extends TestConvertParent + { + + public static var TEST:String = "Hello"; + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace(""),"TEST") + pushstring "Hello" + setproperty QName(PackageNamespace(""),"TEST") + returnvoid + end ; code + end ; body + end ; method + + private var n:int = 1; + + private var ns:String = "b"; + + public var TEST:int = 5; + + private var f:Function = null; + + public function TestConvert() + { + method + name "tests:TestConvert/TestConvert" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestConvert/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 6 + localcount 16 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + debug 1, "s", 0, 27 + debug 1, "i", 1, 28 + debug 1, "a", 2, 29 + debug 1, "dict", 3, 30 + debug 1, "j", 4, 33 + debug 1, "o", 5, 47 + debug 1, "v", 6, 49 + debug 1, "x", 7, 65 + debug 1, "xlist", 8, 68 + debug 1, "lc", 9, 74 + debug 1, "f", 10, 77 + debug 1, "d", 11, 95 + debug 1, "a2", 12, 106 + debug 1, "s2", 13, 107 + debug 1, "i2", 14, 108 + pushnull + coerce_s + setlocal1 + pushbyte 0 + convert_i + setlocal2 + pushundefined + coerce_a + setlocal3 + findpropstrict QName(PackageNamespace("flash.utils"),"Dictionary") + constructprop QName(PackageNamespace("flash.utils"),"Dictionary"), 0 + coerce QName(PackageNamespace("flash.utils"),"Dictionary") + setlocal 4 + pushstring "a" + coerce_s + setlocal1 + findpropstrict QName(PackageNamespace(""),"int") + getlocal1 + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setlocal2 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestConvert"),"n") + convert_i + setlocal 5 + findpropstrict QName(PackageNamespace(""),"String") + getlocal 5 + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestConvert"),"ns") + coerce_s + setlocal1 + findpropstrict QName(PackageNamespace(""),"String") + getlocal2 + pushbyte 4 + ifne ofs008f + pushstring "" + jump ofs0090 + ofs008f: + getlocal2 + ofs0090: + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + getlocal2 + pushbyte 4 + ifne ofs00a2 + pushstring "" + jump ofs00a8 + ofs00a2: + findpropstrict QName(PackageNamespace(""),"String") + getlocal2 + callproperty QName(PackageNamespace(""),"String"), 1 + ofs00a8: + coerce_s + setlocal1 + getlex QName(PackageNamespace("tests"),"TestConvert") + getproperty QName(PackageNamespace(""),"TEST") + coerce_s + setlocal1 + getlocal0 + getproperty QName(PackageNamespace(""),"TEST") + convert_i + setlocal2 + findpropstrict QName(PackageNamespace(""),"Number") + pushstring "4" + callproperty QName(PackageNamespace(""),"Number"), 1 + pushbyte 5 + multiply + convert_i + setlocal2 + getlocal3 + pushbyte 6 + multiply + convert_i + setlocal2 + getlocal3 + convert_i + setlocal2 + pushstring "0" + pushstring "A" + pushstring "1" + pushstring "B" + pushstring "2" + pushstring "C" + newobject 3 + coerce QName(PackageNamespace(""),"Object") + setlocal 6 + findpropstrict QName(PackageNamespace(""),"int") + getlocal1 + pushbyte 10 + callproperty QName(Namespace("http://adobe.com/AS3/2006/builtin"),"charAt"), 1 + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setlocal2 + getlex QName(PackageNamespace("__AS3__.vec"),"Vector") + getlex QName(PackageNamespace(""),"String") + applytype 1 + construct 0 + coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) + setlocal 7 + getlocal 7 + pushstring "A" + callpropvoid Multiname("push",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + getlocal 7 + pushstring "B" + callpropvoid Multiname("push",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + findpropstrict QName(PackageNamespace(""),"int") + getlocal 7 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setlocal2 + getlocal 7 + pushbyte 1 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + coerce_s + setlocal1 + getlocal 7 + pushstring "x" + callproperty Multiname("join",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + coerce_s + setlocal1 + findpropstrict QName(PackageNamespace(""),"int") + getlocal 7 + pushstring "x" + callproperty Multiname("join",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setlocal2 + getlex QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + convert_i + setlocal2 + findpropstrict QName(PackageNamespace(""),"String") + getlex QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + getlex QName(StaticProtectedNs("tests_classes:TestConvertParent"),"sprot") + convert_i + setlocal2 + findpropstrict QName(PackageNamespace(""),"String") + getlex QName(StaticProtectedNs("tests_classes:TestConvertParent"),"sprot") + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + findpropstrict QName(PackageNamespace(""),"String") + findpropstrict QName(PackageNamespace("flash.utils"),"getTimer") + callproperty QName(PackageNamespace("flash.utils"),"getTimer"), 0 + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + getlex QName(PackageNamespace(""),"XML") + pushstring "\r\n\t \t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t2\r\n\t\t\t\t\t\t\t3\r\n\t\t\t\t\t\t" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal 8 + getlocal 8 + coerce_s + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + getlocal 8 + getproperty Multiname("item",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + coerce QName(PackageNamespace(""),"XMLList") + setlocal 9 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + pushstring "b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + findpropstrict QName(PackageNamespace(""),"int") + getlocal 9 + getlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + pushstring "c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + findpropstrict QName(PackageNamespace(""),"int") + getlocal 8 + getproperty Multiname("item",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setlocal2 + getlocal 4 + findpropstrict QName(PackageNamespace(""),"String") + getlocal 8 + getproperty Multiname("item",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + callproperty QName(PackageNamespace(""),"String"), 1 + pushstring "Hello" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + findpropstrict QName(PrivateNamespace("TestConvert.as$0"),"LocalClass") + constructprop QName(PrivateNamespace("TestConvert.as$0"),"LocalClass"), 0 + coerce QName(PrivateNamespace("TestConvert.as$0"),"LocalClass") + setlocal 10 + getlocal 10 + getproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + convert_i + setlocal2 + findpropstrict QName(PackageNamespace(""),"String") + getlocal 10 + getproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestConvert"),"f") + coerce QName(PackageNamespace(""),"Function") + setlocal 11 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal 11 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs01e5 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + pushstring "OK" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + ofs01e5: + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal2 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs01f5 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getlocal2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + ofs01f5: + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal1 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0205 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + ofs0205: + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal 6 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0217 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + pushstring "obj" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 + ofs0217: + getlocal 9 + coerce_s + setlocal1 + pushbyte 0 + convert_d + setlocal 12 + pushbyte 1 + convert_d + setlocal 12 + pushdouble 1.5 + convert_d + setlocal 12 + pushbyte 1 + convert_i + setlocal2 + pushdouble 1.5 + convert_i + setlocal2 + getlocal 6 + findpropstrict QName(PackageNamespace(""),"int") + getlocal 12 + pushbyte 5 + multiply + callproperty QName(PackageNamespace(""),"int"), 1 + pushbyte 1 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) + getlocal0 + pushdouble 1.5 + setproperty QName(PrivateNamespace("tests:TestConvert"),"n") + pushdouble 1.5 + findproperty QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + swap + setsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + findpropstrict QName(PackageNamespace(""),"int") + getlocal1 + callproperty QName(PackageNamespace(""),"int"), 1 + findproperty QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + swap + setsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + findpropstrict QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + getsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + convert_i + setlocal2 + findpropstrict QName(PackageNamespace(""),"String") + findpropstrict QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + getsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal1 + pushstring "5" + coerce_a + setlocal 13 + pushstring "s" + coerce_s + setlocal 14 + getlocal 13 + convert_i + setlocal 15 + findpropstrict QName(PackageNamespace(""),"Number") + getlocal 13 + callproperty QName(PackageNamespace(""),"Number"), 1 + coerce_a + setlocal 13 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class LocalClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attr:int = 5; + + public function LocalClass() + { + method + name "TestConvert.as$0:LocalClass/LocalClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 4 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestConvert",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace("tests_classes"),"TestConvertParent") + pushscope + getlex QName(PackageNamespace("tests_classes"),"TestConvertParent") + newclass 0 + popscope + popscope + initproperty QName(PackageNamespace("tests"),"TestConvert") + findpropstrict Multiname("LocalClass",[PrivateNamespace("TestConvert.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestConvert.as$0"),"LocalClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDecl2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDecl2.as new file mode 100644 index 000000000..9d80c2a14 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDecl2.as @@ -0,0 +1,122 @@ +package tests +{ + public class TestDecl2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDecl2() + { + method + name "tests:TestDecl2/TestDecl2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDecl2/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + debug 1, "i", 1, 14 + pushbyte 0 + convert_i + setlocal1 + pushbyte 5 + convert_i + setlocal2 + getlocal2 + pushbyte 7 + add + convert_i + setlocal2 + getlocal2 + pushbyte 5 + ifne ofs002c + getlocal2 + pushbyte 8 + ifnlt ofs002c + pushbyte 6 + convert_i + setlocal1 + ofs002c: + pushbyte 7 + convert_i + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDecl2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDecl2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeclarationInterface.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeclarationInterface.as new file mode 100644 index 000000000..68ffb2e9f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeclarationInterface.as @@ -0,0 +1,272 @@ +package tests +{ + public class TestDeclarationInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDeclarationInterface() + { + method + name "tests:TestDeclarationInterface/TestDeclarationInterface" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : MyIFace + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDeclarationInterface/run" + returns QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyIFace") + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + debug 1, "n", 1, 14 + pushnull + coerce QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyIFace") + setlocal1 + pushbyte 2 + convert_i + setlocal2 + jump ofs0033 + ofs0018: + label + findpropstrict QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyClass") + constructprop QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyClass"), 0 + coerce QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyIFace") + setlocal1 + jump ofs005e + ofs0025: + label + findpropstrict QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyClass2") + constructprop QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyClass2"), 0 + coerce QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyIFace") + setlocal1 + ofs002e: + label + jump ofs005e + ofs0033: + getlocal2 + setlocal3 + pushbyte 0 + getlocal3 + ifstrictne ofs0042 + pushbyte 0 + jump ofs0051 + ofs0042: + pushbyte 1 + getlocal3 + ifstrictne ofs004f + pushbyte 1 + jump ofs0051 + ofs004f: + pushbyte -1 + ofs0051: + kill 3 + lookupswitch ofs002e, [ofs0018, ofs0025] + ofs005e: + getlocal1 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + interface MyIFace + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 2 + maxscopedepth 3 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + } + + class MyClass implements MyIFace + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function MyClass() + { + method + name "TestDeclarationInterface.as$0:MyClass/MyClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + class MyClass2 implements MyIFace + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function MyClass2() + { + method + name "TestDeclarationInterface.as$0:MyClass2/MyClass2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDeclarationInterface",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDeclarationInterface") + findpropstrict Multiname("MyIFace",[PrivateNamespace("TestDeclarationInterface.as$0")]) + pushnull + newclass 1 + initproperty QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyIFace") + findpropstrict Multiname("MyClass",[PrivateNamespace("TestDeclarationInterface.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 2 + popscope + initproperty QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyClass") + findpropstrict Multiname("MyClass2",[PrivateNamespace("TestDeclarationInterface.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 3 + popscope + initproperty QName(PrivateNamespace("TestDeclarationInterface.as$0"),"MyClass2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeclarations.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeclarations.as new file mode 100644 index 000000000..9f2086e21 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeclarations.as @@ -0,0 +1,201 @@ +package tests +{ + public class TestDeclarations + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDeclarations() + { + method + name "tests:TestDeclarations/TestDeclarations" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDeclarations/run" + returns null + + body + maxstack 1 + localcount 8 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "vall", 0, 13 + debug 1, "vstr", 1, 14 + debug 1, "vint", 2, 15 + debug 1, "vuint", 3, 16 + debug 1, "vclass", 4, 17 + debug 1, "vnumber", 5, 18 + debug 1, "vobject", 6, 19 + pushundefined + coerce_a + setlocal1 + pushnull + coerce_s + setlocal2 + pushbyte 0 + convert_i + setlocal3 + pushbyte 0 + convert_u + setlocal 4 + pushnull + coerce QName(PrivateNamespace("TestDeclarations.as$0"),"TestClass1") + setlocal 5 + getlex Multiname("NaN",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeclarations"),ProtectedNamespace("tests:TestDeclarations"),StaticProtectedNs("tests:TestDeclarations"),PrivateNamespace("TestDeclarations.as$0")]) + convert_d + setlocal 6 + pushnull + coerce QName(PackageNamespace(""),"Object") + setlocal 7 + pushbyte 6 + coerce_a + setlocal1 + pushstring "hello" + coerce_s + setlocal2 + pushbyte 7 + convert_u + setlocal 4 + pushbyte -4 + convert_i + setlocal3 + findpropstrict QName(PrivateNamespace("TestDeclarations.as$0"),"TestClass1") + constructprop QName(PrivateNamespace("TestDeclarations.as$0"),"TestClass1"), 0 + coerce QName(PrivateNamespace("TestDeclarations.as$0"),"TestClass1") + setlocal 5 + pushdouble 0.5 + convert_d + setlocal 6 + pushbyte 6 + convert_d + setlocal 6 + getlocal 5 + coerce QName(PackageNamespace(""),"Object") + setlocal 7 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestClass1() + { + method + name "TestDeclarations.as$0:TestClass1/TestClass1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDeclarations",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDeclarations") + findpropstrict Multiname("TestClass1",[PrivateNamespace("TestDeclarations.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestDeclarations.as$0"),"TestClass1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDefaultNotLastGrouped.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDefaultNotLastGrouped.as new file mode 100644 index 000000000..cfbc456fa --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDefaultNotLastGrouped.as @@ -0,0 +1,148 @@ +package tests +{ + public class TestDefaultNotLastGrouped + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDefaultNotLastGrouped() + { + method + name "tests:TestDefaultNotLastGrouped/TestDefaultNotLastGrouped" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDefaultNotLastGrouped/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 10 + coerce_a + setlocal1 + jump ofs0030 + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]) + pushstring "def and 6" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]), 1 + ofs0017: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]) + pushstring "def and 6 and 5" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]), 1 + jump ofs006b + ofs0023: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]) + pushstring "4" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]), 1 + label + jump ofs006b + ofs0030: + getlocal1 + setlocal2 + pushstring "six" + getlocal2 + ifstrictne ofs003f + pushbyte 0 + jump ofs005b + ofs003f: + pushstring "five" + getlocal2 + ifstrictne ofs004c + pushbyte 1 + jump ofs005b + ofs004c: + pushstring "four" + getlocal2 + ifstrictne ofs0059 + pushbyte 2 + jump ofs005b + ofs0059: + pushbyte -1 + ofs005b: + kill 2 + lookupswitch ofs000f, [ofs000f, ofs0017, ofs0023] + ofs006b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]) + pushstring "after switch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDefaultNotLastGrouped"),ProtectedNamespace("tests:TestDefaultNotLastGrouped"),StaticProtectedNs("tests:TestDefaultNotLastGrouped"),PrivateNamespace("TestDefaultNotLastGrouped.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDefaultNotLastGrouped",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDefaultNotLastGrouped") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeobfuscation.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeobfuscation.as new file mode 100644 index 000000000..027e6b4ba --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDeobfuscation.as @@ -0,0 +1,174 @@ +package tests +{ + public class TestDeobfuscation + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDeobfuscation() + { + method + name "tests:TestDeobfuscation/TestDeobfuscation" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDeobfuscation/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "r", 0, 13 + debug 1, "t", 1, 14 + debug 1, "f", 2, 15 + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + convert_i + setlocal1 + pushtrue + convert_b + setlocal2 + pushfalse + convert_b + setlocal3 + getlocal1 + pushbyte 5 + greaterthan + dup + iffalse ofs0029 + pop + getlocal2 + ofs0029: + iffalse ofs0034 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]), 1 + ofs0034: + getlocal1 + pushbyte 10 + greaterthan + dup + iftrue ofs003f + pop + getlocal3 + ofs003f: + iffalse ofs004a + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]), 1 + ofs004a: + getlocal2 + dup + iffalse ofs0055 + pop + getlocal1 + pushbyte 15 + greaterthan + ofs0055: + iffalse ofs0060 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]), 1 + ofs0060: + getlocal3 + dup + iftrue ofs006b + pop + getlocal1 + pushbyte 20 + greaterthan + ofs006b: + iffalse ofs0076 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]), 1 + ofs0076: + getlocal3 + iffalse ofs0082 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]) + pushstring "trash1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]), 1 + ofs0082: + getlocal2 + not + iffalse ofs008f + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]) + pushstring "trash2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDeobfuscation"),ProtectedNamespace("tests:TestDeobfuscation"),StaticProtectedNs("tests:TestDeobfuscation"),PrivateNamespace("TestDeobfuscation.as$0")]), 1 + ofs008f: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDeobfuscation",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDeobfuscation") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile.as new file mode 100644 index 000000000..310da227d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile.as @@ -0,0 +1,113 @@ +package tests +{ + public class TestDoWhile + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDoWhile() + { + method + name "tests:TestDoWhile/TestDoWhile" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDoWhile/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 8 + coerce_a + setlocal1 + jump ofs0010 + ofs000f: + label + ofs0010: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile"),ProtectedNamespace("tests:TestDoWhile"),StaticProtectedNs("tests:TestDoWhile"),PrivateNamespace("TestDoWhile.as$0")]) + pushstring "a=" + getlocal1 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile"),ProtectedNamespace("tests:TestDoWhile"),StaticProtectedNs("tests:TestDoWhile"),PrivateNamespace("TestDoWhile.as$0")]), 1 + inclocal 1 + getlocal1 + pushbyte 20 + iflt ofs000f + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDoWhile",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDoWhile") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile2.as new file mode 100644 index 000000000..9d9026e54 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile2.as @@ -0,0 +1,126 @@ +package tests +{ + public class TestDoWhile2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDoWhile2() + { + method + name "tests:TestDoWhile2/TestDoWhile2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDoWhile2/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 5 + convert_i + setlocal1 + jump ofs0010 + ofs000f: + label + ofs0010: + inclocal_i 1 + getlocal1 + pushbyte 7 + ifne ofs0023 + pushbyte 5 + getlocal1 + multiply + convert_i + setlocal1 + jump ofs0029 + ofs0023: + pushbyte 5 + getlocal1 + subtract + convert_i + setlocal1 + ofs0029: + declocal_i 1 + getlocal1 + pushbyte 9 + iflt ofs000f + pushbyte 2 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDoWhile2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDoWhile2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile3.as new file mode 100644 index 000000000..a5aec8691 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile3.as @@ -0,0 +1,145 @@ +package tests +{ + public class TestDoWhile3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var ch:String; + + public function TestDoWhile3() + { + method + name "tests:TestDoWhile3/TestDoWhile3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDoWhile3/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + jump ofs0007 + ofs0006: + label + ofs0007: + getlocal0 + callpropvoid QName(PrivateNamespace("tests:TestDoWhile3"),"nextChar"), 0 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestDoWhile3"),"ch") + pushstring "\n" + equals + not + dup + iffalse ofs001f + pop + getlocal0 + getproperty QName(PrivateNamespace("tests:TestDoWhile3"),"ch") + pushstring "" + equals + not + ofs001f: + iftrue ofs0006 + returnvoid + end ; code + end ; body + end ; method + } + + private function nextChar() : void + { + trait method QName(PrivateNamespace("tests:TestDoWhile3"),"nextChar") + dispid 0 + method + name "tests:TestDoWhile3/private/nextChar" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile3"),ProtectedNamespace("tests:TestDoWhile3"),StaticProtectedNs("tests:TestDoWhile3"),PrivateNamespace("TestDoWhile3.as$0")]) + pushstring "process next char" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile3"),ProtectedNamespace("tests:TestDoWhile3"),StaticProtectedNs("tests:TestDoWhile3"),PrivateNamespace("TestDoWhile3.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDoWhile3",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDoWhile3") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile4.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile4.as new file mode 100644 index 000000000..e59e4c974 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhile4.as @@ -0,0 +1,132 @@ +package tests +{ + public class TestDoWhile4 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDoWhile4() + { + method + name "tests:TestDoWhile4/TestDoWhile4" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDoWhile4/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 8 + convert_i + setlocal1 + jump ofs0010 + ofs000f: + label + ofs0010: + getlocal1 + pushbyte 9 + ifne ofs0037 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]) + pushstring "h" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]), 1 + getlocal1 + pushbyte 9 + ifne ofs0030 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]) + pushstring "f" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]), 1 + jump ofs003e + ofs0030: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]) + pushstring "b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]), 1 + ofs0037: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]) + pushstring "gg" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]), 1 + ofs003e: + getlocal1 + pushbyte 10 + iflt ofs000f + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]) + pushstring "ss" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhile4"),ProtectedNamespace("tests:TestDoWhile4"),StaticProtectedNs("tests:TestDoWhile4"),PrivateNamespace("TestDoWhile4.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDoWhile4",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDoWhile4") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as new file mode 100644 index 000000000..ab88e5df9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as @@ -0,0 +1,153 @@ +package tests +{ + public class TestDoWhileTwice + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDoWhileTwice() + { + method + name "tests:TestDoWhileTwice/TestDoWhileTwice" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDoWhileTwice/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + pushbyte 1 + convert_i + setlocal1 + pushbyte 2 + convert_i + setlocal2 + jump ofs0019 + ofs0018: + label + ofs0019: + jump ofs001e + ofs001d: + label + ofs001e: + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal1 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0044 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) + pushstring "x" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal2 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs003d + jump ofs0050 + ofs003d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) + pushstring "y" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 + ofs0044: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) + pushstring "z" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 + pushtrue + iftrue ofs001d + ofs0050: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) + pushstring "g" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal2 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0065 + jump ofs0071 + ofs0065: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) + pushstring "h" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 + pushtrue + iftrue ofs0018 + ofs0071: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) + pushstring "finish" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDoWhileTwice",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDoWhileTwice") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDotParent.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDotParent.as new file mode 100644 index 000000000..fc9e54b2d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDotParent.as @@ -0,0 +1,301 @@ +package tests +{ + public class TestDotParent + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestDotParent() + { + method + name "tests:TestDotParent/TestDotParent" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestDotParent/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 9 + initscopedepth 5 + maxscopedepth 8 + trait slot QName(PackageInternalNs("tests"),"d") + slotid 1 + type null + end ; trait + trait slot QName(PackageInternalNs("tests"),"k") + slotid 2 + type null + end ; trait + trait slot QName(PackageInternalNs("tests"),"g") + slotid 3 + type null + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushundefined + coerce_a + setslot 1 + getscopeobject 1 + pushundefined + coerce_a + setslot 2 + getscopeobject 1 + pushundefined + coerce_a + setslot 3 + getscopeobject 1 + findpropstrict QName(PrivateNamespace("TestDotParent.as$0"),"TestClass1") + constructprop QName(PrivateNamespace("TestDotParent.as$0"),"TestClass1"), 0 + coerce_a + setslot 1 + getscopeobject 1 + pushnull + coerce_a + setslot 2 + pushbyte 0 + setlocal3 + getscopeobject 1 + getslot 2 + checkfilter + coerce_a + setlocal 4 + getlex QName(PackageNamespace(""),"XMLList") + pushstring "" + construct 1 + setlocal2 + jump ofs0076 + ofs0043: + label + getlocal 4 + getlocal3 + nextvalue + dup + setlocal 5 + dup + setlocal 6 + pushwith + getscopeobject 1 + getslot 1 + dup + setlocal 7 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + increment + setlocal 8 + getlocal 7 + getlocal 8 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + kill 8 + kill 7 + pushbyte 0 + iffalse ofs0071 + getlocal2 + getlocal3 + getlocal 5 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + ofs0071: + popscope + kill 6 + kill 5 + ofs0076: + hasnext2 4, 3 + iftrue ofs0043 + kill 4 + kill 3 + getlocal2 + kill 2 + pop + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + pushstring "between" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]), 1 + getscopeobject 1 + pushbyte 0 + setlocal3 + getscopeobject 1 + getslot 2 + checkfilter + coerce_a + setlocal 4 + getlex QName(PackageNamespace(""),"XMLList") + pushstring "" + construct 1 + setlocal2 + jump ofs00d7 + ofs00a4: + label + getlocal 4 + getlocal3 + nextvalue + dup + setlocal 5 + dup + setlocal 6 + pushwith + getscopeobject 1 + getslot 1 + dup + setlocal 7 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + increment + setlocal 8 + getlocal 7 + getlocal 8 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + kill 8 + kill 7 + pushbyte 0 + iffalse ofs00d2 + getlocal2 + getlocal3 + getlocal 5 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + ofs00d2: + popscope + kill 6 + kill 5 + ofs00d7: + hasnext2 4, 3 + iftrue ofs00a4 + kill 4 + kill 3 + getlocal2 + kill 2 + coerce_a + setslot 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]) + pushstring "end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDotParent"),ProtectedNamespace("tests:TestDotParent"),StaticProtectedNs("tests:TestDotParent"),PrivateNamespace("TestDotParent.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib:int = 5; + + public function TestClass1() + { + method + name "TestDotParent.as$0:TestClass1/TestClass1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestDotParent",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestDotParent") + findpropstrict Multiname("TestClass1",[PrivateNamespace("TestDotParent.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestDotParent.as$0"),"TestClass1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestExecutionOrder.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestExecutionOrder.as new file mode 100644 index 000000000..2c30aa955 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestExecutionOrder.as @@ -0,0 +1,198 @@ +package tests +{ + public class TestExecutionOrder + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestExecutionOrder() + { + method + name "tests:TestExecutionOrder/TestExecutionOrder" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + private static function create() : Object + { + trait method QName(PrivateNamespace("tests:TestExecutionOrder"),"create") + flag FINAL + dispid 3 + method + name "tests:TestExecutionOrder/private/create" + returns QName(PackageNamespace(""),"Object") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + findpropstrict QName(PrivateNamespace("TestExecutionOrder.as$0"),"MyClass") + constructprop QName(PrivateNamespace("TestExecutionOrder.as$0"),"MyClass"), 0 + returnvalue + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestExecutionOrder/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "m", 0, 18 + pushnull + coerce QName(PrivateNamespace("TestExecutionOrder.as$0"),"MyClass") + setlocal1 + getlocal1 + findpropstrict QName(PrivateNamespace("tests:TestExecutionOrder"),"create") + callproperty QName(PrivateNamespace("tests:TestExecutionOrder"),"create"), 0 + getlex QName(PrivateNamespace("TestExecutionOrder.as$0"),"MyClass") + astypelate + coerce QName(PrivateNamespace("TestExecutionOrder.as$0"),"MyClass") + dup + setlocal1 + getproperty Multiname("x",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExecutionOrder"),ProtectedNamespace("tests:TestExecutionOrder"),StaticProtectedNs("tests:TestExecutionOrder"),PrivateNamespace("TestExecutionOrder.as$0")]) + pushbyte 5 + add + setproperty Multiname("x",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExecutionOrder"),ProtectedNamespace("tests:TestExecutionOrder"),StaticProtectedNs("tests:TestExecutionOrder"),PrivateNamespace("TestExecutionOrder.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExecutionOrder"),ProtectedNamespace("tests:TestExecutionOrder"),StaticProtectedNs("tests:TestExecutionOrder"),PrivateNamespace("TestExecutionOrder.as$0")]) + getlocal1 + getproperty Multiname("x",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExecutionOrder"),ProtectedNamespace("tests:TestExecutionOrder"),StaticProtectedNs("tests:TestExecutionOrder"),PrivateNamespace("TestExecutionOrder.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExecutionOrder"),ProtectedNamespace("tests:TestExecutionOrder"),StaticProtectedNs("tests:TestExecutionOrder"),PrivateNamespace("TestExecutionOrder.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class MyClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var x:int = 1; + + public var y:int = 1; + + public function MyClass() + { + method + name "TestExecutionOrder.as$0:MyClass/MyClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestExecutionOrder",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestExecutionOrder") + findpropstrict Multiname("MyClass",[PrivateNamespace("TestExecutionOrder.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestExecutionOrder.as$0"),"MyClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestExpressions.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestExpressions.as new file mode 100644 index 000000000..99e3a8609 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestExpressions.as @@ -0,0 +1,159 @@ +package tests +{ + public class TestExpressions + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestExpressions() + { + method + name "tests:TestExpressions/TestExpressions" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestExpressions/run" + flag NEED_ARGUMENTS + returns null + + body + maxstack 2 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "arguments", 0, 0 + debug 1, "arr", 1, 13 + debug 1, "i", 2, 14 + debug 1, "j", 3, 15 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal2 + pushbyte 5 + convert_i + setlocal3 + pushbyte 5 + convert_i + setlocal 4 + getlocal3 + pushbyte 2 + divide + convert_i + dup + setlocal3 + convert_i + setlocal3 + getlocal3 + pushbyte 1 + equals + dup + iftrue ofs003a + pop + getlocal3 + pushbyte 2 + equals + ofs003a: + iffalse ofs0047 + getlocal1 + getlocal3 + callpropvoid Multiname("concat",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExpressions"),ProtectedNamespace("tests:TestExpressions"),StaticProtectedNs("tests:TestExpressions"),PrivateNamespace("TestExpressions.as$0")]), 1 + jump ofs006a + ofs0047: + getlocal3 + pushbyte 0 + ifne ofs005b + getlocal 4 + dup + increment_i + convert_i + setlocal 4 + convert_i + setlocal3 + jump ofs006a + ofs005b: + getlocal2 + dup + setlocal 5 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestExpressions"),ProtectedNamespace("tests:TestExpressions"),StaticProtectedNs("tests:TestExpressions"),PrivateNamespace("TestExpressions.as$0")]) + getlocal 5 + call 0 + pop + kill 5 + ofs006a: + getlocal3 + pushbyte 0 + equals + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestExpressions",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestExpressions") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestFinallyZeroJump.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestFinallyZeroJump.as new file mode 100644 index 000000000..cc8f0cf5e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestFinallyZeroJump.as @@ -0,0 +1,212 @@ +package tests +{ + public class TestFinallyZeroJump + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestFinallyZeroJump() + { + method + name "tests:TestFinallyZeroJump/TestFinallyZeroJump" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(param1:String) : String + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestFinallyZeroJump/run" + flag NEED_ACTIVATION + param QName(PackageNamespace(""),"String") + returns QName(PackageNamespace(""),"String") + + body + maxstack 3 + localcount 6 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"param1") + slotid 1 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"str") + slotid 2 + type QName(PackageNamespace(""),"String") + end ; trait + + code + getlocal0 + pushscope + debug 1, "param1", 0, 0 + debug 1, "+$activation", 1, 0 + newactivation + dup + setlocal2 + pushscope + getscopeobject 1 + getlocal1 + coerce_s + setslot 1 + getscopeobject 1 + getscopeobject 1 + getslot 1 + coerce_s + setslot 2 + ofs001f: + jump ofs003f + ofs0023: + getlocal0 + pushscope + getlocal2 + pushscope + newcatch 0 + dup + setlocal3 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFinallyZeroJump"),ProtectedNamespace("tests:TestFinallyZeroJump"),StaticProtectedNs("tests:TestFinallyZeroJump"),PrivateNamespace("TestFinallyZeroJump.as$0")]) + pushstring "error is :" + getlex Multiname("e",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFinallyZeroJump"),ProtectedNamespace("tests:TestFinallyZeroJump"),StaticProtectedNs("tests:TestFinallyZeroJump"),PrivateNamespace("TestFinallyZeroJump.as$0")]) + getproperty Multiname("message",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFinallyZeroJump"),ProtectedNamespace("tests:TestFinallyZeroJump"),StaticProtectedNs("tests:TestFinallyZeroJump"),PrivateNamespace("TestFinallyZeroJump.as$0")]) + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFinallyZeroJump"),ProtectedNamespace("tests:TestFinallyZeroJump"),StaticProtectedNs("tests:TestFinallyZeroJump"),PrivateNamespace("TestFinallyZeroJump.as$0")]), 1 + popscope + kill 3 + ofs003f: + pushbyte -1 + ofs0041: + jump ofs0062 + ofs0045: + getlocal0 + pushscope + getlocal2 + pushscope + newcatch 1 + dup + setlocal3 + pushscope + popscope + kill 3 + coerce_a + setlocal 4 + pushbyte 0 + jump ofs0062 + label + pop + ofs005c: + label + getlocal 4 + kill 4 + throw + ofs0062: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFinallyZeroJump"),ProtectedNamespace("tests:TestFinallyZeroJump"),StaticProtectedNs("tests:TestFinallyZeroJump"),PrivateNamespace("TestFinallyZeroJump.as$0")]) + pushstring "hi " + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFinallyZeroJump"),ProtectedNamespace("tests:TestFinallyZeroJump"),StaticProtectedNs("tests:TestFinallyZeroJump"),PrivateNamespace("TestFinallyZeroJump.as$0")]), 1 + pushbyte 5 + pushbyte 4 + ifne ofs0086 + getscopeobject 1 + getslot 2 + coerce_a + setlocal 5 + pushbyte 1 + jump ofs007e + ofs007e: + label + pop + ofs0080: + label + getlocal 5 + kill 5 + returnvalue + ofs0086: + pushstring "hu" + getscopeobject 1 + getslot 2 + add + coerce_a + setlocal 5 + pushbyte 2 + jump ofs0096 + ofs0096: + label + pop + ofs0098: + label + getlocal 5 + kill 5 + returnvalue + lookupswitch ofs00ac, [ofs005c, ofs0080, ofs0098] + ofs00ac: + pushundefined + returnvalue + end ; code + try from ofs001f to ofs001f target ofs0023 type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + try from ofs001f to ofs0041 target ofs0045 type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestFinallyZeroJump",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestFinallyZeroJump") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestFor.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestFor.as new file mode 100644 index 000000000..8667d4845 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestFor.as @@ -0,0 +1,113 @@ +package tests +{ + public class TestFor + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestFor() + { + method + name "tests:TestFor/TestFor" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestFor/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 0 + coerce_a + setlocal1 + jump ofs001b + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFor"),ProtectedNamespace("tests:TestFor"),StaticProtectedNs("tests:TestFor"),PrivateNamespace("TestFor.as$0")]) + pushstring "a=" + getlocal1 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestFor"),ProtectedNamespace("tests:TestFor"),StaticProtectedNs("tests:TestFor"),PrivateNamespace("TestFor.as$0")]), 1 + inclocal 1 + ofs001b: + getlocal1 + pushbyte 10 + iflt ofs000f + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestFor",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestFor") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForAnd.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForAnd.as new file mode 100644 index 000000000..20763f845 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForAnd.as @@ -0,0 +1,171 @@ +package tests +{ + public class TestForAnd + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForAnd() + { + method + name "tests:TestForAnd/TestForAnd" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForAnd/run" + returns null + + body + maxstack 2 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "x", 0, 13 + debug 1, "len", 1, 14 + debug 1, "a", 2, 15 + debug 1, "b", 3, 16 + debug 1, "c", 4, 17 + debug 1, "i", 5, 18 + pushfalse + convert_b + setlocal1 + pushbyte 5 + convert_i + setlocal2 + pushbyte 4 + convert_i + setlocal3 + pushbyte 7 + convert_i + setlocal 4 + pushbyte 9 + convert_i + setlocal 5 + pushbyte 0 + convert_u + setlocal 6 + jump ofs0090 + ofs003e: + label + pushbyte 1 + convert_i + setlocal 5 + getlocal 5 + pushbyte 2 + ifne ofs006d + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]), 1 + getlocal 5 + pushbyte 7 + ifne ofs0066 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]), 1 + jump ofs0074 + ofs0066: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]), 1 + ofs006d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForAnd"),ProtectedNamespace("tests:TestForAnd"),StaticProtectedNs("tests:TestForAnd"),PrivateNamespace("TestForAnd.as$0")]), 1 + ofs0074: + getlocal3 + pushbyte 4 + greaterthan + dup + iffalse ofs0083 + pop + getlocal 4 + pushbyte 2 + lessthan + ofs0083: + dup + iftrue ofs008e + pop + getlocal 5 + pushbyte 10 + greaterthan + ofs008e: + convert_b + setlocal1 + ofs0090: + getlocal 6 + getlocal2 + iflt ofs003e + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForAnd",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForAnd") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForBreak.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForBreak.as new file mode 100644 index 000000000..5f6a65712 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForBreak.as @@ -0,0 +1,119 @@ +package tests +{ + public class TestForBreak + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForBreak() + { + method + name "tests:TestForBreak/TestForBreak" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForBreak/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 0 + coerce_a + setlocal1 + jump ofs0026 + ofs000f: + label + getlocal1 + pushbyte 5 + ifne ofs001b + jump ofs002d + ofs001b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForBreak"),ProtectedNamespace("tests:TestForBreak"),StaticProtectedNs("tests:TestForBreak"),PrivateNamespace("TestForBreak.as$0")]) + pushstring "hello:" + getlocal1 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForBreak"),ProtectedNamespace("tests:TestForBreak"),StaticProtectedNs("tests:TestForBreak"),PrivateNamespace("TestForBreak.as$0")]), 1 + inclocal 1 + ofs0026: + getlocal1 + pushbyte 10 + iflt ofs000f + ofs002d: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForBreak",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForBreak") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForContinue.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForContinue.as new file mode 100644 index 000000000..181af9413 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForContinue.as @@ -0,0 +1,149 @@ +package tests +{ + public class TestForContinue + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForContinue() + { + method + name "tests:TestForContinue/TestForContinue" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForContinue/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 0 + coerce_a + setlocal1 + jump ofs0063 + ofs000f: + label + getlocal1 + pushbyte 9 + ifne ofs004f + getlocal1 + pushbyte 5 + ifne ofs0029 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]) + pushstring "part1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]), 1 + jump ofs005d + ofs0029: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]) + pushstring "a=" + getlocal1 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]), 1 + getlocal1 + pushbyte 7 + ifne ofs0044 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]) + pushstring "part2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]), 1 + jump ofs005d + ofs0044: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]) + pushstring "part3" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]), 1 + jump ofs0056 + ofs004f: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]) + pushstring "part4" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]), 1 + ofs0056: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]) + pushstring "part5" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForContinue"),ProtectedNamespace("tests:TestForContinue"),StaticProtectedNs("tests:TestForContinue"),PrivateNamespace("TestForContinue.as$0")]), 1 + ofs005d: + getlocal1 + pushbyte 1 + add + coerce_a + setlocal1 + ofs0063: + getlocal1 + pushbyte 10 + iflt ofs000f + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForContinue",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForContinue") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEach.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEach.as new file mode 100644 index 000000000..d081727a2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEach.as @@ -0,0 +1,143 @@ +package tests +{ + public class TestForEach + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForEach() + { + method + name "tests:TestForEach/TestForEach" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEach/run" + returns null + + body + maxstack 3 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "list", 0, 13 + debug 1, "item", 1, 14 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal1 + pushundefined + coerce_a + setlocal2 + findpropstrict QName(PackageNamespace(""),"Array") + constructprop QName(PackageNamespace(""),"Array"), 0 + coerce QName(PackageNamespace(""),"Array") + setlocal1 + getlocal1 + pushbyte 0 + pushstring "first" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEach"),ProtectedNamespace("tests:TestForEach"),StaticProtectedNs("tests:TestForEach"),PrivateNamespace("TestForEach.as$0")]) + getlocal1 + pushbyte 1 + pushstring "second" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEach"),ProtectedNamespace("tests:TestForEach"),StaticProtectedNs("tests:TestForEach"),PrivateNamespace("TestForEach.as$0")]) + getlocal1 + pushbyte 2 + pushstring "third" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEach"),ProtectedNamespace("tests:TestForEach"),StaticProtectedNs("tests:TestForEach"),PrivateNamespace("TestForEach.as$0")]) + pushbyte 0 + setlocal3 + getlocal1 + coerce_a + setlocal 4 + jump ofs004b + ofs003b: + label + getlocal 4 + getlocal3 + nextvalue + coerce_a + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEach"),ProtectedNamespace("tests:TestForEach"),StaticProtectedNs("tests:TestForEach"),PrivateNamespace("TestForEach.as$0")]) + pushstring "item #" + getlocal2 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEach"),ProtectedNamespace("tests:TestForEach"),StaticProtectedNs("tests:TestForEach"),PrivateNamespace("TestForEach.as$0")]), 1 + ofs004b: + hasnext2 4, 3 + iftrue ofs003b + kill 4 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEach",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEach") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachObjectArray.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachObjectArray.as new file mode 100644 index 000000000..8d589cfb5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachObjectArray.as @@ -0,0 +1,154 @@ +package tests +{ + public class TestForEachObjectArray + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForEachObjectArray() + { + method + name "tests:TestForEachObjectArray/TestForEachObjectArray" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEachObjectArray/run" + returns null + + body + maxstack 4 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "list", 0, 13 + debug 1, "test", 1, 14 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal1 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal2 + findpropstrict QName(PackageNamespace(""),"Array") + constructprop QName(PackageNamespace(""),"Array"), 0 + coerce QName(PackageNamespace(""),"Array") + setlocal1 + getlocal1 + pushbyte 0 + pushstring "first" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + getlocal1 + pushbyte 1 + pushstring "second" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + getlocal1 + pushbyte 2 + pushstring "third" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + findpropstrict QName(PackageNamespace(""),"Array") + constructprop QName(PackageNamespace(""),"Array"), 0 + coerce QName(PackageNamespace(""),"Array") + setlocal2 + getlocal2 + pushbyte 0 + pushbyte 0 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + pushbyte 0 + setlocal3 + getlocal1 + coerce_a + setlocal 4 + jump ofs0062 + ofs004b: + label + getlocal2 + pushbyte 0 + getlocal 4 + getlocal3 + nextvalue + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + pushstring "item #" + getlocal2 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]) + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectArray"),ProtectedNamespace("tests:TestForEachObjectArray"),StaticProtectedNs("tests:TestForEachObjectArray"),PrivateNamespace("TestForEachObjectArray.as$0")]), 1 + ofs0062: + hasnext2 4, 3 + iftrue ofs004b + kill 4 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEachObjectArray",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEachObjectArray") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachObjectAttribute.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachObjectAttribute.as new file mode 100644 index 000000000..6a1108c1b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachObjectAttribute.as @@ -0,0 +1,142 @@ +package tests +{ + public class TestForEachObjectAttribute + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var testPriv:int = 5; + + public function TestForEachObjectAttribute() + { + method + name "tests:TestForEachObjectAttribute/TestForEachObjectAttribute" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEachObjectAttribute/run" + returns null + + body + maxstack 3 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "list", 0, 15 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal1 + findpropstrict QName(PackageNamespace(""),"Array") + constructprop QName(PackageNamespace(""),"Array"), 0 + coerce QName(PackageNamespace(""),"Array") + setlocal1 + getlocal1 + pushbyte 0 + pushstring "first" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectAttribute"),ProtectedNamespace("tests:TestForEachObjectAttribute"),StaticProtectedNs("tests:TestForEachObjectAttribute"),PrivateNamespace("TestForEachObjectAttribute.as$0")]) + getlocal1 + pushbyte 1 + pushstring "second" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectAttribute"),ProtectedNamespace("tests:TestForEachObjectAttribute"),StaticProtectedNs("tests:TestForEachObjectAttribute"),PrivateNamespace("TestForEachObjectAttribute.as$0")]) + getlocal1 + pushbyte 2 + pushstring "third" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectAttribute"),ProtectedNamespace("tests:TestForEachObjectAttribute"),StaticProtectedNs("tests:TestForEachObjectAttribute"),PrivateNamespace("TestForEachObjectAttribute.as$0")]) + pushbyte 0 + setlocal2 + getlocal1 + coerce_a + setlocal3 + jump ofs0044 + ofs0032: + label + getlocal0 + getlocal3 + getlocal2 + nextvalue + setproperty QName(PrivateNamespace("tests:TestForEachObjectAttribute"),"testPriv") + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectAttribute"),ProtectedNamespace("tests:TestForEachObjectAttribute"),StaticProtectedNs("tests:TestForEachObjectAttribute"),PrivateNamespace("TestForEachObjectAttribute.as$0")]) + pushstring "item #" + getlocal0 + getproperty QName(PrivateNamespace("tests:TestForEachObjectAttribute"),"testPriv") + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachObjectAttribute"),ProtectedNamespace("tests:TestForEachObjectAttribute"),StaticProtectedNs("tests:TestForEachObjectAttribute"),PrivateNamespace("TestForEachObjectAttribute.as$0")]), 1 + ofs0044: + hasnext2 3, 2 + iftrue ofs0032 + kill 3 + kill 2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEachObjectAttribute",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEachObjectAttribute") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachReturn.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachReturn.as new file mode 100644 index 000000000..226870c2e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachReturn.as @@ -0,0 +1,149 @@ +package tests +{ + public class TestForEachReturn + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForEachReturn() + { + method + name "tests:TestForEachReturn/TestForEachReturn" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEachReturn/run" + returns null + + body + maxstack 3 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "list", 0, 13 + debug 1, "item", 1, 14 + debug 1, "_loc3_", 2, 19 + debug 1, "_loc4_", 3, 20 + pushnull + coerce QName(PackageNamespace(""),"Array") + setlocal1 + pushundefined + coerce_a + setlocal2 + findpropstrict QName(PackageNamespace(""),"Array") + constructprop QName(PackageNamespace(""),"Array"), 0 + coerce QName(PackageNamespace(""),"Array") + setlocal1 + getlocal1 + pushbyte 0 + pushstring "first" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachReturn"),ProtectedNamespace("tests:TestForEachReturn"),StaticProtectedNs("tests:TestForEachReturn"),PrivateNamespace("TestForEachReturn.as$0")]) + getlocal1 + pushbyte 1 + pushstring "second" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachReturn"),ProtectedNamespace("tests:TestForEachReturn"),StaticProtectedNs("tests:TestForEachReturn"),PrivateNamespace("TestForEachReturn.as$0")]) + getlocal1 + pushbyte 2 + pushstring "third" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachReturn"),ProtectedNamespace("tests:TestForEachReturn"),StaticProtectedNs("tests:TestForEachReturn"),PrivateNamespace("TestForEachReturn.as$0")]) + pushbyte 0 + convert_i + setlocal3 + getlocal1 + coerce_a + setlocal 4 + pushbyte 0 + setlocal 5 + getlocal 4 + coerce_a + setlocal 6 + jump ofs0059 + ofs004f: + label + getlocal 6 + getlocal 5 + nextvalue + coerce_a + setlocal2 + getlocal2 + returnvalue + ofs0059: + hasnext2 6, 5 + iftrue ofs004f + kill 6 + kill 5 + pushnull + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEachReturn",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEachReturn") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachReturn2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachReturn2.as new file mode 100644 index 000000000..baed932b7 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachReturn2.as @@ -0,0 +1,175 @@ +package tests +{ + public class TestForEachReturn2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForEachReturn2() + { + method + name "tests:TestForEachReturn2/TestForEachReturn2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEachReturn2/run" + returns null + + body + maxstack 2 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "item", 0, 13 + debug 1, "obj", 1, 14 + debug 1, "x", 2, 15 + pushundefined + coerce_a + setlocal1 + pushnull + coerce_a + setlocal2 + pushbyte 5 + coerce_a + setlocal3 + getlocal3 + pushnull + ifeq ofs00a4 + newobject 0 + coerce_a + setlocal2 + pushbyte 0 + setlocal 4 + getlocal2 + coerce_a + setlocal 5 + jump ofs0099 + ofs0031: + label + getlocal 5 + getlocal 4 + nextvalue + coerce_a + setlocal1 + jump ofs0045 + ofs003d: + label + getlocal1 + returnvalue + ofs0040: + label + jump ofs0099 + ofs0045: + getlocal1 + pushstring "key" + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachReturn2"),ProtectedNamespace("tests:TestForEachReturn2"),StaticProtectedNs("tests:TestForEachReturn2"),PrivateNamespace("TestForEachReturn2.as$0")]) + setlocal 6 + pushbyte 1 + getlocal 6 + ifstrictne ofs005a + pushbyte 0 + jump ofs0086 + ofs005a: + pushbyte 2 + getlocal 6 + ifstrictne ofs0068 + pushbyte 1 + jump ofs0086 + ofs0068: + pushbyte 3 + getlocal 6 + ifstrictne ofs0076 + pushbyte 2 + jump ofs0086 + ofs0076: + pushbyte 4 + getlocal 6 + ifstrictne ofs0084 + pushbyte 3 + jump ofs0086 + ofs0084: + pushbyte -1 + ofs0086: + kill 6 + lookupswitch ofs0040, [ofs003d, ofs003d, ofs003d, ofs003d] + ofs0099: + hasnext2 5, 4 + iftrue ofs0031 + kill 5 + kill 4 + ofs00a4: + pushnull + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEachReturn2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEachReturn2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachSwitch.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachSwitch.as new file mode 100644 index 000000000..23d678c40 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachSwitch.as @@ -0,0 +1,212 @@ +package tests +{ + public class TestForEachSwitch + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForEachSwitch() + { + method + name "tests:TestForEachSwitch/TestForEachSwitch" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEachSwitch/run" + returns null + + body + maxstack 2 + localcount 10 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "name", 0, 13 + debug 1, "a", 1, 14 + debug 1, "b", 2, 15 + debug 1, "c", 3, 16 + debug 1, "s", 4, 17 + debug 1, "obj", 5, 18 + pushnull + coerce_s + setlocal1 + pushtrue + convert_b + setlocal2 + pushtrue + convert_b + setlocal3 + pushtrue + convert_b + setlocal 4 + pushbyte 5 + convert_i + setlocal 5 + newobject 0 + coerce QName(PackageNamespace(""),"Object") + setlocal 6 + pushbyte 0 + setlocal 7 + getlocal 6 + coerce_a + setlocal 8 + jump ofs00f4 + ofs0045: + label + getlocal 8 + getlocal 7 + nextvalue + coerce_s + setlocal1 + getlocal2 + iffalse ofs00ed + jump ofs008f + ofs0056: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + getlocal3 + iffalse ofs006a + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "1b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + ofs006a: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + jump ofs00e0 + ofs0076: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "3" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + jump ofs00e0 + ofs0082: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "4" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + ofs008a: + label + jump ofs00e0 + ofs008f: + getlocal 5 + setlocal 9 + pushbyte 1 + getlocal 9 + ifstrictne ofs00a1 + pushbyte 0 + jump ofs00cd + ofs00a1: + pushbyte 2 + getlocal 9 + ifstrictne ofs00af + pushbyte 1 + jump ofs00cd + ofs00af: + pushbyte 3 + getlocal 9 + ifstrictne ofs00bd + pushbyte 2 + jump ofs00cd + ofs00bd: + pushbyte 4 + getlocal 9 + ifstrictne ofs00cb + pushbyte 3 + jump ofs00cd + ofs00cb: + pushbyte -1 + ofs00cd: + kill 9 + lookupswitch ofs008a, [ofs0056, ofs006a, ofs0076, ofs0082] + ofs00e0: + getlocal 4 + iffalse ofs00ed + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "2c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + ofs00ed: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]) + pushstring "before_continue" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachSwitch"),ProtectedNamespace("tests:TestForEachSwitch"),StaticProtectedNs("tests:TestForEachSwitch"),PrivateNamespace("TestForEachSwitch.as$0")]), 1 + ofs00f4: + hasnext2 8, 7 + iftrue ofs0045 + kill 8 + kill 7 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEachSwitch",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEachSwitch") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachTry.as new file mode 100644 index 000000000..8ec9d2995 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForEachTry.as @@ -0,0 +1,185 @@ +package tests +{ + public class TestForEachTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForEachTry() + { + method + name "tests:TestForEachTry/TestForEachTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForEachTry/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 5 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"name") + slotid 1 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"list") + slotid 2 + type QName(PackageNamespace(""),"Object") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 3 + type QName(PackageNamespace(""),"Boolean") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushnull + coerce_s + setslot 1 + getscopeobject 1 + newobject 0 + coerce QName(PackageNamespace(""),"Object") + setslot 2 + getscopeobject 1 + pushtrue + convert_b + setslot 3 + pushbyte 0 + setlocal2 + getscopeobject 1 + getslot 2 + coerce_a + setlocal3 + jump ofs0079 + ofs002c: + label + getscopeobject 1 + getlocal3 + getlocal2 + nextvalue + coerce_s + setslot 1 + ofs0035: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]) + pushstring "xx" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]), 1 + getscopeobject 1 + getslot 3 + iffalse ofs004f + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]), 1 + jump ofs0056 + ofs004f: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]), 1 + ofs0056: + jump ofs0072 + ofs005a: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal 4 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]), 1 + popscope + kill 4 + ofs0072: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForEachTry"),ProtectedNamespace("tests:TestForEachTry"),StaticProtectedNs("tests:TestForEachTry"),PrivateNamespace("TestForEachTry.as$0")]), 1 + ofs0079: + hasnext2 3, 2 + iftrue ofs002c + kill 3 + kill 2 + returnvoid + end ; code + try from ofs0035 to ofs0056 target ofs005a type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForEachTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForEachTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForGoto.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForGoto.as new file mode 100644 index 000000000..70f11734a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForGoto.as @@ -0,0 +1,143 @@ +package tests +{ + public class TestForGoto + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForGoto() + { + method + name "tests:TestForGoto/TestForGoto" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForGoto/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "c", 0, 13 + debug 1, "len", 1, 14 + debug 1, "i", 2, 15 + pushbyte 0 + convert_i + setlocal1 + pushbyte 5 + convert_i + setlocal2 + pushbyte 0 + convert_u + setlocal3 + jump ofs0053 + ofs0021: + label + pushbyte 1 + convert_i + setlocal1 + getlocal1 + pushbyte 2 + ifne ofs0038 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]), 1 + jump ofs004a + ofs0038: + getlocal1 + pushbyte 3 + ifeq ofs0043 + jump ofs0051 + ofs0043: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]), 1 + ofs004a: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]), 1 + ofs0051: + inclocal 3 + ofs0053: + getlocal3 + getlocal2 + iflt ofs0021 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]) + pushstring "exit" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForGoto"),ProtectedNamespace("tests:TestForGoto"),StaticProtectedNs("tests:TestForGoto"),PrivateNamespace("TestForGoto.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForGoto",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForGoto") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForIn.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForIn.as new file mode 100644 index 000000000..7b2ab9c86 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForIn.as @@ -0,0 +1,148 @@ +package tests +{ + import flash.utils.Dictionary; + + public class TestForIn + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForIn() + { + method + name "tests:TestForIn/TestForIn" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForIn/run" + returns null + + body + maxstack 2 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "dic", 0, 15 + debug 1, "item", 1, 16 + pushnull + coerce QName(PackageNamespace("flash.utils"),"Dictionary") + setlocal1 + pushnull + coerce_a + setlocal2 + pushbyte 0 + setlocal3 + getlocal1 + coerce_a + setlocal 4 + jump ofs002b + ofs001e: + label + getlocal 4 + getlocal3 + nextname + coerce_a + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForIn"),ProtectedNamespace("tests:TestForIn"),StaticProtectedNs("tests:TestForIn"),PrivateNamespace("TestForIn.as$0")]) + getlocal2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForIn"),ProtectedNamespace("tests:TestForIn"),StaticProtectedNs("tests:TestForIn"),PrivateNamespace("TestForIn.as$0")]), 1 + ofs002b: + hasnext2 4, 3 + iftrue ofs001e + kill 4 + kill 3 + pushbyte 0 + setlocal3 + getlocal1 + coerce_a + setlocal 4 + jump ofs004e + ofs0041: + label + getlocal 4 + getlocal3 + nextvalue + coerce_a + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForIn"),ProtectedNamespace("tests:TestForIn"),StaticProtectedNs("tests:TestForIn"),PrivateNamespace("TestForIn.as$0")]) + getlocal2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForIn"),ProtectedNamespace("tests:TestForIn"),StaticProtectedNs("tests:TestForIn"),PrivateNamespace("TestForIn.as$0")]), 1 + ofs004e: + hasnext2 4, 3 + iftrue ofs0041 + kill 4 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForIn",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForIn") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInIf.as new file mode 100644 index 000000000..f99c3cff6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInIf.as @@ -0,0 +1,144 @@ +package tests +{ + public class TestForInIf + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForInIf() + { + method + name "tests:TestForInIf/TestForInIf" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForInIf/run" + returns null + + body + maxstack 3 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "arr", 1, 14 + debug 1, "b", 2, 15 + pushnull + coerce_s + setlocal1 + pushstring "a" + pushstring "b" + pushstring "c" + newarray 3 + coerce QName(PackageNamespace(""),"Array") + setlocal2 + pushbyte 5 + convert_i + setlocal3 + pushbyte 0 + setlocal 4 + getlocal2 + coerce_a + setlocal 5 + jump ofs0054 + ofs002f: + label + getlocal 5 + getlocal 4 + nextname + coerce_s + setlocal1 + getlocal3 + pushbyte 5 + ifne ofs004d + getlocal3 + pushbyte 7 + ifnle ofs0046 + returnvoid + ofs0046: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInIf"),ProtectedNamespace("tests:TestForInIf"),StaticProtectedNs("tests:TestForInIf"),PrivateNamespace("TestForInIf.as$0")]) + pushstring "b>7" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInIf"),ProtectedNamespace("tests:TestForInIf"),StaticProtectedNs("tests:TestForInIf"),PrivateNamespace("TestForInIf.as$0")]), 1 + ofs004d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInIf"),ProtectedNamespace("tests:TestForInIf"),StaticProtectedNs("tests:TestForInIf"),PrivateNamespace("TestForInIf.as$0")]) + pushstring "forend" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInIf"),ProtectedNamespace("tests:TestForInIf"),StaticProtectedNs("tests:TestForInIf"),PrivateNamespace("TestForInIf.as$0")]), 1 + ofs0054: + hasnext2 5, 4 + iftrue ofs002f + kill 5 + kill 4 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForInIf",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForInIf") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInReturn.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInReturn.as new file mode 100644 index 000000000..b2f80f67c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInReturn.as @@ -0,0 +1,135 @@ +package tests +{ + import flash.utils.Dictionary; + + public class TestForInReturn + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForInReturn() + { + method + name "tests:TestForInReturn/TestForInReturn" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForInReturn/run" + returns null + + body + maxstack 2 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "dic", 0, 15 + debug 1, "item", 1, 16 + debug 1, "_loc3_", 2, 17 + debug 1, "_loc4_", 3, 18 + pushnull + coerce QName(PackageNamespace("flash.utils"),"Dictionary") + setlocal1 + pushnull + coerce_a + setlocal2 + pushbyte 0 + convert_i + setlocal3 + getlocal1 + coerce_a + setlocal 4 + pushbyte 0 + setlocal 5 + getlocal 4 + coerce_a + setlocal 6 + jump ofs003c + ofs0032: + label + getlocal 6 + getlocal 5 + nextname + coerce_a + setlocal2 + getlocal2 + returnvalue + ofs003c: + hasnext2 6, 5 + iftrue ofs0032 + kill 6 + kill 5 + pushnull + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForInReturn",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForInReturn") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInSwitch.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInSwitch.as new file mode 100644 index 000000000..085b1ae92 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForInSwitch.as @@ -0,0 +1,175 @@ +package tests +{ + public class TestForInSwitch + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForInSwitch() + { + method + name "tests:TestForInSwitch/TestForInSwitch" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForInSwitch/run" + returns null + + body + maxstack 3 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "arr", 1, 14 + pushnull + coerce_s + setlocal1 + pushstring "a" + pushstring "b" + pushstring "c" + newarray 3 + coerce QName(PackageNamespace(""),"Array") + setlocal2 + pushbyte 0 + setlocal3 + getlocal2 + coerce_a + setlocal 4 + jump ofs009b + ofs0025: + label + getlocal 4 + getlocal3 + nextname + coerce_s + setlocal1 + jump ofs0055 + ofs0030: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]) + pushstring "val a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]), 1 + jump ofs0094 + ofs003c: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]) + pushstring "val b" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]), 1 + jump ofs0094 + ofs0048: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]) + pushstring "val c" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]), 1 + ofs0050: + label + jump ofs0094 + ofs0055: + getlocal1 + setlocal 5 + pushstring "a" + getlocal 5 + ifstrictne ofs0066 + pushbyte 0 + jump ofs0084 + ofs0066: + pushstring "b" + getlocal 5 + ifstrictne ofs0074 + pushbyte 1 + jump ofs0084 + ofs0074: + pushstring "c" + getlocal 5 + ifstrictne ofs0082 + pushbyte 2 + jump ofs0084 + ofs0082: + pushbyte -1 + ofs0084: + kill 5 + lookupswitch ofs0050, [ofs0030, ofs003c, ofs0048] + ofs0094: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]) + pushstring "final" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForInSwitch"),ProtectedNamespace("tests:TestForInSwitch"),StaticProtectedNs("tests:TestForInSwitch"),PrivateNamespace("TestForInSwitch.as$0")]), 1 + ofs009b: + hasnext2 4, 3 + iftrue ofs0025 + kill 4 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForInSwitch",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForInSwitch") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForXml.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForXml.as new file mode 100644 index 000000000..f19925984 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestForXml.as @@ -0,0 +1,249 @@ +package tests +{ + public class TestForXml + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestForXml() + { + method + name "tests:TestForXml/TestForXml" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestForXml/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 7 + initscopedepth 5 + maxscopedepth 8 + trait slot QName(PackageInternalNs("tests"),"i") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"c") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"name") + slotid 3 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"myXML") + slotid 4 + type QName(PackageNamespace(""),"XML") + end ; trait + trait slot QName(PackageInternalNs("tests"),"k") + slotid 5 + type null + end ; trait + trait slot QName(PackageInternalNs("tests"),"len") + slotid 6 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"a") + slotid 7 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 8 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 0 + setslot 2 + getscopeobject 1 + pushstring "ahoj" + coerce_s + setslot 3 + getscopeobject 1 + getlex QName(PackageNamespace(""),"XML") + pushstring "\r\n\{24} \r\n\{24} " + getscopeobject 1 + getslot 3 + esc_xelem + add + pushstring "\r\n\{24} \r\n\{22} " + add + construct 1 + coerce QName(PackageNamespace(""),"XML") + setslot 4 + getscopeobject 1 + pushnull + coerce_a + setslot 5 + getscopeobject 1 + pushbyte 5 + setslot 6 + getscopeobject 1 + pushbyte 5 + setslot 7 + getscopeobject 1 + pushbyte 6 + setslot 8 + getscopeobject 1 + pushbyte 0 + setslot 1 + jump ofs00d2 + ofs004f: + label + getscopeobject 1 + pushbyte 1 + setslot 2 + getscopeobject 1 + getslot 2 + pushbyte 2 + ifne ofs006b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]), 1 + jump ofs0080 + ofs006b: + getscopeobject 1 + getslot 2 + pushbyte 3 + ifeq ofs0079 + jump ofs0087 + ofs0079: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]), 1 + ofs0080: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]), 1 + ofs0087: + getscopeobject 1 + pushbyte 0 + setlocal3 + getscopeobject 1 + getslot 4 + getproperty Multiname("book",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]) + checkfilter + coerce_a + setlocal 4 + getlex QName(PackageNamespace(""),"XMLList") + pushstring "" + construct 1 + setlocal2 + jump ofs00c1 + ofs00a1: + label + getlocal 4 + getlocal3 + nextvalue + dup + setlocal 5 + dup + setlocal 6 + pushwith + getlex MultinameA("isbn",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]) + pushstring "12345" + equals + iffalse ofs00bc + getlocal2 + getlocal3 + getlocal 5 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestForXml"),ProtectedNamespace("tests:TestForXml"),StaticProtectedNs("tests:TestForXml"),PrivateNamespace("TestForXml.as$0")]) + ofs00bc: + popscope + kill 6 + kill 5 + ofs00c1: + hasnext2 4, 3 + iftrue ofs00a1 + kill 4 + kill 3 + getlocal2 + kill 2 + coerce_a + setslot 5 + ofs00d2: + getscopeobject 1 + getslot 1 + getscopeobject 1 + getslot 6 + iflt ofs004f + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestForXml",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestForXml") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGetProtected.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGetProtected.as new file mode 100644 index 000000000..07e6aadd9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGetProtected.as @@ -0,0 +1,168 @@ +package tests +{ + public class TestGetProtected + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + protected var attr:int = 5; + + public function TestGetProtected() + { + method + name "tests:TestGetProtected/TestGetProtected" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGetProtected/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "c", 0, 15 + debug 1, "a", 1, 17 + findpropstrict QName(PrivateNamespace("TestGetProtected.as$0"),"InnerClass") + constructprop QName(PrivateNamespace("TestGetProtected.as$0"),"InnerClass"), 0 + coerce QName(PrivateNamespace("TestGetProtected.as$0"),"InnerClass") + setlocal1 + getlocal1 + pushbyte 2 + setproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGetProtected"),ProtectedNamespace("tests:TestGetProtected"),StaticProtectedNs("tests:TestGetProtected"),PrivateNamespace("TestGetProtected.as$0")]) + getlocal0 + getproperty QName(ProtectedNamespace("tests:TestGetProtected"),"attr") + convert_i + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGetProtected"),ProtectedNamespace("tests:TestGetProtected"),StaticProtectedNs("tests:TestGetProtected"),PrivateNamespace("TestGetProtected.as$0")]) + getlocal2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGetProtected"),ProtectedNamespace("tests:TestGetProtected"),StaticProtectedNs("tests:TestGetProtected"),PrivateNamespace("TestGetProtected.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class InnerClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attr:int = 1; + + public function InnerClass() + { + method + name "TestGetProtected.as$0:InnerClass/InnerClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGetProtected",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGetProtected") + findpropstrict Multiname("InnerClass",[PrivateNamespace("TestGetProtected.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestGetProtected.as$0"),"InnerClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos.as new file mode 100644 index 000000000..e60b42ff5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos.as @@ -0,0 +1,180 @@ +package tests +{ + public class TestGotos + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos() + { + method + name "tests:TestGotos/TestGotos" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + final public function run(param1:Object) : int + { + trait method QName(PackageNamespace(""),"run") + flag FINAL + dispid 0 + method + name "tests:TestGotos/run" + flag NEED_ACTIVATION + param QName(PackageNamespace(""),"Object") + returns QName(PackageNamespace(""),"int") + + body + maxstack 3 + localcount 4 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"param1") + slotid 1 + type QName(PackageNamespace(""),"Object") + end ; trait + trait slot QName(PackageInternalNs("tests"),"a") + slotid 2 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 3 + type QName(PackageNamespace(""),"Boolean") + end ; trait + + code + getlocal0 + pushscope + debug 1, "param1", 0, 0 + debug 1, "+$activation", 1, 0 + newactivation + dup + setlocal2 + pushscope + getscopeobject 1 + getlocal1 + coerce QName(PackageNamespace(""),"Object") + setslot 1 + getscopeobject 1 + pushtrue + convert_b + setslot 2 + getscopeobject 1 + pushfalse + convert_b + setslot 3 + getscopeobject 1 + getslot 2 + iffalse ofs0036 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]), 1 + jump ofs007d + ofs0036: + getscopeobject 1 + getslot 3 + iffalse ofs0049 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]), 1 + jump ofs007d + ofs0049: + getscopeobject 1 + getslot 2 + iffalse ofs0054 + pushbyte 7 + returnvalue + ofs0054: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]) + pushstring "x" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]), 1 + ofs005b: + jump ofs0076 + ofs005f: + getlocal0 + pushscope + getlocal2 + pushscope + newcatch 0 + dup + setlocal3 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]) + pushstring "z" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]), 1 + popscope + kill 3 + ofs0076: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]) + pushstring "after" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos"),ProtectedNamespace("tests:TestGotos"),StaticProtectedNs("tests:TestGotos"),PrivateNamespace("TestGotos.as$0")]), 1 + ofs007d: + pushbyte 89 + returnvalue + end ; code + try from ofs0049 to ofs005b target ofs005f type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos2.as new file mode 100644 index 000000000..87c424dbd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos2.as @@ -0,0 +1,128 @@ +package tests +{ + public class TestGotos2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos2() + { + method + name "tests:TestGotos2/TestGotos2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : int + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGotos2/run" + returns QName(PackageNamespace(""),"int") + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + pushtrue + convert_b + setlocal1 + pushfalse + convert_b + setlocal2 + pushtrue + convert_b + setlocal3 + getlocal1 + iffalse ofs003b + getlocal2 + iffalse ofs0037 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos2"),ProtectedNamespace("tests:TestGotos2"),StaticProtectedNs("tests:TestGotos2"),PrivateNamespace("TestGotos2.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos2"),ProtectedNamespace("tests:TestGotos2"),StaticProtectedNs("tests:TestGotos2"),PrivateNamespace("TestGotos2.as$0")]), 1 + getlocal3 + iffalse ofs0037 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos2"),ProtectedNamespace("tests:TestGotos2"),StaticProtectedNs("tests:TestGotos2"),PrivateNamespace("TestGotos2.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos2"),ProtectedNamespace("tests:TestGotos2"),StaticProtectedNs("tests:TestGotos2"),PrivateNamespace("TestGotos2.as$0")]), 1 + ofs0037: + jump ofs0042 + ofs003b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos2"),ProtectedNamespace("tests:TestGotos2"),StaticProtectedNs("tests:TestGotos2"),PrivateNamespace("TestGotos2.as$0")]) + pushstring "E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos2"),ProtectedNamespace("tests:TestGotos2"),StaticProtectedNs("tests:TestGotos2"),PrivateNamespace("TestGotos2.as$0")]), 1 + ofs0042: + pushbyte 5 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos3.as new file mode 100644 index 000000000..1b5063632 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos3.as @@ -0,0 +1,142 @@ +package tests +{ + public class TestGotos3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos3() + { + method + name "tests:TestGotos3/TestGotos3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGotos3/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + debug 1, "a", 1, 14 + pushbyte 0 + convert_i + setlocal1 + pushbyte 5 + convert_i + setlocal2 + getlocal2 + pushbyte 5 + ifngt ofs0051 + pushbyte 0 + convert_i + setlocal1 + jump ofs0046 + ofs0023: + label + getlocal1 + pushbyte 3 + ifngt ofs003d + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]), 1 + getlocal1 + pushbyte 4 + ifne ofs003d + jump ofs004d + ofs003d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]), 1 + inclocal_i 1 + ofs0046: + getlocal1 + pushbyte 5 + iflt ofs0023 + ofs004d: + jump ofs0058 + ofs0051: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]), 1 + ofs0058: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]) + pushstring "return" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos3"),ProtectedNamespace("tests:TestGotos3"),StaticProtectedNs("tests:TestGotos3"),PrivateNamespace("TestGotos3.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos3",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos3") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos4.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos4.as new file mode 100644 index 000000000..5326f5c21 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos4.as @@ -0,0 +1,146 @@ +package tests +{ + public class TestGotos4 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos4() + { + method + name "tests:TestGotos4/TestGotos4" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGotos4/run" + flag NEED_ACTIVATION + returns QName(PackageNamespace(""),"void") + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 5 + setslot 1 + getscopeobject 1 + getslot 1 + pushbyte 3 + ifngt ofs0047 + getscopeobject 1 + getslot 1 + pushbyte 7 + ifnlt ofs0047 + ofs0025: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos4"),ProtectedNamespace("tests:TestGotos4"),StaticProtectedNs("tests:TestGotos4"),PrivateNamespace("TestGotos4.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos4"),ProtectedNamespace("tests:TestGotos4"),StaticProtectedNs("tests:TestGotos4"),PrivateNamespace("TestGotos4.as$0")]), 1 + ofs002c: + jump ofs0040 + ofs0030: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + popscope + kill 2 + ofs0040: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos4"),ProtectedNamespace("tests:TestGotos4"),StaticProtectedNs("tests:TestGotos4"),PrivateNamespace("TestGotos4.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos4"),ProtectedNamespace("tests:TestGotos4"),StaticProtectedNs("tests:TestGotos4"),PrivateNamespace("TestGotos4.as$0")]), 1 + ofs0047: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos4"),ProtectedNamespace("tests:TestGotos4"),StaticProtectedNs("tests:TestGotos4"),PrivateNamespace("TestGotos4.as$0")]) + pushstring "return" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos4"),ProtectedNamespace("tests:TestGotos4"),StaticProtectedNs("tests:TestGotos4"),PrivateNamespace("TestGotos4.as$0")]), 1 + returnvoid + end ; code + try from ofs0025 to ofs002c target ofs0030 type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"error") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos4",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos4") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos5.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos5.as new file mode 100644 index 000000000..1bcc5b398 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos5.as @@ -0,0 +1,142 @@ +package tests +{ + public class TestGotos5 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos5() + { + method + name "tests:TestGotos5/TestGotos5" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGotos5/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "j", 0, 13 + debug 1, "s", 1, 14 + debug 1, "i", 2, 15 + pushbyte 0 + convert_i + setlocal1 + pushstring "A" + coerce_s + setlocal2 + pushbyte 0 + convert_i + setlocal3 + jump ofs0056 + ofs0021: + label + getlocal2 + pushstring "B" + ifne ofs0034 + getlocal2 + pushstring "C" + ifne ofs0034 + jump ofs0054 + ofs0034: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos5"),ProtectedNamespace("tests:TestGotos5"),StaticProtectedNs("tests:TestGotos5"),PrivateNamespace("TestGotos5.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos5"),ProtectedNamespace("tests:TestGotos5"),StaticProtectedNs("tests:TestGotos5"),PrivateNamespace("TestGotos5.as$0")]), 1 + pushbyte 0 + convert_i + setlocal1 + jump ofs004d + ofs0043: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos5"),ProtectedNamespace("tests:TestGotos5"),StaticProtectedNs("tests:TestGotos5"),PrivateNamespace("TestGotos5.as$0")]) + pushstring "E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos5"),ProtectedNamespace("tests:TestGotos5"),StaticProtectedNs("tests:TestGotos5"),PrivateNamespace("TestGotos5.as$0")]), 1 + inclocal_i 1 + ofs004d: + getlocal1 + pushbyte 29 + iflt ofs0043 + ofs0054: + inclocal_i 3 + ofs0056: + getlocal3 + pushbyte 10 + iflt ofs0021 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos5",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos5") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos6.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos6.as new file mode 100644 index 000000000..5d1677638 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos6.as @@ -0,0 +1,161 @@ +package tests +{ + public class TestGotos6 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos6() + { + method + name "tests:TestGotos6/TestGotos6" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGotos6/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "s", 1, 14 + pushtrue + convert_b + setlocal1 + pushstring "a" + coerce_s + setlocal2 + getlocal1 + iffalse ofs007c + jump ofs003d + ofs001c: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]) + pushstring "is A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]), 1 + jump ofs0078 + ofs0028: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]) + pushstring "is B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]), 1 + ofs0030: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]) + pushstring "is BC" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]), 1 + ofs0038: + label + jump ofs0078 + ofs003d: + getlocal2 + setlocal3 + pushstring "a" + getlocal3 + ifstrictne ofs004c + pushbyte 0 + jump ofs0068 + ofs004c: + pushstring "b" + getlocal3 + ifstrictne ofs0059 + pushbyte 1 + jump ofs0068 + ofs0059: + pushstring "c" + getlocal3 + ifstrictne ofs0066 + pushbyte 2 + jump ofs0068 + ofs0066: + pushbyte -1 + ofs0068: + kill 3 + lookupswitch ofs0038, [ofs001c, ofs0028, ofs0030] + ofs0078: + jump ofs0083 + ofs007c: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]), 1 + ofs0083: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]) + pushstring "finish" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos6"),ProtectedNamespace("tests:TestGotos6"),StaticProtectedNs("tests:TestGotos6"),PrivateNamespace("TestGotos6.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos6",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos6") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos7.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos7.as new file mode 100644 index 000000000..f8739fc27 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestGotos7.as @@ -0,0 +1,180 @@ +package tests +{ + public class TestGotos7 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestGotos7() + { + method + name "tests:TestGotos7/TestGotos7" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestGotos7/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + pushbyte 0 + convert_i + setlocal1 + jump ofs00ac + ofs000f: + label + jump ofs0058 + ofs0014: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]) + pushstring "zero" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]), 1 + jump ofs00aa + ofs0020: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]) + pushstring "five" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]), 1 + jump ofs00a3 + ofs002c: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]) + pushstring "ten" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]), 1 + jump ofs00a3 + ofs0038: + label + getlocal1 + pushbyte 7 + ifne ofs0044 + jump ofs00aa + ofs0044: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]) + pushstring "one" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]), 1 + ofs004b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]) + pushstring "def" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]), 1 + label + jump ofs00a3 + ofs0058: + getlocal1 + setlocal2 + pushbyte 0 + getlocal2 + ifstrictne ofs0067 + pushbyte 0 + jump ofs0090 + ofs0067: + pushbyte 5 + getlocal2 + ifstrictne ofs0074 + pushbyte 1 + jump ofs0090 + ofs0074: + pushbyte 10 + getlocal2 + ifstrictne ofs0081 + pushbyte 2 + jump ofs0090 + ofs0081: + pushbyte 1 + getlocal2 + ifstrictne ofs008e + pushbyte 3 + jump ofs0090 + ofs008e: + pushbyte -1 + ofs0090: + kill 2 + lookupswitch ofs004b, [ofs0014, ofs0020, ofs002c, ofs0038] + ofs00a3: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]) + pushstring "before loop end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestGotos7"),ProtectedNamespace("tests:TestGotos7"),StaticProtectedNs("tests:TestGotos7"),PrivateNamespace("TestGotos7.as$0")]), 1 + ofs00aa: + inclocal_i 1 + ofs00ac: + getlocal1 + pushbyte 10 + iflt ofs000f + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestGotos7",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestGotos7") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestHello.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestHello.as new file mode 100644 index 000000000..c393917e0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestHello.as @@ -0,0 +1,99 @@ +package tests +{ + public class TestHello + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestHello() + { + method + name "tests:TestHello/TestHello" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestHello/run" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestHello"),ProtectedNamespace("tests:TestHello"),StaticProtectedNs("tests:TestHello"),PrivateNamespace("TestHello.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestHello"),ProtectedNamespace("tests:TestHello"),StaticProtectedNs("tests:TestHello"),PrivateNamespace("TestHello.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestHello",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestHello") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIf.as new file mode 100644 index 000000000..e71ac881a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIf.as @@ -0,0 +1,107 @@ +package tests +{ + public class TestIf + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIf() + { + method + name "tests:TestIf/TestIf" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIf/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + getlocal1 + pushbyte 7 + ifne ofs0019 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIf"),ProtectedNamespace("tests:TestIf"),StaticProtectedNs("tests:TestIf"),PrivateNamespace("TestIf.as$0")]) + pushstring "onTrue" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIf"),ProtectedNamespace("tests:TestIf"),StaticProtectedNs("tests:TestIf"),PrivateNamespace("TestIf.as$0")]), 1 + ofs0019: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIf",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIf") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfElse.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfElse.as new file mode 100644 index 000000000..ca945ea59 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfElse.as @@ -0,0 +1,112 @@ +package tests +{ + public class TestIfElse + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIfElse() + { + method + name "tests:TestIfElse/TestIfElse" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIfElse/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + getlocal1 + pushbyte 7 + ifne ofs001d + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfElse"),ProtectedNamespace("tests:TestIfElse"),StaticProtectedNs("tests:TestIfElse"),PrivateNamespace("TestIfElse.as$0")]) + pushstring "onTrue" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfElse"),ProtectedNamespace("tests:TestIfElse"),StaticProtectedNs("tests:TestIfElse"),PrivateNamespace("TestIfElse.as$0")]), 1 + jump ofs0024 + ofs001d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfElse"),ProtectedNamespace("tests:TestIfElse"),StaticProtectedNs("tests:TestIfElse"),PrivateNamespace("TestIfElse.as$0")]) + pushstring "onFalse" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfElse"),ProtectedNamespace("tests:TestIfElse"),StaticProtectedNs("tests:TestIfElse"),PrivateNamespace("TestIfElse.as$0")]), 1 + ofs0024: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIfElse",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIfElse") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfFinally.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfFinally.as new file mode 100644 index 000000000..1c7fad610 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfFinally.as @@ -0,0 +1,172 @@ +package tests +{ + public class TestIfFinally + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIfFinally() + { + method + name "tests:TestIfFinally/TestIfFinally" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIfFinally/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 4 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + convert_i + setslot 1 + getscopeobject 1 + getslot 1 + pushbyte 5 + ifne ofs0071 + ofs001f: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfFinally"),ProtectedNamespace("tests:TestIfFinally"),StaticProtectedNs("tests:TestIfFinally"),PrivateNamespace("TestIfFinally.as$0")]) + pushstring "in try body" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfFinally"),ProtectedNamespace("tests:TestIfFinally"),StaticProtectedNs("tests:TestIfFinally"),PrivateNamespace("TestIfFinally.as$0")]), 1 + ofs0026: + jump ofs0041 + ofs002a: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfFinally"),ProtectedNamespace("tests:TestIfFinally"),StaticProtectedNs("tests:TestIfFinally"),PrivateNamespace("TestIfFinally.as$0")]) + pushstring "in catch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfFinally"),ProtectedNamespace("tests:TestIfFinally"),StaticProtectedNs("tests:TestIfFinally"),PrivateNamespace("TestIfFinally.as$0")]), 1 + popscope + kill 2 + ofs0041: + pushbyte -1 + ofs0043: + jump ofs0062 + ofs0047: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + pushscope + popscope + kill 2 + coerce_a + setlocal3 + pushbyte 0 + jump ofs0062 + label + pop + ofs005d: + label + getlocal3 + kill 3 + throw + ofs0062: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfFinally"),ProtectedNamespace("tests:TestIfFinally"),StaticProtectedNs("tests:TestIfFinally"),PrivateNamespace("TestIfFinally.as$0")]) + pushstring "in finally" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfFinally"),ProtectedNamespace("tests:TestIfFinally"),StaticProtectedNs("tests:TestIfFinally"),PrivateNamespace("TestIfFinally.as$0")]), 1 + lookupswitch ofs0071, [ofs005d] + ofs0071: + returnvoid + end ; code + try from ofs001f to ofs0026 target ofs002a type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + try from ofs001f to ofs0043 target ofs0047 type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIfFinally",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIfFinally") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfInIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfInIf.as new file mode 100644 index 000000000..516d7dd15 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfInIf.as @@ -0,0 +1,146 @@ +package tests +{ + public class TestIfInIf + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIfInIf() + { + method + name "tests:TestIfInIf/TestIfInIf" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : int + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIfInIf/run" + returns QName(PackageNamespace(""),"int") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 5 + convert_i + setlocal1 + getlocal1 + pushbyte 5 + greaterthan + dup + iffalse ofs0019 + pop + getlocal1 + pushbyte 20 + lessthan + ofs0019: + iffalse ofs0032 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInIf"),ProtectedNamespace("tests:TestIfInIf"),StaticProtectedNs("tests:TestIfInIf"),PrivateNamespace("TestIfInIf.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInIf"),ProtectedNamespace("tests:TestIfInIf"),StaticProtectedNs("tests:TestIfInIf"),PrivateNamespace("TestIfInIf.as$0")]), 1 + getlocal1 + pushbyte 4 + ifnlt ofs002e + pushbyte 1 + returnvalue + ofs002e: + jump ofs0055 + ofs0032: + getlocal1 + pushbyte 4 + greaterthan + dup + iffalse ofs0040 + pop + getlocal1 + pushbyte 10 + lessthan + ofs0040: + iffalse ofs0055 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInIf"),ProtectedNamespace("tests:TestIfInIf"),StaticProtectedNs("tests:TestIfInIf"),PrivateNamespace("TestIfInIf.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInIf"),ProtectedNamespace("tests:TestIfInIf"),StaticProtectedNs("tests:TestIfInIf"),PrivateNamespace("TestIfInIf.as$0")]), 1 + getlocal1 + pushbyte 7 + ifnlt ofs0055 + pushbyte 2 + returnvalue + ofs0055: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInIf"),ProtectedNamespace("tests:TestIfInIf"),StaticProtectedNs("tests:TestIfInIf"),PrivateNamespace("TestIfInIf.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInIf"),ProtectedNamespace("tests:TestIfInIf"),StaticProtectedNs("tests:TestIfInIf"),PrivateNamespace("TestIfInIf.as$0")]), 1 + pushbyte 7 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIfInIf",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIfInIf") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfInsteadSwitch.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfInsteadSwitch.as new file mode 100644 index 000000000..590481c9a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfInsteadSwitch.as @@ -0,0 +1,117 @@ +package tests +{ + public class TestIfInsteadSwitch + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIfInsteadSwitch() + { + method + name "tests:TestIfInsteadSwitch/TestIfInsteadSwitch" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIfInsteadSwitch/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + convert_i + setlocal1 + getlocal1 + pushbyte 5 + ifngt ofs0020 + getlocal1 + pushbyte 0 + ifstrictne ofs0020 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInsteadSwitch"),ProtectedNamespace("tests:TestIfInsteadSwitch"),StaticProtectedNs("tests:TestIfInsteadSwitch"),PrivateNamespace("TestIfInsteadSwitch.as$0")]) + pushstring "X" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfInsteadSwitch"),ProtectedNamespace("tests:TestIfInsteadSwitch"),StaticProtectedNs("tests:TestIfInsteadSwitch"),PrivateNamespace("TestIfInsteadSwitch.as$0")]), 1 + ofs0020: + getlocal1 + pushbyte 1 + ifstrictne ofs002a + pushstring "A" + returnvalue + ofs002a: + pushstring "B" + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIfInsteadSwitch",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIfInsteadSwitch") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfTry.as new file mode 100644 index 000000000..ce401fb45 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIfTry.as @@ -0,0 +1,175 @@ +package tests +{ + public class TestIfTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIfTry() + { + method + name "tests:TestIfTry/TestIfTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIfTry/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"c") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"i") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 3 + type QName(PackageNamespace(""),"Boolean") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 0 + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + getscopeobject 1 + pushtrue + convert_b + setslot 3 + getscopeobject 1 + getslot 3 + iffalse ofs0052 + getscopeobject 1 + pushbyte 5 + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + jump ofs0046 + ofs0035: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfTry"),ProtectedNamespace("tests:TestIfTry"),StaticProtectedNs("tests:TestIfTry"),PrivateNamespace("TestIfTry.as$0")]) + pushstring "xx" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfTry"),ProtectedNamespace("tests:TestIfTry"),StaticProtectedNs("tests:TestIfTry"),PrivateNamespace("TestIfTry.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 2 + increment_i + setslot 2 + ofs0046: + getscopeobject 1 + getslot 2 + getscopeobject 1 + getslot 1 + iflt ofs0035 + ofs0052: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfTry"),ProtectedNamespace("tests:TestIfTry"),StaticProtectedNs("tests:TestIfTry"),PrivateNamespace("TestIfTry.as$0")]) + pushstring "in try" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfTry"),ProtectedNamespace("tests:TestIfTry"),StaticProtectedNs("tests:TestIfTry"),PrivateNamespace("TestIfTry.as$0")]), 1 + ofs0059: + jump ofs0074 + ofs005d: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfTry"),ProtectedNamespace("tests:TestIfTry"),StaticProtectedNs("tests:TestIfTry"),PrivateNamespace("TestIfTry.as$0")]) + pushstring "in catch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIfTry"),ProtectedNamespace("tests:TestIfTry"),StaticProtectedNs("tests:TestIfTry"),PrivateNamespace("TestIfTry.as$0")]), 1 + popscope + kill 2 + ofs0074: + returnvoid + end ; code + try from ofs0052 to ofs0059 target ofs005d type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIfTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIfTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIgnoreAndOr.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIgnoreAndOr.as new file mode 100644 index 000000000..9600e4237 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIgnoreAndOr.as @@ -0,0 +1,129 @@ +package tests +{ + public class TestIgnoreAndOr + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIgnoreAndOr() + { + method + name "tests:TestIgnoreAndOr/TestIgnoreAndOr" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIgnoreAndOr/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + convert_i + setlocal1 + getlocal1 + pushbyte 5 + ifngt ofs001c + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]), 1 + ofs001c: + getlocal1 + pushbyte 10 + ifngt ofs002a + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]), 1 + ofs002a: + getlocal1 + pushbyte 15 + ifngt ofs0038 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]), 1 + ofs0038: + getlocal1 + pushbyte 20 + ifngt ofs0046 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIgnoreAndOr"),ProtectedNamespace("tests:TestIgnoreAndOr"),StaticProtectedNs("tests:TestIgnoreAndOr"),PrivateNamespace("TestIgnoreAndOr.as$0")]), 1 + ofs0046: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIgnoreAndOr",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIgnoreAndOr") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as new file mode 100644 index 000000000..5bacc75ed --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as @@ -0,0 +1,145 @@ +package tests +{ + public class TestImplicitCoerce + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestImplicitCoerce() + { + method + name "tests:TestImplicitCoerce/TestImplicitCoerce" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestImplicitCoerce/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 5 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "j", 0, 13 + debug 1, "i", 1, 14 + debug 1, "r", 2, 15 + debug 1, "s", 3, 20 + pushbyte 2 + convert_i + setlocal1 + pushbyte 5 + convert_i + setlocal2 + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + coerce_a + setlocal3 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal1 + findpropstrict QName(PackageNamespace(""),"Number") + getlocal3 + pushbyte 1 + equals + callproperty QName(PackageNamespace(""),"Number"), 1 + bitand + callproperty QName(PackageNamespace(""),"Boolean"), 1 + dup + convert_b + iffalse ofs0043 + pop + findpropstrict QName(PackageNamespace(""),"Boolean") + pushbyte 5 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + ofs0043: + iffalse ofs004e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]) + pushstring "OK" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]), 1 + ofs004e: + pushstring "hello: " + getlocal3 + add + coerce_s + setlocal 4 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal 4 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0067 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]) + pushstring "F" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]), 1 + ofs0067: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestImplicitCoerce",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestImplicitCoerce") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImportedConst.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImportedConst.as new file mode 100644 index 000000000..b6dcecc52 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImportedConst.as @@ -0,0 +1,102 @@ +package tests +{ + import tests_classes.myconst; + + public class TestImportedConst + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestImportedConst() + { + method + name "tests:TestImportedConst/TestImportedConst" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestImportedConst/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImportedConst"),ProtectedNamespace("tests:TestImportedConst"),StaticProtectedNs("tests:TestImportedConst"),PrivateNamespace("TestImportedConst.as$0")]) + findproperty QName(PackageNamespace("tests_classes"),"myconst") + getproperty QName(PackageNamespace("tests_classes"),"myconst") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImportedConst"),ProtectedNamespace("tests:TestImportedConst"),StaticProtectedNs("tests:TestImportedConst"),PrivateNamespace("TestImportedConst.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestImportedConst",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestImportedConst") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImportedVar.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImportedVar.as new file mode 100644 index 000000000..93448ecb3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImportedVar.as @@ -0,0 +1,105 @@ +package tests +{ + import tests_classes.myvar; + + public class TestImportedVar + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestImportedVar() + { + method + name "tests:TestImportedVar/TestImportedVar" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestImportedVar/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImportedVar"),ProtectedNamespace("tests:TestImportedVar"),StaticProtectedNs("tests:TestImportedVar"),PrivateNamespace("TestImportedVar.as$0")]) + findproperty QName(PackageNamespace("tests_classes"),"myvar") + getproperty QName(PackageNamespace("tests_classes"),"myvar") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImportedVar"),ProtectedNamespace("tests:TestImportedVar"),StaticProtectedNs("tests:TestImportedVar"),PrivateNamespace("TestImportedVar.as$0")]), 1 + findproperty QName(PackageNamespace("tests_classes"),"myvar") + pushbyte 5 + setproperty QName(PackageNamespace("tests_classes"),"myvar") + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestImportedVar",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestImportedVar") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec1.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec1.as new file mode 100644 index 000000000..a56dab077 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec1.as @@ -0,0 +1,128 @@ +package tests +{ + public class TestIncDec1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec1() + { + method + name "tests:TestIncDec1/TestIncDec1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec1/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]) + pushstring "++a with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]) + getlocal1 + increment + dup + coerce_a + setlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]) + pushstring "--a with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]) + getlocal1 + decrement + dup + coerce_a + setlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]) + pushstring "++a no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]), 1 + inclocal 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]) + pushstring "--a no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec1"),ProtectedNamespace("tests:TestIncDec1"),StaticProtectedNs("tests:TestIncDec1"),PrivateNamespace("TestIncDec1.as$0")]), 1 + declocal 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec1",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec10.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec10.as new file mode 100644 index 000000000..de2396df1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec10.as @@ -0,0 +1,160 @@ +package tests +{ + public class TestIncDec10 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var attrib:int = 0; + + public function TestIncDec10() + { + method + name "tests:TestIncDec10/TestIncDec10" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec10/run" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]) + pushstring "attrib++ with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]) + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + dup + increment_i + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + kill 2 + kill 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]) + pushstring "attrib-- with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]) + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + dup + decrement_i + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + kill 2 + kill 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]) + pushstring "attrib++ no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]), 1 + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + increment_i + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + kill 2 + kill 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]) + pushstring "attrib-- no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec10"),ProtectedNamespace("tests:TestIncDec10"),StaticProtectedNs("tests:TestIncDec10"),PrivateNamespace("TestIncDec10.as$0")]), 1 + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + decrement_i + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec10"),"attrib") + kill 2 + kill 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec10",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec10") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec11.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec11.as new file mode 100644 index 000000000..ada034990 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec11.as @@ -0,0 +1,159 @@ +package tests +{ + public class TestIncDec11 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec11() + { + method + name "tests:TestIncDec11/TestIncDec11" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec11/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"f") + slotid 1 + type QName(PackageNamespace(""),"Function") + end ; trait + trait slot QName(PackageInternalNs("tests"),"slot") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]) + pushstring "++slot with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]) + getscopeobject 1 + getslot 2 + increment_i + dup + convert_i + getscopeobject 1 + swap + setslot 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]) + pushstring "--slot with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]) + getscopeobject 1 + getslot 2 + decrement_i + dup + convert_i + getscopeobject 1 + swap + setslot 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]) + pushstring "++slot no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 2 + increment_i + setslot 2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]) + pushstring "--slot no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec11"),ProtectedNamespace("tests:TestIncDec11"),StaticProtectedNs("tests:TestIncDec11"),PrivateNamespace("TestIncDec11.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 2 + decrement_i + setslot 2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec11",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec11") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec12.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec12.as new file mode 100644 index 000000000..84334a9b2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec12.as @@ -0,0 +1,159 @@ +package tests +{ + public class TestIncDec12 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec12() + { + method + name "tests:TestIncDec12/TestIncDec12" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec12/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"f") + slotid 1 + type QName(PackageNamespace(""),"Function") + end ; trait + trait slot QName(PackageInternalNs("tests"),"slot") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]) + pushstring "slot++ with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]) + getscopeobject 1 + getslot 2 + dup + increment_i + convert_i + getscopeobject 1 + swap + setslot 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]) + pushstring "slot-- with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]) + getscopeobject 1 + getslot 2 + dup + decrement_i + convert_i + getscopeobject 1 + swap + setslot 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]) + pushstring "slot++ no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 2 + increment_i + setslot 2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]) + pushstring "slot-- no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec12"),ProtectedNamespace("tests:TestIncDec12"),StaticProtectedNs("tests:TestIncDec12"),PrivateNamespace("TestIncDec12.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 2 + decrement_i + setslot 2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec12",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec12") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec13.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec13.as new file mode 100644 index 000000000..76531e93f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec13.as @@ -0,0 +1,215 @@ +package tests +{ + public class TestIncDec13 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec13() + { + method + name "tests:TestIncDec13/TestIncDec13" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec13/run" + returns null + + body + maxstack 5 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 1 + pushbyte 2 + pushbyte 3 + pushbyte 4 + pushbyte 5 + newarray 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + pushstring "++a[this.f()] with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec13"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + increment + dup + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + pushstring "--a[this.f()] with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec13"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + decrement + dup + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + pushstring "++a[this.f()] no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]), 1 + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec13"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + increment + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + kill 4 + kill 2 + kill 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + pushstring "--a[this.f()] no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]), 1 + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec13"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + decrement + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec13"),ProtectedNamespace("tests:TestIncDec13"),StaticProtectedNs("tests:TestIncDec13"),PrivateNamespace("TestIncDec13.as$0")]) + kill 4 + kill 2 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + + private function f() : int + { + trait method QName(PrivateNamespace("tests:TestIncDec13"),"f") + dispid 0 + method + name "tests:TestIncDec13/private/f" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 0 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec13",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec13") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec14.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec14.as new file mode 100644 index 000000000..f64f1ac99 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec14.as @@ -0,0 +1,217 @@ +package tests +{ + public class TestIncDec14 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec14() + { + method + name "tests:TestIncDec14/TestIncDec14" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec14/run" + returns null + + body + maxstack 5 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 1 + pushbyte 2 + pushbyte 3 + pushbyte 4 + pushbyte 5 + newarray 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + pushstring "a[this.f()]++ with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec14"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + convert_d + dup + increment + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + pushstring "a[this.f()]-- with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec14"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + convert_d + dup + decrement + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + pushstring "a[this.f()]++ no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]), 1 + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec14"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + increment + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + kill 4 + kill 2 + kill 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + pushstring "a[this.f()]-- no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]), 1 + getlocal1 + dup + setlocal2 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestIncDec14"),"f"), 0 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + decrement + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec14"),ProtectedNamespace("tests:TestIncDec14"),StaticProtectedNs("tests:TestIncDec14"),PrivateNamespace("TestIncDec14.as$0")]) + kill 4 + kill 2 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + + private function f() : int + { + trait method QName(PrivateNamespace("tests:TestIncDec14"),"f") + dispid 0 + method + name "tests:TestIncDec14/private/f" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 0 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec14",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec14") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec2.as new file mode 100644 index 000000000..923739f02 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec2.as @@ -0,0 +1,128 @@ +package tests +{ + public class TestIncDec2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec2() + { + method + name "tests:TestIncDec2/TestIncDec2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec2/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]) + pushstring "a++ with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]) + getlocal1 + dup + increment + coerce_a + setlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]) + pushstring "a-- with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]) + getlocal1 + dup + decrement + coerce_a + setlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]) + pushstring "a++ no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]), 1 + inclocal 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]) + pushstring "a-- no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec2"),ProtectedNamespace("tests:TestIncDec2"),StaticProtectedNs("tests:TestIncDec2"),PrivateNamespace("TestIncDec2.as$0")]), 1 + declocal 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec3.as new file mode 100644 index 000000000..27d72feb2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec3.as @@ -0,0 +1,187 @@ +package tests +{ + public class TestIncDec3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec3() + { + method + name "tests:TestIncDec3/TestIncDec3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec3/run" + returns null + + body + maxstack 5 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 1 + pushbyte 2 + pushbyte 3 + pushbyte 4 + pushbyte 5 + newarray 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + pushstring "++a[2] with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + increment + dup + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + pushstring "--a[2] with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + decrement + dup + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + pushstring "++a[2] no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]), 1 + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + increment + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + kill 4 + kill 2 + kill 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + pushstring "--a[2] no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]), 1 + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + decrement + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec3"),ProtectedNamespace("tests:TestIncDec3"),StaticProtectedNs("tests:TestIncDec3"),PrivateNamespace("TestIncDec3.as$0")]) + kill 4 + kill 2 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec3",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec3") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec4.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec4.as new file mode 100644 index 000000000..7e9fbfff3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec4.as @@ -0,0 +1,189 @@ +package tests +{ + public class TestIncDec4 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec4() + { + method + name "tests:TestIncDec4/TestIncDec4" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec4/run" + returns null + + body + maxstack 5 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 1 + pushbyte 2 + pushbyte 3 + pushbyte 4 + pushbyte 5 + newarray 5 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + pushstring "a[2]++ with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + convert_d + dup + increment + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + pushstring "a[2]-- with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + convert_d + dup + decrement + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + kill 4 + kill 2 + kill 3 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + pushstring "a[2]++ no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]), 1 + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + increment + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + kill 4 + kill 2 + kill 3 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + pushstring "a[2]-- no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]), 1 + getlocal1 + dup + setlocal2 + pushbyte 2 + dup + setlocal3 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + decrement + setlocal 4 + getlocal2 + getlocal3 + getlocal 4 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec4"),ProtectedNamespace("tests:TestIncDec4"),StaticProtectedNs("tests:TestIncDec4"),PrivateNamespace("TestIncDec4.as$0")]) + kill 4 + kill 2 + kill 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec4",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec4") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec5.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec5.as new file mode 100644 index 000000000..b15889806 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec5.as @@ -0,0 +1,217 @@ +package tests +{ + public class TestIncDec5 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec5() + { + method + name "tests:TestIncDec5/TestIncDec5" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec5/run" + returns null + + body + maxstack 4 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + findpropstrict QName(PrivateNamespace("TestIncDec5.as$0"),"TestClass1") + constructprop QName(PrivateNamespace("TestIncDec5.as$0"),"TestClass1"), 0 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + pushstring "++a.attrib with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + increment + dup + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + kill 3 + kill 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + pushstring "--a.attrib with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + decrement + dup + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + kill 3 + kill 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + pushstring "++a.attrib no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]), 1 + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + increment + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + kill 3 + kill 2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + pushstring "--a.attrib no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]), 1 + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + decrement + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec5"),ProtectedNamespace("tests:TestIncDec5"),StaticProtectedNs("tests:TestIncDec5"),PrivateNamespace("TestIncDec5.as$0")]) + kill 3 + kill 2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib:int = 5; + + public function TestClass1() + { + method + name "TestIncDec5.as$0:TestClass1/TestClass1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec5",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec5") + findpropstrict Multiname("TestClass1",[PrivateNamespace("TestIncDec5.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestIncDec5.as$0"),"TestClass1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec6.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec6.as new file mode 100644 index 000000000..70f230934 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec6.as @@ -0,0 +1,219 @@ +package tests +{ + public class TestIncDec6 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec6() + { + method + name "tests:TestIncDec6/TestIncDec6" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec6/run" + returns null + + body + maxstack 4 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + findpropstrict QName(PrivateNamespace("TestIncDec6.as$0"),"TestClass1") + constructprop QName(PrivateNamespace("TestIncDec6.as$0"),"TestClass1"), 0 + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + pushstring "a.attrib++ with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + convert_d + dup + increment + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + kill 3 + kill 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + pushstring "a.attrib-- with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + convert_d + dup + decrement + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + kill 3 + kill 2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + pushstring "a.attrib++ no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]), 1 + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + increment + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + kill 3 + kill 2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + pushstring "a.attrib-- no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]), 1 + getlocal1 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + decrement + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec6"),ProtectedNamespace("tests:TestIncDec6"),StaticProtectedNs("tests:TestIncDec6"),PrivateNamespace("TestIncDec6.as$0")]) + kill 3 + kill 2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib:int = 5; + + public function TestClass1() + { + method + name "TestIncDec6.as$0:TestClass1/TestClass1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec6",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec6") + findpropstrict Multiname("TestClass1",[PrivateNamespace("TestIncDec6.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestIncDec6.as$0"),"TestClass1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec7.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec7.as new file mode 100644 index 000000000..e8b62c15d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec7.as @@ -0,0 +1,133 @@ +package tests +{ + public class TestIncDec7 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec7() + { + method + name "tests:TestIncDec7/TestIncDec7" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec7/run" + returns null + + body + maxstack 5 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "index", 1, 14 + pushbyte 1 + pushbyte 2 + pushbyte 3 + pushbyte 4 + pushbyte 5 + newarray 5 + coerce_a + setlocal1 + pushbyte 0 + convert_i + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]) + pushstring "a[++index]" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]) + getlocal1 + getlocal2 + increment_i + dup + convert_i + setlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]) + pushstring "a[--index]" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]) + getlocal1 + getlocal2 + decrement_i + dup + convert_i + setlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec7"),ProtectedNamespace("tests:TestIncDec7"),StaticProtectedNs("tests:TestIncDec7"),PrivateNamespace("TestIncDec7.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec7",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec7") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec8.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec8.as new file mode 100644 index 000000000..5b1f95b13 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec8.as @@ -0,0 +1,133 @@ +package tests +{ + public class TestIncDec8 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestIncDec8() + { + method + name "tests:TestIncDec8/TestIncDec8" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec8/run" + returns null + + body + maxstack 5 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "index", 1, 14 + pushbyte 1 + pushbyte 2 + pushbyte 3 + pushbyte 4 + pushbyte 5 + newarray 5 + coerce_a + setlocal1 + pushbyte 0 + convert_i + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]) + pushstring "a[index++]" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]) + getlocal1 + getlocal2 + dup + increment_i + convert_i + setlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]) + pushstring "a[index--]" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]) + getlocal1 + getlocal2 + dup + decrement_i + convert_i + setlocal2 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec8"),ProtectedNamespace("tests:TestIncDec8"),StaticProtectedNs("tests:TestIncDec8"),PrivateNamespace("TestIncDec8.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec8",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec8") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec9.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec9.as new file mode 100644 index 000000000..f50e14f2a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestIncDec9.as @@ -0,0 +1,160 @@ +package tests +{ + public class TestIncDec9 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var attrib:int = 0; + + public function TestIncDec9() + { + method + name "tests:TestIncDec9/TestIncDec9" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestIncDec9/run" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]) + pushstring "++attrib with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]) + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + increment_i + dup + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + kill 2 + kill 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]) + pushstring "--attrib with result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]) + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + decrement_i + dup + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + kill 2 + kill 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]) + pushstring "++attrib no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]), 1 + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + increment_i + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + kill 2 + kill 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]) + pushstring "--attrib no result" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestIncDec9"),ProtectedNamespace("tests:TestIncDec9"),StaticProtectedNs("tests:TestIncDec9"),PrivateNamespace("TestIncDec9.as$0")]), 1 + getlocal0 + dup + setlocal1 + getproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + decrement_i + setlocal2 + getlocal1 + getlocal2 + setproperty QName(PrivateNamespace("tests:TestIncDec9"),"attrib") + kill 2 + kill 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestIncDec9",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestIncDec9") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInlineFunctions.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInlineFunctions.as new file mode 100644 index 000000000..95a9643c1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInlineFunctions.as @@ -0,0 +1,125 @@ +package tests +{ + public class TestInlineFunctions + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestInlineFunctions() + { + method + name "tests:TestInlineFunctions/TestInlineFunctions" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestInlineFunctions/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"first") + slotid 1 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"traceParameter") + slotid 2 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushnull + coerce_s + setslot 1 + getscopeobject 1 + pushstring "value1" + coerce_s + setslot 1 + getscopeobject 1 + newfunction 3 + coerce QName(PackageNamespace(""),"Function") + setslot 2 + findpropstrict Multiname("traceParameter",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInlineFunctions"),ProtectedNamespace("tests:TestInlineFunctions"),StaticProtectedNs("tests:TestInlineFunctions"),PrivateNamespace("TestInlineFunctions.as$0")]) + pushstring "hello" + callpropvoid Multiname("traceParameter",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInlineFunctions"),ProtectedNamespace("tests:TestInlineFunctions"),StaticProtectedNs("tests:TestInlineFunctions"),PrivateNamespace("TestInlineFunctions.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInlineFunctions",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestInlineFunctions") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInlineFunctions2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInlineFunctions2.as new file mode 100644 index 000000000..b98afb244 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInlineFunctions2.as @@ -0,0 +1,138 @@ +package tests +{ + public class TestInlineFunctions2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestInlineFunctions2() + { + method + name "tests:TestInlineFunctions2/TestInlineFunctions2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestInlineFunctions2/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 2 + initscopedepth 5 + maxscopedepth 8 + trait slot QName(PackageInternalNs("tests"),"f") + slotid 1 + type QName(PackageNamespace(""),"Function") + end ; trait + trait slot QName(PackageInternalNs("tests"),"g") + slotid 2 + type QName(PackageNamespace(""),"Function") + end ; trait + trait slot QName(PackageInternalNs("tests"),"h") + slotid 3 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 1 + getscopeobject 1 + newfunction 3 + coerce QName(PackageNamespace(""),"Function") + setslot 2 + getscopeobject 1 + newobject 0 + pushwith + newfunction 4 + dup + getscopeobject 2 + swap + setproperty QName(PackageNamespace("tests"),"h2") + popscope + coerce QName(PackageNamespace(""),"Function") + setslot 3 + newfunction 5 + getglobalscope + pushbyte 1 + call 1 + pop + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInlineFunctions2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestInlineFunctions2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerFunctionScope.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerFunctionScope.as new file mode 100644 index 000000000..66215d6c0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerFunctionScope.as @@ -0,0 +1,129 @@ +package tests +{ + public class TestInnerFunctionScope + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestInnerFunctionScope() + { + method + name "tests:TestInnerFunctionScope/TestInnerFunctionScope" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(a:String) : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestInnerFunctionScope/run" + flag NEED_ACTIVATION + param QName(PackageNamespace(""),"String") + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"innerFunc") + slotid 2 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "a", 0, 0 + debug 1, "+$activation", 1, 0 + newactivation + dup + setlocal2 + pushscope + getscopeobject 1 + getlocal1 + coerce_s + setslot 1 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 2 + findpropstrict Multiname("innerFunc",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerFunctionScope"),ProtectedNamespace("tests:TestInnerFunctionScope"),StaticProtectedNs("tests:TestInnerFunctionScope"),PrivateNamespace("TestInnerFunctionScope.as$0")]) + getscopeobject 1 + getslot 1 + callpropvoid Multiname("innerFunc",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerFunctionScope"),ProtectedNamespace("tests:TestInnerFunctionScope"),StaticProtectedNs("tests:TestInnerFunctionScope"),PrivateNamespace("TestInnerFunctionScope.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + var testProm:int = 5; + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInnerFunctionScope",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestInnerFunctionScope") + findproperty QName(PrivateNamespace("TestInnerFunctionScope.as$0"),"testProm") + pushbyte 5 + setproperty QName(PrivateNamespace("TestInnerFunctionScope.as$0"),"testProm") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerFunctions.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerFunctions.as new file mode 100644 index 000000000..4ca362250 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerFunctions.as @@ -0,0 +1,146 @@ +package tests +{ + public class TestInnerFunctions + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestInnerFunctions() + { + method + name "tests:TestInnerFunctions/TestInnerFunctions" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(a:String) : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestInnerFunctions/run" + flag NEED_ACTIVATION + param QName(PackageNamespace(""),"String") + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"s") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"innerFunc") + slotid 3 + type QName(PackageNamespace(""),"Function") + end ; trait + trait slot QName(PackageInternalNs("tests"),"k") + slotid 4 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "a", 0, 0 + debug 1, "+$activation", 1, 0 + newactivation + dup + setlocal2 + pushscope + getscopeobject 1 + getlocal1 + coerce_s + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 3 + getscopeobject 1 + pushbyte 5 + setslot 4 + getscopeobject 1 + getslot 4 + pushbyte 6 + ifne ofs003a + getscopeobject 1 + pushbyte 8 + setslot 2 + ofs003a: + findpropstrict Multiname("innerFunc",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerFunctions"),ProtectedNamespace("tests:TestInnerFunctions"),StaticProtectedNs("tests:TestInnerFunctions"),PrivateNamespace("TestInnerFunctions.as$0")]) + getscopeobject 1 + getslot 1 + callpropvoid Multiname("innerFunc",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerFunctions"),ProtectedNamespace("tests:TestInnerFunctions"),StaticProtectedNs("tests:TestInnerFunctions"),PrivateNamespace("TestInnerFunctions.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInnerFunctions",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestInnerFunctions") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerIf.as new file mode 100644 index 000000000..9e9723c32 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerIf.as @@ -0,0 +1,136 @@ +package tests +{ + public class TestInnerIf + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestInnerIf() + { + method + name "tests:TestInnerIf/TestInnerIf" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestInnerIf/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + pushbyte 5 + coerce_a + setlocal1 + pushbyte 4 + coerce_a + setlocal2 + getlocal1 + pushbyte 5 + ifne ofs0038 + getlocal2 + pushbyte 6 + ifne ofs002d + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]) + pushstring "b==6" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]), 1 + jump ofs0034 + ofs002d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]) + pushstring "b!=6" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]), 1 + ofs0034: + jump ofs0051 + ofs0038: + getlocal2 + pushbyte 7 + ifne ofs004a + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]) + pushstring "b==7" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]), 1 + jump ofs0051 + ofs004a: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]) + pushstring "b!=7" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]), 1 + ofs0051: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]) + pushstring "end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerIf"),ProtectedNamespace("tests:TestInnerIf"),StaticProtectedNs("tests:TestInnerIf"),PrivateNamespace("TestInnerIf.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInnerIf",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestInnerIf") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerTry.as new file mode 100644 index 000000000..6c9215bb8 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestInnerTry.as @@ -0,0 +1,183 @@ +package tests +{ + public class TestInnerTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestInnerTry() + { + method + name "tests:TestInnerTry/TestInnerTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestInnerTry/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 4 + initscopedepth 5 + maxscopedepth 14 + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + ofs000b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]) + pushstring "try body 1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]), 1 + ofs0012: + jump ofs002d + ofs0016: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]) + pushstring "catched DefinitionError" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]), 1 + popscope + kill 2 + ofs002d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]) + pushstring "after try 1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]), 1 + ofs0034: + jump ofs004f + ofs0038: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]) + pushstring "catched Error" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]), 1 + popscope + kill 2 + ofs004f: + pushbyte -1 + ofs0051: + jump ofs0070 + ofs0055: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 2 + dup + setlocal2 + pushscope + popscope + kill 2 + coerce_a + setlocal3 + pushbyte 0 + jump ofs0070 + label + pop + ofs006b: + label + getlocal3 + kill 3 + throw + ofs0070: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]) + pushstring "finally block" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestInnerTry"),ProtectedNamespace("tests:TestInnerTry"),StaticProtectedNs("tests:TestInnerTry"),PrivateNamespace("TestInnerTry.as$0")]), 1 + lookupswitch ofs007f, [ofs006b] + ofs007f: + returnvoid + end ; code + try from ofs000b to ofs0012 target ofs0016 type QName(PackageNamespace(""),"DefinitionError") name QName(PackageNamespace(""),"e") end + try from ofs000b to ofs0034 target ofs0038 type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + try from ofs000b to ofs0051 target ofs0055 type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInnerTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestInnerTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestLogicalComputing.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestLogicalComputing.as new file mode 100644 index 000000000..90548263f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestLogicalComputing.as @@ -0,0 +1,137 @@ +package tests +{ + public class TestLogicalComputing + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestLogicalComputing() + { + method + name "tests:TestLogicalComputing/TestLogicalComputing" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestLogicalComputing/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "b", 0, 13 + debug 1, "i", 1, 14 + debug 1, "j", 2, 15 + pushfalse + convert_b + setlocal1 + pushbyte 5 + coerce_a + setlocal2 + pushbyte 7 + coerce_a + setlocal3 + getlocal2 + getlocal3 + ifngt ofs0029 + pushbyte 9 + coerce_a + setlocal3 + pushtrue + convert_b + setlocal1 + ofs0029: + getlocal2 + pushbyte 0 + equals + dup + iftrue ofs0037 + pop + getlocal2 + pushbyte 1 + equals + ofs0037: + dup + iffalse ofs0041 + pop + getlocal3 + pushbyte 0 + equals + ofs0041: + convert_b + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestLogicalComputing",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestLogicalComputing") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestLoopInLoop.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestLoopInLoop.as new file mode 100644 index 000000000..623a710f1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestLoopInLoop.as @@ -0,0 +1,166 @@ +package tests +{ + public class TestLoopInLoop + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestLoopInLoop() + { + method + name "tests:TestLoopInLoop/TestLoopInLoop" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestLoopInLoop/run" + returns null + + body + maxstack 2 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + debug 1, "a", 1, 14 + debug 1, "b", 2, 15 + debug 1, "c", 3, 16 + pushbyte 0 + convert_i + setlocal1 + pushtrue + convert_b + setlocal2 + pushtrue + convert_b + setlocal3 + pushtrue + convert_b + setlocal 4 + jump ofs008d + ofs0028: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]), 1 + pushbyte 0 + convert_i + setlocal1 + jump ofs007d + ofs0038: + label + getlocal2 + not + iffalse ofs007b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]), 1 + getlocal 4 + iffalse ofs0057 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]), 1 + jump ofs006e + ofs0057: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]), 1 + getlocal3 + iffalse ofs0067 + jump ofs007b + ofs0067: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]) + pushstring "H" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]), 1 + ofs006e: + getlocal 4 + iffalse ofs007b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]) + pushstring "L" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestLoopInLoop"),ProtectedNamespace("tests:TestLoopInLoop"),StaticProtectedNs("tests:TestLoopInLoop"),PrivateNamespace("TestLoopInLoop.as$0")]), 1 + ofs007b: + inclocal_i 1 + ofs007d: + getlocal1 + pushbyte 10 + iflt ofs0038 + getlocal2 + iffalse ofs008d + jump ofs0092 + ofs008d: + pushtrue + iftrue ofs0028 + ofs0092: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestLoopInLoop",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestLoopInLoop") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as new file mode 100644 index 000000000..292f7bdc6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as @@ -0,0 +1,105 @@ +package tests +{ + public class TestManualConvert + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestManualConvert() + { + method + name "tests:TestManualConvert/TestManualConvert" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestManualConvert/run" + returns null + + body + maxstack 3 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]) + pushstring "String(this).length" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]) + findpropstrict QName(PackageNamespace(""),"String") + getlocal0 + callproperty QName(PackageNamespace(""),"String"), 1 + getproperty Multiname("length",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestManualConvert",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestManualConvert") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMetadata.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMetadata.as new file mode 100644 index 000000000..10748a833 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMetadata.as @@ -0,0 +1,111 @@ +package tests +{ + [MyClassTag(cls2="class 2",cls1="class 1")] + public class TestMetadata + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + [MyVarTag(var2="var 2",var1="var 1")] + public var v:int = 5; + + [MyConstTag] + public const C:int = 10; + + public function TestMetadata() + { + method + name "tests:TestMetadata/TestMetadata" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + [MySingleTag("tag")] + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + flag METADATA + metadata "MySingleTag" + item "" "tag" + end ; metadata + dispid 0 + method + name "tests:TestMetadata/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestMetadata"),ProtectedNamespace("tests:TestMetadata"),StaticProtectedNs("tests:TestMetadata"),PrivateNamespace("TestMetadata.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestMetadata"),ProtectedNamespace("tests:TestMetadata"),StaticProtectedNs("tests:TestMetadata"),PrivateNamespace("TestMetadata.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestMetadata",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestMetadata") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMissingDefault.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMissingDefault.as new file mode 100644 index 000000000..c02ecef8b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMissingDefault.as @@ -0,0 +1,140 @@ +package tests +{ + public class TestMissingDefault + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestMissingDefault() + { + method + name "tests:TestMissingDefault/TestMissingDefault" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestMissingDefault/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "jj", 0, 13 + pushbyte 1 + convert_i + setlocal1 + jump ofs002b + ofs000f: + label + pushbyte 1 + convert_i + setlocal1 + jump ofs0056 + ofs0018: + label + pushbyte 2 + convert_i + setlocal1 + jump ofs0056 + ofs0021: + label + pushbyte 3 + convert_i + setlocal1 + label + jump ofs0056 + ofs002b: + getlocal1 + setlocal2 + pushbyte 1 + getlocal2 + ifstrictne ofs003a + pushbyte 0 + jump ofs0049 + ofs003a: + pushbyte 2 + getlocal2 + ifstrictne ofs0047 + pushbyte 1 + jump ofs0049 + ofs0047: + pushbyte -1 + ofs0049: + kill 2 + lookupswitch ofs0021, [ofs000f, ofs0018] + ofs0056: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestMissingDefault",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestMissingDefault") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMultipleCondition.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMultipleCondition.as new file mode 100644 index 000000000..03108c93b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestMultipleCondition.as @@ -0,0 +1,135 @@ +package tests +{ + public class TestMultipleCondition + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestMultipleCondition() + { + method + name "tests:TestMultipleCondition/TestMultipleCondition" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestMultipleCondition/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + pushbyte 5 + coerce_a + setlocal1 + pushbyte 8 + coerce_a + setlocal2 + pushbyte 9 + coerce_a + setlocal3 + getlocal1 + pushbyte 4 + lessequals + dup + iftrue ofs002b + pop + getlocal2 + pushbyte 8 + lessequals + ofs002b: + dup + iffalse ofs0035 + pop + getlocal3 + pushbyte 7 + equals + ofs0035: + iffalse ofs0044 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestMultipleCondition"),ProtectedNamespace("tests:TestMultipleCondition"),StaticProtectedNs("tests:TestMultipleCondition"),PrivateNamespace("TestMultipleCondition.as$0")]) + pushstring "onTrue" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestMultipleCondition"),ProtectedNamespace("tests:TestMultipleCondition"),StaticProtectedNs("tests:TestMultipleCondition"),PrivateNamespace("TestMultipleCondition.as$0")]), 1 + jump ofs004b + ofs0044: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestMultipleCondition"),ProtectedNamespace("tests:TestMultipleCondition"),StaticProtectedNs("tests:TestMultipleCondition"),PrivateNamespace("TestMultipleCondition.as$0")]) + pushstring "onFalse" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestMultipleCondition"),ProtectedNamespace("tests:TestMultipleCondition"),StaticProtectedNs("tests:TestMultipleCondition"),PrivateNamespace("TestMultipleCondition.as$0")]), 1 + ofs004b: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestMultipleCondition",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestMultipleCondition") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNamedAnonFunctions.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNamedAnonFunctions.as new file mode 100644 index 000000000..5a24f0f4c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNamedAnonFunctions.as @@ -0,0 +1,171 @@ +package tests +{ + public class TestNamedAnonFunctions + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestNamedAnonFunctions() + { + method + name "tests:TestNamedAnonFunctions/TestNamedAnonFunctions" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestNamedAnonFunctions/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 2 + initscopedepth 5 + maxscopedepth 8 + trait slot QName(PackageInternalNs("tests"),"test") + slotid 1 + type null + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + newobject 0 + pushwith + newfunction 2 + dup + getscopeobject 2 + swap + setproperty QName(PackageNamespace("tests"),"testFunc") + popscope + coerce_a + setslot 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib1:int; + + public function TestClass2() + { + method + name "TestNamedAnonFunctions.as$0:TestClass2/TestClass2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestNamedAnonFunctions",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestNamedAnonFunctions") + findpropstrict Multiname("TestClass2",[PrivateNamespace("TestNamedAnonFunctions.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestNamedAnonFunctions.as$0"),"TestClass2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as new file mode 100644 index 000000000..1e1a29811 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as @@ -0,0 +1,273 @@ +package tests +{ + import tests_other.myInternal; + import tests_other.myInternal2; + + use namespace myInternal; + use namespace myInternal2; + + public class TestNames + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + myInternal var neco:int; + + myInternal2 var neco:int; + + internal var nic:int; + + public function TestNames() + { + method + name "tests:TestNames/TestNames" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestNames/run" + returns null + + body + maxstack 4 + localcount 8 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "ns", 0, 25 + debug 1, "name", 1, 26 + debug 1, "a", 2, 27 + debug 1, "b", 3, 28 + debug 1, "c", 4, 30 + debug 1, "d", 5, 31 + getlocal0 + callproperty QName(PackageNamespace(""),"getNamespace"), 0 + coerce_a + setlocal1 + getlocal0 + callproperty QName(PackageNamespace(""),"getName"), 0 + coerce_a + setlocal2 + getlocal1 + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict RTQName("unnamespacedFunc") + dup + setlocal 7 + getlocal1 + coerce QName(PackageNamespace(""),"Namespace") + getproperty RTQName("unnamespacedFunc") + getlocal 7 + call 0 + kill 7 + coerce_a + setlocal3 + getlocal1 + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict QName(PackageNamespace(""),"String") + getlocal2 + callproperty QName(PackageNamespace(""),"String"), 1 + convert_s + findpropstrict RTQNameL() + getlocal1 + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict QName(PackageNamespace(""),"String") + getlocal2 + callproperty QName(PackageNamespace(""),"String"), 1 + convert_s + getproperty RTQNameL() + coerce_a + setlocal 4 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]) + getlocal 4 + getproperty Multiname("c",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]), 1 + findproperty QName(PackageNamespace("tests_other"),"myInternal") + getproperty QName(PackageNamespace("tests_other"),"myInternal") + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict RTQName("neco") + findproperty QName(PackageNamespace("tests_other"),"myInternal") + getproperty QName(PackageNamespace("tests_other"),"myInternal") + coerce QName(PackageNamespace(""),"Namespace") + getproperty RTQName("neco") + coerce_a + setlocal 5 + getlocal0 + findproperty QName(PackageNamespace("tests_other"),"myInternal2") + getproperty QName(PackageNamespace("tests_other"),"myInternal2") + coerce QName(PackageNamespace(""),"Namespace") + getproperty RTQName("neco") + coerce_a + setlocal 6 + returnvoid + end ; code + end ; body + end ; method + } + + public function getNamespace() : Namespace + { + trait method QName(PackageNamespace(""),"getNamespace") + dispid 0 + method + name "tests:TestNames/getNamespace" + returns QName(PackageNamespace(""),"Namespace") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace("tests_other"),"myInternal") + getproperty QName(PackageNamespace("tests_other"),"myInternal") + returnvalue + end ; code + end ; body + end ; method + } + + public function getName() : String + { + trait method QName(PackageNamespace(""),"getName") + dispid 0 + method + name "tests:TestNames/getName" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "unnamespacedFunc" + returnvalue + end ; code + end ; body + end ; method + } + + myInternal function namespacedFunc() : void + { + trait method QName(Namespace("http://www.adobe.com/2006/actionscript/examples"),"namespacedFunc") + dispid 0 + method + name "tests:TestNamesmyInternal/namespacedFunc" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + + myInternal2 function namespacedFunc2() : void + { + trait method QName(PackageInternalNs("tests_other:myInternal2"),"namespacedFunc2") + dispid 0 + method + name "tests:TestNamesmyInternal2/namespacedFunc2" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames"),ProtectedNamespace("tests:TestNames"),StaticProtectedNs("tests:TestNames"),PrivateNamespace("TestNames.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestNames",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestNames") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames2.as new file mode 100644 index 000000000..6c622f8c5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames2.as @@ -0,0 +1,157 @@ +package tests +{ + public class TestNames2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var i:int = 0; + + public function TestNames2() + { + method + name "tests:TestNames2/TestNames2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestNames2/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "j", 0, 15 + debug 1, "g", 1, 16 + pushbyte 0 + convert_i + setlocal1 + pushnull + coerce QName(PackageNamespace(""),"Function") + setlocal2 + getlocal0 + pushbyte 0 + setproperty QName(PackageNamespace(""),"i") + getlocal0 + pushbyte 1 + setproperty QName(PackageNamespace(""),"i") + pushbyte 2 + convert_i + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames2"),ProtectedNamespace("tests:TestNames2"),StaticProtectedNs("tests:TestNames2"),PrivateNamespace("TestNames2.as$0")]) + getlocal0 + getproperty QName(PackageNamespace(""),"i") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames2"),ProtectedNamespace("tests:TestNames2"),StaticProtectedNs("tests:TestNames2"),PrivateNamespace("TestNames2.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames2"),ProtectedNamespace("tests:TestNames2"),StaticProtectedNs("tests:TestNames2"),PrivateNamespace("TestNames2.as$0")]) + getlocal0 + getproperty QName(PackageNamespace(""),"i") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames2"),ProtectedNamespace("tests:TestNames2"),StaticProtectedNs("tests:TestNames2"),PrivateNamespace("TestNames2.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames2"),ProtectedNamespace("tests:TestNames2"),StaticProtectedNs("tests:TestNames2"),PrivateNamespace("TestNames2.as$0")]) + getlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestNames2"),ProtectedNamespace("tests:TestNames2"),StaticProtectedNs("tests:TestNames2"),PrivateNamespace("TestNames2.as$0")]), 1 + getlocal0 + callpropvoid QName(PackageNamespace(""),"f"), 0 + getlocal0 + callpropvoid QName(PackageNamespace(""),"f"), 0 + getlocal2 + getglobalscope + call 0 + pop + returnvoid + end ; code + end ; body + end ; method + } + + public function f() : void + { + trait method QName(PackageNamespace(""),"f") + dispid 0 + method + name "tests:TestNames2/f" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestNames2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestNames2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNegate.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNegate.as new file mode 100644 index 000000000..752710b04 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNegate.as @@ -0,0 +1,105 @@ +package tests +{ + public class TestNegate + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestNegate() + { + method + name "tests:TestNegate/TestNegate" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestNegate/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + pushbyte 5 + convert_i + setlocal1 + getlocal1 + bitnot + convert_i + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestNegate",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestNegate") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNumberCall.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNumberCall.as new file mode 100644 index 000000000..eb5315394 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNumberCall.as @@ -0,0 +1,106 @@ +package tests +{ + public class TestNumberCall + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestNumberCall() + { + method + name "tests:TestNumberCall/TestNumberCall" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestNumberCall/run" + returns null + + body + maxstack 1 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + pushbyte 5 + callproperty QName(Namespace("http://adobe.com/AS3/2006/builtin"),"toString"), 0 + coerce_s + setlocal1 + pushdouble 5.2 + callproperty QName(Namespace("http://adobe.com/AS3/2006/builtin"),"toString"), 0 + coerce_s + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestNumberCall",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestNumberCall") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOperations.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOperations.as new file mode 100644 index 000000000..3b7ca8b00 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOperations.as @@ -0,0 +1,517 @@ +package tests +{ + import flash.utils.Dictionary; + + public class TestOperations + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestOperations() + { + method + name "tests:TestOperations/TestOperations" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestOperations/run" + returns null + + body + maxstack 4 + localcount 17 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "cr", 0, 15 + debug 1, "br", 1, 16 + debug 1, "r", 2, 17 + debug 1, "v", 3, 18 + debug 1, "xlr", 4, 19 + debug 1, "sr", 5, 20 + debug 1, "c", 6, 21 + debug 1, "d", 7, 22 + debug 1, "n1", 8, 23 + debug 1, "n2", 9, 24 + debug 1, "b1", 10, 25 + debug 1, "b2", 11, 26 + debug 1, "x", 12, 34 + debug 1, "o", 13, 38 + debug 1, "s1", 14, 39 + debug 1, "s2", 15, 40 + pushnull + coerce QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + setlocal1 + pushfalse + convert_b + setlocal2 + getlex Multiname("NaN",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOperations"),ProtectedNamespace("tests:TestOperations"),StaticProtectedNs("tests:TestOperations"),PrivateNamespace("TestOperations.as$0")]) + convert_d + setlocal3 + pushundefined + coerce_a + setlocal 4 + pushnull + coerce QName(PackageNamespace(""),"XMLList") + setlocal 5 + pushnull + coerce_s + setlocal 6 + findpropstrict QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + constructprop QName(PrivateNamespace("TestOperations.as$0"),"MyClass"), 0 + coerce QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + setlocal 7 + findpropstrict QName(PackageNamespace("flash.utils"),"Dictionary") + constructprop QName(PackageNamespace("flash.utils"),"Dictionary"), 0 + coerce QName(PackageNamespace("flash.utils"),"Dictionary") + setlocal 8 + pushbyte 2 + convert_d + setlocal 9 + pushbyte 3 + convert_d + setlocal 10 + pushtrue + convert_b + setlocal 11 + pushfalse + convert_b + setlocal 12 + getlex QName(PackageNamespace(""),"XML") + pushstring "\r\n \t\t\tone\r\n \t\t\t\t \r\n \t\t\t\t\ttwo \r\n \t\t\t\t \r\n \t\t\t\r\n \t\t\tthree\r\n \t\t" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal 13 + pushstring "a" + pushbyte 1 + pushstring "b" + pushbyte 2 + newobject 2 + coerce QName(PackageNamespace(""),"Object") + setlocal 14 + pushstring "hello" + coerce_s + setlocal 15 + pushstring "there" + coerce_s + setlocal 16 + getlocal 9 + negate + convert_d + setlocal3 + getlocal 9 + bitnot + convert_d + setlocal3 + getlocal 11 + not + convert_b + setlocal2 + getlocal 9 + increment + dup + convert_d + setlocal 9 + convert_d + setlocal3 + getlocal 9 + dup + increment + convert_d + setlocal 9 + convert_d + setlocal3 + getlocal 7 + getlex QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + astypelate + coerce QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + setlocal1 + pushstring "hello" + getlocal 8 + in + convert_b + setlocal2 + getlocal 11 + iffalse ofs00ec + getlocal 9 + jump ofs00ee + ofs00ec: + getlocal 10 + ofs00ee: + convert_d + setlocal3 + getlocal 9 + getlocal 10 + lshift + convert_d + setlocal3 + getlocal 9 + getlocal 10 + rshift + convert_d + setlocal3 + getlocal 9 + getlocal 10 + urshift + convert_d + setlocal3 + getlocal 9 + getlocal 10 + bitand + convert_d + setlocal3 + getlocal 9 + getlocal 10 + bitor + convert_d + setlocal3 + getlocal 9 + getlocal 10 + divide + convert_d + setlocal3 + getlocal 9 + getlocal 10 + modulo + convert_d + setlocal3 + getlocal 9 + getlocal 10 + equals + convert_b + setlocal2 + getlocal 9 + getlocal 10 + strictequals + convert_b + setlocal2 + getlocal 9 + getlocal 10 + equals + not + convert_b + setlocal2 + getlocal 9 + getlocal 10 + strictequals + not + convert_b + setlocal2 + getlocal 9 + getlocal 10 + lessthan + convert_b + setlocal2 + getlocal 9 + getlocal 10 + lessequals + convert_b + setlocal2 + getlocal 9 + getlocal 10 + greaterthan + convert_b + setlocal2 + getlocal 9 + getlocal 10 + greaterequals + convert_b + setlocal2 + getlocal 11 + dup + iffalse ofs0165 + pop + getlocal 12 + ofs0165: + convert_b + setlocal2 + getlocal 11 + dup + iftrue ofs0171 + pop + getlocal 12 + ofs0171: + convert_b + setlocal2 + getlocal 9 + getlocal 10 + subtract + convert_d + setlocal3 + getlocal 9 + getlocal 10 + multiply + convert_d + setlocal3 + getlocal 9 + getlocal 10 + add + convert_d + setlocal3 + getlocal 9 + getlocal 10 + bitxor + convert_d + setlocal3 + getlocal 7 + getlex QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + instanceof + convert_b + setlocal2 + getlocal 7 + getlex QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + istypelate + convert_b + setlocal2 + getlocal 13 + getdescendants Multiname("b",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOperations"),ProtectedNamespace("tests:TestOperations"),StaticProtectedNs("tests:TestOperations"),PrivateNamespace("TestOperations.as$0")]) + coerce QName(PackageNamespace(""),"XMLList") + setlocal 5 + getlocal 15 + getlocal 16 + add + coerce_s + setlocal 6 + getlocal3 + getlocal 9 + bitand + convert_d + setlocal3 + getlocal3 + getlocal 9 + bitor + convert_d + setlocal3 + getlocal3 + getlocal 9 + divide + convert_d + setlocal3 + getlocal3 + getlocal 9 + subtract + convert_d + setlocal3 + getlocal3 + getlocal 9 + modulo + convert_d + setlocal3 + getlocal3 + getlocal 9 + multiply + convert_d + setlocal3 + getlocal3 + getlocal 9 + add + convert_d + setlocal3 + getlocal3 + getlocal 9 + lshift + convert_d + setlocal3 + getlocal3 + getlocal 9 + rshift + convert_d + setlocal3 + getlocal3 + getlocal 9 + urshift + convert_d + setlocal3 + getlocal3 + getlocal 9 + bitxor + convert_d + setlocal3 + getlocal2 + dup + iffalse ofs01f8 + pop + getlocal 11 + ofs01f8: + convert_b + setlocal2 + getlocal2 + dup + iftrue ofs0203 + pop + getlocal 11 + ofs0203: + convert_b + setlocal2 + getlocal 6 + getlocal 15 + add + coerce_s + setlocal 6 + getlocal 14 + deleteproperty Multiname("a",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOperations"),ProtectedNamespace("tests:TestOperations"),StaticProtectedNs("tests:TestOperations"),PrivateNamespace("TestOperations.as$0")]) + pop + pushstring "test" + getlocal0 + callproperty QName(PackageNamespace(""),"f"), 0 + add + pop + pushundefined + coerce_a + setlocal 4 + getlocal 7 + typeof + coerce_s + setlocal 6 + returnvoid + end ; code + end ; body + end ; method + } + + public function f() : int + { + trait method QName(PackageNamespace(""),"f") + dispid 0 + method + name "tests:TestOperations/f" + returns QName(PackageNamespace(""),"int") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOperations"),ProtectedNamespace("tests:TestOperations"),StaticProtectedNs("tests:TestOperations"),PrivateNamespace("TestOperations.as$0")]) + pushstring "f" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOperations"),ProtectedNamespace("tests:TestOperations"),StaticProtectedNs("tests:TestOperations"),PrivateNamespace("TestOperations.as$0")]), 1 + pushbyte 5 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + class MyClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function MyClass() + { + method + name "TestOperations.as$0:MyClass/MyClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestOperations",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestOperations") + findpropstrict Multiname("MyClass",[PrivateNamespace("TestOperations.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestOperations.as$0"),"MyClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimization.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimization.as new file mode 100644 index 000000000..de919cd71 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimization.as @@ -0,0 +1,140 @@ +package tests +{ + public class TestOptimization + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestOptimization() + { + method + name "tests:TestOptimization/TestOptimization" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestOptimization/run" + returns null + + body + maxstack 2 + localcount 10 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "f", 0, 13 + debug 1, "g", 1, 14 + debug 1, "h", 2, 15 + debug 1, "a", 3, 16 + debug 1, "b", 4, 17 + debug 1, "c", 5, 18 + debug 1, "d", 6, 19 + debug 1, "e", 7, 20 + debug 1, "i", 8, 21 + pushbyte 0 + convert_i + setlocal1 + pushbyte 0 + convert_i + setlocal2 + pushbyte 0 + convert_i + setlocal3 + pushbyte 1 + convert_i + setlocal 4 + pushbyte 2 + convert_i + setlocal 5 + pushbyte 3 + convert_i + setlocal 6 + pushbyte 4 + convert_i + setlocal 7 + getlocal 7 + pushbyte 5 + add + convert_i + setlocal 8 + getlocal1 + convert_i + dup + setlocal2 + convert_i + dup + setlocal3 + convert_i + setlocal 9 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestOptimization",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestOptimization") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimizationAndOr.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimizationAndOr.as new file mode 100644 index 000000000..377798f26 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimizationAndOr.as @@ -0,0 +1,138 @@ +package tests +{ + import flash.utils.getDefinitionByName; + + public class TestOptimizationAndOr + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestOptimizationAndOr() + { + method + name "tests:TestOptimizationAndOr/TestOptimizationAndOr" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestOptimizationAndOr/run" + returns null + + body + maxstack 6 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "plugin", 0, 15 + debug 1, "o", 1, 20 + debug 1, "a", 2, 21 + pushnull + coerce QName(PackageNamespace(""),"Object") + setlocal1 + pushstring "a" + pushstring "Object" + pushstring "b" + pushstring "Object" + pushstring "c" + pushstring "Object" + newobject 3 + coerce QName(PackageNamespace(""),"Object") + setlocal2 + pushstring "d" + coerce_s + setlocal3 + getlocal3 + getlocal2 + in + dup + iffalse ofs0044 + pop + getlocal2 + getlocal3 + constructprop MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationAndOr"),ProtectedNamespace("tests:TestOptimizationAndOr"),StaticProtectedNs("tests:TestOptimizationAndOr"),PrivateNamespace("TestOptimizationAndOr.as$0")]), 0 + coerce QName(PackageNamespace(""),"Object") + dup + setlocal1 + callproperty Multiname("toString",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationAndOr"),ProtectedNamespace("tests:TestOptimizationAndOr"),StaticProtectedNs("tests:TestOptimizationAndOr"),PrivateNamespace("TestOptimizationAndOr.as$0")]), 0 + getproperty Multiname("length",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationAndOr"),ProtectedNamespace("tests:TestOptimizationAndOr"),StaticProtectedNs("tests:TestOptimizationAndOr"),PrivateNamespace("TestOptimizationAndOr.as$0")]) + pushbyte 2 + greaterthan + ofs0044: + iffalse ofs004f + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationAndOr"),ProtectedNamespace("tests:TestOptimizationAndOr"),StaticProtectedNs("tests:TestOptimizationAndOr"),PrivateNamespace("TestOptimizationAndOr.as$0")]) + pushstring "okay" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationAndOr"),ProtectedNamespace("tests:TestOptimizationAndOr"),StaticProtectedNs("tests:TestOptimizationAndOr"),PrivateNamespace("TestOptimizationAndOr.as$0")]), 1 + ofs004f: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestOptimizationAndOr",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestOptimizationAndOr") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimizationWhile.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimizationWhile.as new file mode 100644 index 000000000..52d8bac48 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptimizationWhile.as @@ -0,0 +1,136 @@ +package tests +{ + public class TestOptimizationWhile + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestOptimizationWhile() + { + method + name "tests:TestOptimizationWhile/TestOptimizationWhile" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestOptimizationWhile/run" + returns null + + body + maxstack 3 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + debug 1, "d", 3, 16 + pushbyte 1 + convert_i + setlocal1 + pushbyte 2 + convert_i + setlocal2 + pushbyte 3 + convert_i + setlocal3 + pushbyte 4 + convert_i + setlocal 4 + jump ofs0051 + ofs002b: + label + getlex QName(PackageNamespace(""),"Math") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 10 + multiply + callproperty QName(PackageNamespace(""),"round"), 1 + convert_i + setlocal 4 + getlocal 4 + pushbyte 10 + ifnge ofs0048 + jump ofs0056 + ofs0048: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationWhile"),ProtectedNamespace("tests:TestOptimizationWhile"),StaticProtectedNs("tests:TestOptimizationWhile"),PrivateNamespace("TestOptimizationWhile.as$0")]) + pushstring "xxx" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestOptimizationWhile"),ProtectedNamespace("tests:TestOptimizationWhile"),StaticProtectedNs("tests:TestOptimizationWhile"),PrivateNamespace("TestOptimizationWhile.as$0")]), 1 + inclocal_i 4 + ofs0051: + pushtrue + iftrue ofs002b + ofs0056: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestOptimizationWhile",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestOptimizationWhile") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptionalParameters.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptionalParameters.as new file mode 100644 index 000000000..0359c01e1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestOptionalParameters.as @@ -0,0 +1,117 @@ +package tests +{ + import flash.events.Event; + + public class TestOptionalParameters + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestOptionalParameters() + { + method + name "tests:TestOptionalParameters/TestOptionalParameters" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(p1:Event = null, p2:Number = 1, p3:Number = -1, p4:Number = -1.1, p5:Number = -1.1, p6:String = "a") : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestOptionalParameters/run" + flag HAS_OPTIONAL + param QName(PackageNamespace("flash.events"),"Event") + param QName(PackageNamespace(""),"Number") + param QName(PackageNamespace(""),"Number") + param QName(PackageNamespace(""),"Number") + param QName(PackageNamespace(""),"Number") + param QName(PackageNamespace(""),"String") + optional Null() + optional Integer(1) + optional Integer(-1) + optional Double(-1.1) + optional Double(-1.1) + optional Utf8("a") + returns null + + body + maxstack 1 + localcount 7 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "p1", 0, 0 + debug 1, "p2", 1, 0 + debug 1, "p3", 2, 0 + debug 1, "p4", 3, 0 + debug 1, "p5", 4, 0 + debug 1, "p6", 5, 0 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestOptionalParameters",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestOptionalParameters") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestParamNames.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestParamNames.as new file mode 100644 index 000000000..3957a3146 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestParamNames.as @@ -0,0 +1,107 @@ +package tests +{ + public class TestParamNames + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestParamNames() + { + method + name "tests:TestParamNames/TestParamNames" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(firstp:int, secondp:int, thirdp:int) : int + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestParamNames/run" + param QName(PackageNamespace(""),"int") + param QName(PackageNamespace(""),"int") + param QName(PackageNamespace(""),"int") + returns QName(PackageNamespace(""),"int") + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "firstp", 0, 0 + debug 1, "secondp", 1, 0 + debug 1, "thirdp", 2, 0 + getlocal1 + getlocal2 + add + getlocal3 + add + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestParamNames",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestParamNames") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestParamsCount.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestParamsCount.as new file mode 100644 index 000000000..791ed76dd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestParamsCount.as @@ -0,0 +1,103 @@ +package tests +{ + public class TestParamsCount + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestParamsCount() + { + method + name "tests:TestParamsCount/TestParamsCount" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(firstp:int, secondp:int, thirdp:int) : int + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestParamsCount/run" + param QName(PackageNamespace(""),"int") + param QName(PackageNamespace(""),"int") + param QName(PackageNamespace(""),"int") + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "firstp", 0, 0 + debug 1, "secondp", 1, 0 + debug 1, "thirdp", 2, 0 + getlocal1 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestParamsCount",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestParamsCount") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestPrecedence.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestPrecedence.as new file mode 100644 index 000000000..c9747fcbf --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestPrecedence.as @@ -0,0 +1,175 @@ +package tests +{ + public class TestPrecedence + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestPrecedence() + { + method + name "tests:TestPrecedence/TestPrecedence" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestPrecedence/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 0 + coerce_a + setlocal1 + pushbyte 5 + pushbyte 6 + add + pushbyte 7 + multiply + coerce_a + setlocal1 + pushbyte 5 + pushbyte 2 + pushbyte 3 + add + multiply + coerce_a + setlocal1 + pushbyte 5 + pushbyte 6 + pushbyte 7 + multiply + add + coerce_a + setlocal1 + pushbyte 5 + pushbyte 2 + multiply + pushbyte 2 + add + coerce_a + setlocal1 + pushbyte 5 + pushbyte 25 + pushbyte 3 + modulo + multiply + coerce_a + setlocal1 + pushbyte 5 + pushbyte 24 + pushshort 307 + multiply + modulo + coerce_a + setlocal1 + pushbyte 1 + pushbyte 2 + pushbyte 3 + divide + divide + coerce_a + setlocal1 + pushbyte 1 + pushbyte 2 + pushbyte 3 + multiply + divide + coerce_a + setlocal1 + pushbyte 1 + pushbyte 2 + multiply + pushbyte 3 + multiply + coerce_a + setlocal1 + pushbyte 1 + pushbyte 2 + multiply + pushbyte 3 + divide + coerce_a + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestPrecedence"),ProtectedNamespace("tests:TestPrecedence"),StaticProtectedNs("tests:TestPrecedence"),PrivateNamespace("TestPrecedence.as$0")]) + pushstring "a=" + getlocal1 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestPrecedence"),ProtectedNamespace("tests:TestPrecedence"),StaticProtectedNs("tests:TestPrecedence"),PrivateNamespace("TestPrecedence.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestPrecedence",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestPrecedence") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestPrecedenceX.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestPrecedenceX.as new file mode 100644 index 000000000..c9cc3adb5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestPrecedenceX.as @@ -0,0 +1,124 @@ +package tests +{ + public class TestPrecedenceX + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestPrecedenceX() + { + method + name "tests:TestPrecedenceX/TestPrecedenceX" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestPrecedenceX/run" + returns null + + body + maxstack 3 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + debug 1, "d", 3, 16 + debug 1, "e", 4, 17 + pushbyte 5 + coerce_a + setlocal1 + pushbyte 2 + coerce_a + setlocal2 + pushbyte 3 + coerce_a + setlocal3 + getlocal1 + getlocal2 + getlocal3 + urshift + lshift + coerce_a + setlocal 4 + getlocal1 + getlocal2 + lshift + getlocal3 + urshift + coerce_a + setlocal 5 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestPrecedenceX",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestPrecedenceX") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestProperty.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestProperty.as new file mode 100644 index 000000000..90b4de246 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestProperty.as @@ -0,0 +1,200 @@ +package tests +{ + public class TestProperty + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestProperty() + { + method + name "tests:TestProperty/TestProperty" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestProperty/run" + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "d", 0, 13 + debug 1, "k", 1, 14 + findpropstrict QName(PrivateNamespace("TestProperty.as$0"),"TestClass1") + constructprop QName(PrivateNamespace("TestProperty.as$0"),"TestClass1"), 0 + coerce QName(PrivateNamespace("TestProperty.as$0"),"TestClass1") + setlocal1 + pushbyte 7 + pushbyte 8 + add + coerce_a + setlocal2 + getlocal2 + pushbyte 15 + ifne ofs002c + getlocal1 + getlocal1 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestProperty"),ProtectedNamespace("tests:TestProperty"),StaticProtectedNs("tests:TestProperty"),PrivateNamespace("TestProperty.as$0")]) + pushbyte 5 + multiply + callpropvoid Multiname("method",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestProperty"),ProtectedNamespace("tests:TestProperty"),StaticProtectedNs("tests:TestProperty"),PrivateNamespace("TestProperty.as$0")]), 1 + ofs002c: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class TestClass1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib:int = 5; + + public function TestClass1() + { + method + name "TestProperty.as$0:TestClass1/TestClass1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function method(i:int) : int + { + trait method QName(PackageNamespace(""),"method") + dispid 0 + method + name "TestProperty.as$0:TestClass1/method" + param QName(PackageNamespace(""),"int") + returns QName(PackageNamespace(""),"int") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 0 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PrivateNamespace("TestProperty.as$0"),PrivateNamespace("TestProperty.as$0:TestClass1"),ProtectedNamespace("TestProperty.as$0:TestClass1"),StaticProtectedNs("TestProperty.as$0:TestClass1")]) + pushstring "method" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PrivateNamespace("TestProperty.as$0"),PrivateNamespace("TestProperty.as$0:TestClass1"),ProtectedNamespace("TestProperty.as$0:TestClass1"),StaticProtectedNs("TestProperty.as$0:TestClass1")]), 1 + pushbyte 7 + returnvalue + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestProperty",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestProperty") + findpropstrict Multiname("TestClass1",[PrivateNamespace("TestProperty.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestProperty.as$0"),"TestClass1") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestRegExp.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestRegExp.as new file mode 100644 index 000000000..ffe899db0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestRegExp.as @@ -0,0 +1,158 @@ +package tests +{ + public class TestRegExp + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestRegExp() + { + method + name "tests:TestRegExp/TestRegExp" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestRegExp/run" + returns null + + body + maxstack 3 + localcount 9 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "r", 0, 13 + debug 1, "a1", 1, 14 + debug 1, "a2", 2, 15 + debug 1, "b1", 3, 16 + debug 1, "b2", 4, 17 + debug 1, "n1", 5, 18 + debug 1, "n2", 6, 19 + debug 1, "n3", 7, 20 + getlex Multiname("NaN",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRegExp"),ProtectedNamespace("tests:TestRegExp"),StaticProtectedNs("tests:TestRegExp"),PrivateNamespace("TestRegExp.as$0")]) + convert_d + setlocal1 + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[a-z\\r\\n0-9\\\\]+" + pushstring "i" + construct 2 + coerce_a + setlocal2 + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[a-z\\r\\n0-9\\\\]+" + pushstring "i" + construct 2 + coerce_a + setlocal3 + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[0-9AB]+" + construct 1 + coerce_a + setlocal 4 + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[0-9AB]+" + construct 1 + coerce_a + setlocal 5 + pushbyte 5 + convert_d + setlocal 6 + pushbyte 2 + convert_d + setlocal 7 + pushbyte 1 + convert_d + setlocal 8 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRegExp"),ProtectedNamespace("tests:TestRegExp"),StaticProtectedNs("tests:TestRegExp"),PrivateNamespace("TestRegExp.as$0")]) + pushstring "not a regexp 1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRegExp"),ProtectedNamespace("tests:TestRegExp"),StaticProtectedNs("tests:TestRegExp"),PrivateNamespace("TestRegExp.as$0")]), 1 + getlocal 6 + getlocal 7 + divide + getlocal 8 + divide + convert_d + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRegExp"),ProtectedNamespace("tests:TestRegExp"),StaticProtectedNs("tests:TestRegExp"),PrivateNamespace("TestRegExp.as$0")]) + pushstring "not a regexp 2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRegExp"),ProtectedNamespace("tests:TestRegExp"),StaticProtectedNs("tests:TestRegExp"),PrivateNamespace("TestRegExp.as$0")]), 1 + getlocal1 + getlocal 6 + getlocal 7 + divide + divide + convert_d + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestRegExp",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestRegExp") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestResolvingBuildIn.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestResolvingBuildIn.as new file mode 100644 index 000000000..798bd8b74 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestResolvingBuildIn.as @@ -0,0 +1,102 @@ +package tests +{ + public class TestResolvingBuildIn + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestResolvingBuildIn() + { + method + name "tests:TestResolvingBuildIn/TestResolvingBuildIn" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestResolvingBuildIn/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + pushstring "Hello world" + pushstring "world" + callproperty QName(Namespace("http://adobe.com/AS3/2006/builtin"),"indexOf"), 1 + convert_i + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestResolvingBuildIn",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestResolvingBuildIn") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestRest.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestRest.as new file mode 100644 index 000000000..d9b810bc6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestRest.as @@ -0,0 +1,108 @@ +package tests +{ + public class TestRest + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestRest() + { + method + name "tests:TestRest/TestRest" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(firstp:int, ... restval) : int + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestRest/run" + flag NEED_REST + param QName(PackageNamespace(""),"int") + returns QName(PackageNamespace(""),"int") + + body + maxstack 4 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "firstp", 0, 0 + debug 1, "restval", 1, 0 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRest"),ProtectedNamespace("tests:TestRest"),StaticProtectedNs("tests:TestRest"),PrivateNamespace("TestRest.as$0")]) + pushstring "firstRest:" + getlocal2 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRest"),ProtectedNamespace("tests:TestRest"),StaticProtectedNs("tests:TestRest"),PrivateNamespace("TestRest.as$0")]) + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestRest"),ProtectedNamespace("tests:TestRest"),StaticProtectedNs("tests:TestRest"),PrivateNamespace("TestRest.as$0")]), 1 + getlocal1 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestRest",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestRest") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSlots.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSlots.as new file mode 100644 index 000000000..45e859fb1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSlots.as @@ -0,0 +1,160 @@ +package tests +{ + public class TestSlots + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSlots() + { + method + name "tests:TestSlots/TestSlots" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSlots/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 4 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"i") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"f") + slotid 2 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 1 + setslot 1 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 2 + getscopeobject 1 + pushbyte 0 + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]) + getscopeobject 1 + getslot 1 + dup + increment_i + convert_i + getscopeobject 1 + swap + setslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]) + getscopeobject 1 + getslot 1 + dup + decrement_i + convert_i + getscopeobject 1 + swap + setslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]) + getscopeobject 1 + getslot 1 + increment_i + dup + convert_i + getscopeobject 1 + swap + setslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]) + getscopeobject 1 + getslot 1 + decrement_i + dup + convert_i + getscopeobject 1 + swap + setslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSlots"),ProtectedNamespace("tests:TestSlots"),StaticProtectedNs("tests:TestSlots"),PrivateNamespace("TestSlots.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSlots",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSlots") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSlots2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSlots2.as new file mode 100644 index 000000000..505fbc1d9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSlots2.as @@ -0,0 +1,110 @@ +package tests +{ + public class TestSlots2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSlots2() + { + method + name "tests:TestSlots2/TestSlots2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSlots2/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"f") + slotid 1 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSlots2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSlots2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStrictEquals.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStrictEquals.as new file mode 100644 index 000000000..73d0da59f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStrictEquals.as @@ -0,0 +1,133 @@ +package tests +{ + public class TestStrictEquals + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestStrictEquals() + { + method + name "tests:TestStrictEquals/TestStrictEquals" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestStrictEquals/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 6 + convert_i + setlocal1 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestStrictEquals"),"f"), 0 + getlocal0 + callproperty QName(PrivateNamespace("tests:TestStrictEquals"),"f"), 0 + ifstricteq ofs001e + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrictEquals"),ProtectedNamespace("tests:TestStrictEquals"),StaticProtectedNs("tests:TestStrictEquals"),PrivateNamespace("TestStrictEquals.as$0")]) + pushstring "is eight" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrictEquals"),ProtectedNamespace("tests:TestStrictEquals"),StaticProtectedNs("tests:TestStrictEquals"),PrivateNamespace("TestStrictEquals.as$0")]), 1 + ofs001e: + returnvoid + end ; code + end ; body + end ; method + } + + private function f() : String + { + trait method QName(PrivateNamespace("tests:TestStrictEquals"),"f") + dispid 0 + method + name "tests:TestStrictEquals/private/f" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "x" + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestStrictEquals",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestStrictEquals") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as new file mode 100644 index 000000000..ef7c30e9e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as @@ -0,0 +1,114 @@ +package tests +{ + public class TestStringCoerce + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var a:Object = null; + + public function TestStringCoerce() + { + method + name "tests:TestStringCoerce/TestStringCoerce" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestStringCoerce/run" + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "text1", 0, 15 + debug 1, "text2", 1, 16 + getlocal0 + getproperty QName(PrivateNamespace("tests:TestStringCoerce"),"a") + pushstring "test" + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStringCoerce"),ProtectedNamespace("tests:TestStringCoerce"),StaticProtectedNs("tests:TestStringCoerce"),PrivateNamespace("TestStringCoerce.as$0")]) + coerce_s + setlocal1 + findpropstrict QName(PackageNamespace(""),"String") + getlocal0 + getproperty QName(PrivateNamespace("tests:TestStringCoerce"),"a") + pushstring "test" + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStringCoerce"),ProtectedNamespace("tests:TestStringCoerce"),StaticProtectedNs("tests:TestStringCoerce"),PrivateNamespace("TestStringCoerce.as$0")]) + callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestStringCoerce",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestStringCoerce") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringConcat.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringConcat.as new file mode 100644 index 000000000..b8d868ea8 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringConcat.as @@ -0,0 +1,149 @@ +package tests +{ + public class TestStringConcat + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestStringConcat() + { + method + name "tests:TestStringConcat/TestStringConcat" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestStringConcat/run" + returns null + + body + maxstack 4 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 8 + convert_i + setlocal1 + getlocal0 + pushstring "hello" + pushbyte 5 + pushbyte 6 + multiply + add + callpropvoid QName(PrivateNamespace("tests:TestStringConcat"),"traceIt"), 1 + getlocal0 + pushstring "hello" + getlocal1 + pushbyte 1 + subtract + add + callpropvoid QName(PrivateNamespace("tests:TestStringConcat"),"traceIt"), 1 + getlocal0 + pushstring "hello" + pushbyte 5 + add + pushbyte 6 + add + callpropvoid QName(PrivateNamespace("tests:TestStringConcat"),"traceIt"), 1 + returnvoid + end ; code + end ; body + end ; method + } + + private function traceIt(s:String) : void + { + trait method QName(PrivateNamespace("tests:TestStringConcat"),"traceIt") + dispid 0 + method + name "tests:TestStringConcat/private/traceIt" + param QName(PackageNamespace(""),"String") + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "s", 0, 0 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStringConcat"),ProtectedNamespace("tests:TestStringConcat"),StaticProtectedNs("tests:TestStringConcat"),PrivateNamespace("TestStringConcat.as$0")]) + getlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStringConcat"),ProtectedNamespace("tests:TestStringConcat"),StaticProtectedNs("tests:TestStringConcat"),PrivateNamespace("TestStringConcat.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestStringConcat",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestStringConcat") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStrings.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStrings.as new file mode 100644 index 000000000..fb7ca72a5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStrings.as @@ -0,0 +1,111 @@ +package tests +{ + public class TestStrings + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestStrings() + { + method + name "tests:TestStrings/TestStrings" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestStrings/run" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]) + pushstring "quotes:\"hello!\"" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]) + pushstring "backslash: \\ " + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]) + pushstring "single quotes: \'hello!\'" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]) + pushstring "new line \r\n hello!" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStrings"),ProtectedNamespace("tests:TestStrings"),StaticProtectedNs("tests:TestStrings"),PrivateNamespace("TestStrings.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestStrings",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestStrings") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitch.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitch.as new file mode 100644 index 000000000..65a2bc7f1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitch.as @@ -0,0 +1,160 @@ +package tests +{ + public class TestSwitch + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitch() + { + method + name "tests:TestSwitch/TestSwitch" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitch/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + jump ofs003c + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]) + pushstring "fiftyseven multiply a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]), 1 + jump ofs0089 + ofs001b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]) + pushstring "thirteen" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]), 1 + ofs0023: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]) + pushstring "fourteen" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]), 1 + jump ofs0089 + ofs002f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]) + pushstring "eightynine" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitch"),ProtectedNamespace("tests:TestSwitch"),StaticProtectedNs("tests:TestSwitch"),PrivateNamespace("TestSwitch.as$0")]), 1 + ofs0037: + label + jump ofs0089 + ofs003c: + getlocal1 + setlocal2 + pushbyte 57 + getlocal1 + multiply + getlocal2 + ifstrictne ofs004d + pushbyte 0 + jump ofs0076 + ofs004d: + pushbyte 13 + getlocal2 + ifstrictne ofs005a + pushbyte 1 + jump ofs0076 + ofs005a: + pushbyte 14 + getlocal2 + ifstrictne ofs0067 + pushbyte 2 + jump ofs0076 + ofs0067: + pushbyte 89 + getlocal2 + ifstrictne ofs0074 + pushbyte 3 + jump ofs0076 + ofs0074: + pushbyte -1 + ofs0076: + kill 2 + lookupswitch ofs0037, [ofs000f, ofs001b, ofs0023, ofs002f] + ofs0089: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitch",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitch") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchBig.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchBig.as new file mode 100644 index 000000000..6b748188a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchBig.as @@ -0,0 +1,196 @@ +package tests +{ + public class TestSwitchBig + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitchBig() + { + method + name "tests:TestSwitchBig/TestSwitchBig" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitchBig/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 10 + coerce_a + setlocal1 + jump ofs0054 + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + jump ofs00df + ofs001b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "BC" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + jump ofs00df + ofs0027: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "D-default-E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + jump ofs00df + ofs0033: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "F no break" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + ofs003b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "G" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + jump ofs00df + ofs0047: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "H last" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + label + jump ofs00df + ofs0054: + getlocal1 + setlocal2 + pushstring "A" + getlocal2 + ifstrictne ofs0063 + pushbyte 0 + jump ofs00c0 + ofs0063: + pushstring "B" + getlocal2 + ifstrictne ofs0070 + pushbyte 1 + jump ofs00c0 + ofs0070: + pushstring "C" + getlocal2 + ifstrictne ofs007d + pushbyte 2 + jump ofs00c0 + ofs007d: + pushstring "D" + getlocal2 + ifstrictne ofs008a + pushbyte 3 + jump ofs00c0 + ofs008a: + pushstring "E" + getlocal2 + ifstrictne ofs0097 + pushbyte 4 + jump ofs00c0 + ofs0097: + pushstring "F" + getlocal2 + ifstrictne ofs00a4 + pushbyte 5 + jump ofs00c0 + ofs00a4: + pushstring "G" + getlocal2 + ifstrictne ofs00b1 + pushbyte 6 + jump ofs00c0 + ofs00b1: + pushstring "H" + getlocal2 + ifstrictne ofs00be + pushbyte 7 + jump ofs00c0 + ofs00be: + pushbyte -1 + ofs00c0: + kill 2 + lookupswitch ofs0027, [ofs000f, ofs001b, ofs001b, ofs0027, ofs0027, ofs0033, ofs003b, ofs0047] + ofs00df: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]) + pushstring "after switch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchBig"),ProtectedNamespace("tests:TestSwitchBig"),StaticProtectedNs("tests:TestSwitchBig"),PrivateNamespace("TestSwitchBig.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitchBig",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitchBig") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchComma.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchComma.as new file mode 100644 index 000000000..75106984e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchComma.as @@ -0,0 +1,158 @@ +package tests +{ + public class TestSwitchComma + { + + private static const X:int = 7; + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + findproperty QName(PrivateNamespace("tests:TestSwitchComma"),"X") + pushbyte 7 + initproperty QName(PrivateNamespace("tests:TestSwitchComma"),"X") + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitchComma() + { + method + name "tests:TestSwitchComma/TestSwitchComma" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitchComma/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "b", 0, 15 + debug 1, "a", 1, 16 + pushbyte 5 + convert_i + setlocal1 + pushstring "A" + coerce_s + setlocal2 + jump ofs0039 + ofs0018: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchComma"),ProtectedNamespace("tests:TestSwitchComma"),StaticProtectedNs("tests:TestSwitchComma"),PrivateNamespace("TestSwitchComma.as$0")]) + pushstring "is A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchComma"),ProtectedNamespace("tests:TestSwitchComma"),StaticProtectedNs("tests:TestSwitchComma"),PrivateNamespace("TestSwitchComma.as$0")]), 1 + jump ofs0079 + ofs0024: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchComma"),ProtectedNamespace("tests:TestSwitchComma"),StaticProtectedNs("tests:TestSwitchComma"),PrivateNamespace("TestSwitchComma.as$0")]) + pushstring "is B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchComma"),ProtectedNamespace("tests:TestSwitchComma"),StaticProtectedNs("tests:TestSwitchComma"),PrivateNamespace("TestSwitchComma.as$0")]), 1 + ofs002c: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchComma"),ProtectedNamespace("tests:TestSwitchComma"),StaticProtectedNs("tests:TestSwitchComma"),PrivateNamespace("TestSwitchComma.as$0")]) + pushstring "is C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchComma"),ProtectedNamespace("tests:TestSwitchComma"),StaticProtectedNs("tests:TestSwitchComma"),PrivateNamespace("TestSwitchComma.as$0")]), 1 + ofs0034: + label + jump ofs0079 + ofs0039: + getlocal2 + setlocal3 + pushstring "A" + getlocal3 + ifstrictne ofs0048 + pushbyte 0 + jump ofs0069 + ofs0048: + pushstring "B" + getlocal3 + ifstrictne ofs0055 + pushbyte 1 + jump ofs0069 + ofs0055: + getlex QName(PackageNamespace("tests"),"TestSwitchComma") + getproperty QName(PrivateNamespace("tests:TestSwitchComma"),"X") + pop + pushstring "C" + getlocal3 + ifstrictne ofs0067 + pushbyte 2 + jump ofs0069 + ofs0067: + pushbyte -1 + ofs0069: + kill 3 + lookupswitch ofs0034, [ofs0018, ofs0024, ofs002c] + ofs0079: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitchComma",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitchComma") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchContinue.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchContinue.as new file mode 100644 index 000000000..7879432a6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchContinue.as @@ -0,0 +1,176 @@ +package tests +{ + public class TestSwitchContinue + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitchContinue() + { + method + name "tests:TestSwitchContinue/TestSwitchContinue" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitchContinue/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + debug 1, "r", 1, 14 + pushbyte 0 + convert_i + setlocal1 + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 10 + modulo + convert_i + setlocal2 + getlocal2 + pushbyte 5 + ifngt ofs00a7 + pushbyte 0 + convert_i + setlocal1 + jump ofs00a0 + ofs0029: + label + jump ofs005c + ofs002e: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]) + pushstring "hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]), 1 + jump ofs0097 + ofs003a: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]) + pushstring "hi" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]), 1 + jump ofs0097 + ofs0046: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]) + pushstring "howdy" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]), 1 + jump ofs0097 + ofs0052: + label + jump ofs009e + label + jump ofs0097 + ofs005c: + getlocal1 + setlocal3 + pushbyte 0 + getlocal3 + ifstrictne ofs006b + pushbyte 0 + jump ofs0087 + ofs006b: + pushbyte 1 + getlocal3 + ifstrictne ofs0078 + pushbyte 1 + jump ofs0087 + ofs0078: + pushbyte 2 + getlocal3 + ifstrictne ofs0085 + pushbyte 2 + jump ofs0087 + ofs0085: + pushbyte -1 + ofs0087: + kill 3 + lookupswitch ofs0052, [ofs002e, ofs003a, ofs0046] + ofs0097: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]) + pushstring "message shown" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchContinue"),ProtectedNamespace("tests:TestSwitchContinue"),StaticProtectedNs("tests:TestSwitchContinue"),PrivateNamespace("TestSwitchContinue.as$0")]), 1 + ofs009e: + inclocal_i 1 + ofs00a0: + getlocal1 + pushbyte 10 + iflt ofs0029 + ofs00a7: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitchContinue",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitchContinue") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchDefault.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchDefault.as new file mode 100644 index 000000000..da6f4f0fb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchDefault.as @@ -0,0 +1,165 @@ +package tests +{ + public class TestSwitchDefault + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitchDefault() + { + method + name "tests:TestSwitchDefault/TestSwitchDefault" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitchDefault/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + jump ofs0048 + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]) + pushstring "fiftyseven multiply a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]), 1 + jump ofs0095 + ofs001b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]) + pushstring "thirteen" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]), 1 + ofs0023: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]) + pushstring "fourteen" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]), 1 + jump ofs0095 + ofs002f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]) + pushstring "eightynine" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]), 1 + jump ofs0095 + ofs003b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]) + pushstring "default clause" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefault"),ProtectedNamespace("tests:TestSwitchDefault"),StaticProtectedNs("tests:TestSwitchDefault"),PrivateNamespace("TestSwitchDefault.as$0")]), 1 + label + jump ofs0095 + ofs0048: + getlocal1 + setlocal2 + pushbyte 57 + getlocal1 + multiply + getlocal2 + ifstrictne ofs0059 + pushbyte 0 + jump ofs0082 + ofs0059: + pushbyte 13 + getlocal2 + ifstrictne ofs0066 + pushbyte 1 + jump ofs0082 + ofs0066: + pushbyte 14 + getlocal2 + ifstrictne ofs0073 + pushbyte 2 + jump ofs0082 + ofs0073: + pushbyte 89 + getlocal2 + ifstrictne ofs0080 + pushbyte 3 + jump ofs0082 + ofs0080: + pushbyte -1 + ofs0082: + kill 2 + lookupswitch ofs003b, [ofs000f, ofs001b, ofs0023, ofs002f] + ofs0095: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitchDefault",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitchDefault") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchDefaultEndMultiple.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchDefaultEndMultiple.as new file mode 100644 index 000000000..f6ba43543 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchDefaultEndMultiple.as @@ -0,0 +1,150 @@ +package tests +{ + public class TestSwitchDefaultEndMultiple + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitchDefaultEndMultiple() + { + method + name "tests:TestSwitchDefaultEndMultiple/TestSwitchDefaultEndMultiple" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitchDefaultEndMultiple/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushstring "X" + coerce_a + setlocal1 + jump ofs002d + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefaultEndMultiple"),ProtectedNamespace("tests:TestSwitchDefaultEndMultiple"),StaticProtectedNs("tests:TestSwitchDefaultEndMultiple"),PrivateNamespace("TestSwitchDefaultEndMultiple.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefaultEndMultiple"),ProtectedNamespace("tests:TestSwitchDefaultEndMultiple"),StaticProtectedNs("tests:TestSwitchDefaultEndMultiple"),PrivateNamespace("TestSwitchDefaultEndMultiple.as$0")]), 1 + jump ofs0078 + ofs001b: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefaultEndMultiple"),ProtectedNamespace("tests:TestSwitchDefaultEndMultiple"),StaticProtectedNs("tests:TestSwitchDefaultEndMultiple"),PrivateNamespace("TestSwitchDefaultEndMultiple.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchDefaultEndMultiple"),ProtectedNamespace("tests:TestSwitchDefaultEndMultiple"),StaticProtectedNs("tests:TestSwitchDefaultEndMultiple"),PrivateNamespace("TestSwitchDefaultEndMultiple.as$0")]), 1 + jump ofs0078 + ofs0027: + label + ofs0028: + label + jump ofs0078 + ofs002d: + getlocal1 + setlocal2 + pushstring "A" + getlocal2 + ifstrictne ofs003c + pushbyte 0 + jump ofs0065 + ofs003c: + pushstring "B" + getlocal2 + ifstrictne ofs0049 + pushbyte 1 + jump ofs0065 + ofs0049: + pushstring "C" + getlocal2 + ifstrictne ofs0056 + pushbyte 2 + jump ofs0065 + ofs0056: + pushstring "D" + getlocal2 + ifstrictne ofs0063 + pushbyte 3 + jump ofs0065 + ofs0063: + pushbyte -1 + ofs0065: + kill 2 + lookupswitch ofs0028, [ofs000f, ofs001b, ofs0027, ofs0027] + ofs0078: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitchDefaultEndMultiple",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitchDefaultEndMultiple") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as new file mode 100644 index 000000000..3bec1bec5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as @@ -0,0 +1,142 @@ +package tests +{ + public class TestSwitchIf + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSwitchIf() + { + method + name "tests:TestSwitchIf/TestSwitchIf" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestSwitchIf/run" + returns null + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "code", 0, 13 + debug 1, "a", 1, 14 + pushstring "4" + coerce_s + setlocal1 + pushtrue + convert_b + setlocal2 + jump ofs0029 + ofs0017: + label + getlocal2 + iffalse ofs0024 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]), 1 + ofs0024: + label + jump ofs005c + ofs0029: + findpropstrict QName(PackageNamespace(""),"int") + getlocal1 + callproperty QName(PackageNamespace(""),"int"), 1 + pushbyte 2 + subtract + setlocal3 + pushbyte 0 + getlocal3 + ifstrictne ofs0040 + pushbyte 0 + jump ofs004f + ofs0040: + pushbyte 1 + getlocal3 + ifstrictne ofs004d + pushbyte 1 + jump ofs004f + ofs004d: + pushbyte -1 + ofs004f: + kill 3 + lookupswitch ofs0024, [ofs0017, ofs0017] + ofs005c: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSwitchIf",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestSwitchIf") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator.as new file mode 100644 index 000000000..6e1f1befa --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator.as @@ -0,0 +1,135 @@ +package tests +{ + public class TestTernarOperator + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestTernarOperator() + { + method + name "tests:TestTernarOperator/TestTernarOperator" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestTernarOperator/run" + returns null + + body + maxstack 3 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + debug 1, "d", 3, 16 + debug 1, "e", 4, 17 + pushbyte 5 + coerce_a + setlocal1 + pushbyte 4 + coerce_a + setlocal2 + pushbyte 4 + coerce_a + setlocal3 + pushbyte 78 + coerce_a + setlocal 4 + getlocal1 + getlocal2 + ifne ofs0045 + getlocal3 + getlocal 4 + ifne ofs003f + pushbyte 1 + jump ofs0041 + ofs003f: + pushbyte 7 + ofs0041: + jump ofs0047 + ofs0045: + pushbyte 3 + ofs0047: + coerce_a + setlocal 5 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTernarOperator"),ProtectedNamespace("tests:TestTernarOperator"),StaticProtectedNs("tests:TestTernarOperator"),PrivateNamespace("TestTernarOperator.as$0")]) + pushstring "e=" + getlocal 5 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTernarOperator"),ProtectedNamespace("tests:TestTernarOperator"),StaticProtectedNs("tests:TestTernarOperator"),PrivateNamespace("TestTernarOperator.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestTernarOperator",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestTernarOperator") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as new file mode 100644 index 000000000..a46d372b9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as @@ -0,0 +1,134 @@ +package tests +{ + public class TestTernarOperator2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestTernarOperator2() + { + method + name "tests:TestTernarOperator2/TestTernarOperator2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestTernarOperator2/run" + returns null + + body + maxstack 3 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "b", 0, 13 + debug 1, "i", 1, 14 + debug 1, "j", 2, 15 + debug 1, "k", 3, 16 + pushtrue + convert_b + setlocal1 + pushbyte 1 + convert_i + setlocal2 + getlocal1 + iffalse ofs0027 + getlocal2 + jump ofs0030 + ofs0027: + findpropstrict QName(PackageNamespace(""),"int") + getlocal2 + pushbyte 1 + add + callproperty QName(PackageNamespace(""),"int"), 1 + ofs0030: + convert_i + setlocal3 + findpropstrict QName(PackageNamespace(""),"Boolean") + getlocal2 + callproperty QName(PackageNamespace(""),"Boolean"), 1 + iffalse ofs0041 + getlocal3 + jump ofs004a + ofs0041: + findpropstrict QName(PackageNamespace(""),"int") + getlocal3 + pushbyte 1 + add + callproperty QName(PackageNamespace(""),"int"), 1 + ofs004a: + convert_i + setlocal 4 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestTernarOperator2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestTernarOperator2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTry.as new file mode 100644 index 000000000..ad827abc3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTry.as @@ -0,0 +1,200 @@ +package tests +{ + public class TestTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestTry() + { + method + name "tests:TestTry/TestTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestTry/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 4 + initscopedepth 5 + maxscopedepth 14 + trait slot QName(PackageInternalNs("tests"),"i") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 0 + setslot 1 + getscopeobject 1 + pushbyte 7 + setslot 1 + ofs0017: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + pushstring "try body" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 1 + ofs001e: + jump ofs0066 + ofs0022: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + pushstring "catched DefinitionError" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 1 + popscope + kill 2 + jump ofs0066 + ofs003d: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + pushstring "Error message:" + getlex Multiname("e",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + getproperty Multiname("message",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + pushstring "Stacktrace:" + getlex Multiname("e",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + callproperty Multiname("getStackTrace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 0 + add + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 1 + popscope + kill 2 + ofs0066: + pushbyte -1 + ofs0068: + jump ofs0087 + ofs006c: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 2 + dup + setlocal2 + pushscope + popscope + kill 2 + coerce_a + setlocal3 + pushbyte 0 + jump ofs0087 + label + pop + ofs0082: + label + getlocal3 + kill 3 + throw + ofs0087: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + pushstring "Finally part" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 1 + lookupswitch ofs0096, [ofs0082] + ofs0096: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]) + pushstring "end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTry"),ProtectedNamespace("tests:TestTry"),StaticProtectedNs("tests:TestTry"),PrivateNamespace("TestTry.as$0")]), 1 + returnvoid + end ; code + try from ofs0017 to ofs001e target ofs0022 type QName(PackageNamespace(""),"DefinitionError") name QName(PackageNamespace(""),"e") end + try from ofs0017 to ofs001e target ofs003d type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + try from ofs0017 to ofs0068 target ofs006c type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryIf.as new file mode 100644 index 000000000..2a00aea13 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryIf.as @@ -0,0 +1,153 @@ +package tests +{ + public class TestTryIf + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestTryIf() + { + method + name "tests:TestTryIf/TestTryIf" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestTryIf/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + convert_i + setslot 1 + ofs0015: + getscopeobject 1 + getslot 1 + pushbyte 5 + greaterthan + dup + iffalse ofs0029 + pop + getscopeobject 1 + getslot 1 + pushbyte 50 + lessthan + ofs0029: + iffalse ofs0034 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryIf"),ProtectedNamespace("tests:TestTryIf"),StaticProtectedNs("tests:TestTryIf"),PrivateNamespace("TestTryIf.as$0")]) + pushstring "in limits" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryIf"),ProtectedNamespace("tests:TestTryIf"),StaticProtectedNs("tests:TestTryIf"),PrivateNamespace("TestTryIf.as$0")]), 1 + ofs0034: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryIf"),ProtectedNamespace("tests:TestTryIf"),StaticProtectedNs("tests:TestTryIf"),PrivateNamespace("TestTryIf.as$0")]) + pushstring "next" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryIf"),ProtectedNamespace("tests:TestTryIf"),StaticProtectedNs("tests:TestTryIf"),PrivateNamespace("TestTryIf.as$0")]), 1 + ofs003b: + jump ofs0056 + ofs003f: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryIf"),ProtectedNamespace("tests:TestTryIf"),StaticProtectedNs("tests:TestTryIf"),PrivateNamespace("TestTryIf.as$0")]) + pushstring "in catch" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryIf"),ProtectedNamespace("tests:TestTryIf"),StaticProtectedNs("tests:TestTryIf"),PrivateNamespace("TestTryIf.as$0")]), 1 + popscope + kill 2 + ofs0056: + returnvoid + end ; code + try from ofs0015 to ofs003b target ofs003f type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestTryIf",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestTryIf") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryReturn.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryReturn.as new file mode 100644 index 000000000..147b07cdb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryReturn.as @@ -0,0 +1,192 @@ +package tests +{ + public class TestTryReturn + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestTryReturn() + { + method + name "tests:TestTryReturn/TestTryReturn" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestTryReturn/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 10 + trait slot QName(PackageInternalNs("tests"),"i") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 2 + type QName(PackageNamespace(""),"Boolean") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 0 + setslot 1 + getscopeobject 1 + pushfalse + convert_b + setslot 2 + ofs0017: + getscopeobject 1 + pushbyte 0 + setslot 1 + getscopeobject 1 + pushtrue + convert_b + setslot 2 + getscopeobject 1 + getslot 1 + pushbyte 0 + ifngt ofs0045 + jump ofs003d + ofs0031: + label + getscopeobject 1 + getslot 2 + iffalse ofs003d + pushbyte 5 + returnvalue + ofs003d: + getlocal0 + callproperty QName(PackageNamespace(""),"testDoWhile2"), 0 + iftrue ofs0031 + ofs0045: + getscopeobject 1 + getscopeobject 1 + getslot 1 + increment_i + setslot 1 + pushbyte 2 + returnvalue + ofs0051: + jump ofs0065 + ofs0055: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + popscope + kill 2 + ofs0065: + pushbyte 4 + returnvalue + end ; code + try from ofs0017 to ofs0051 target ofs0055 type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + + public function testDoWhile2() : Boolean + { + trait method QName(PackageNamespace(""),"testDoWhile2") + dispid 0 + method + name "tests:TestTryReturn/testDoWhile2" + returns QName(PackageNamespace(""),"Boolean") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushtrue + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestTryReturn",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestTryReturn") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryReturn2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryReturn2.as new file mode 100644 index 000000000..bb57f57e6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTryReturn2.as @@ -0,0 +1,282 @@ +package tests +{ + public class TestTryReturn2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestTryReturn2() + { + method + name "tests:TestTryReturn2/TestTryReturn2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : String + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestTryReturn2/run" + flag NEED_ACTIVATION + returns QName(PackageNamespace(""),"String") + + body + maxstack 3 + localcount 5 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 2 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"d") + slotid 3 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"e") + slotid 4 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"c") + slotid 5 + type QName(PackageNamespace(""),"Boolean") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushfalse + convert_b + setslot 5 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryReturn2"),ProtectedNamespace("tests:TestTryReturn2"),StaticProtectedNs("tests:TestTryReturn2"),PrivateNamespace("TestTryReturn2.as$0")]) + pushstring "before" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryReturn2"),ProtectedNamespace("tests:TestTryReturn2"),StaticProtectedNs("tests:TestTryReturn2"),PrivateNamespace("TestTryReturn2.as$0")]), 1 + getscopeobject 1 + pushtrue + convert_b + setslot 1 + getscopeobject 1 + pushfalse + convert_b + setslot 2 + getscopeobject 1 + pushtrue + convert_b + setslot 5 + getscopeobject 1 + pushfalse + convert_b + setslot 3 + getscopeobject 1 + pushtrue + convert_b + setslot 4 + ofs0036: + getscopeobject 1 + getslot 1 + iffalse ofs004f + pushstring "A" + coerce_a + setlocal2 + pushbyte 0 + jump ofs00b6 + label + pop + ofs004a: + label + getlocal2 + kill 2 + returnvalue + ofs004f: + getscopeobject 1 + getslot 2 + iffalse ofs0068 + pushstring "B" + coerce_a + setlocal2 + pushbyte 1 + jump ofs00b6 + label + pop + ofs0063: + label + getlocal2 + kill 2 + returnvalue + ofs0068: + jump ofs0095 + ofs006c: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + getscopeobject 1 + getslot 5 + iffalse ofs0092 + pushstring "C" + coerce_a + setlocal2 + pushbyte 2 + jump ofs00b6 + label + pop + ofs008d: + label + getlocal2 + kill 2 + returnvalue + ofs0092: + popscope + kill 2 + ofs0095: + pushbyte -1 + ofs0097: + jump ofs00b6 + ofs009b: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + pushscope + popscope + kill 2 + coerce_a + setlocal3 + pushbyte 3 + jump ofs00b6 + label + pop + ofs00b1: + label + getlocal3 + kill 3 + throw + ofs00b6: + getscopeobject 1 + getslot 3 + iffalse ofs00d1 + pushstring "D" + coerce_a + setlocal 4 + pushbyte 4 + jump ofs00c9 + ofs00c9: + label + pop + ofs00cb: + label + getlocal 4 + kill 4 + returnvalue + ofs00d1: + getscopeobject 1 + getslot 4 + iffalse ofs00ec + pushstring "E" + coerce_a + setlocal 4 + pushbyte 5 + jump ofs00e4 + ofs00e4: + label + pop + ofs00e6: + label + getlocal 4 + kill 4 + returnvalue + ofs00ec: + lookupswitch ofs0103, [ofs004a, ofs0063, ofs008d, ofs00b1, ofs00cb, ofs00e6] + ofs0103: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryReturn2"),ProtectedNamespace("tests:TestTryReturn2"),StaticProtectedNs("tests:TestTryReturn2"),PrivateNamespace("TestTryReturn2.as$0")]) + pushstring "after" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestTryReturn2"),ProtectedNamespace("tests:TestTryReturn2"),StaticProtectedNs("tests:TestTryReturn2"),PrivateNamespace("TestTryReturn2.as$0")]), 1 + pushstring "X" + returnvalue + end ; code + try from ofs0036 to ofs0068 target ofs006c type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + try from ofs0036 to ofs0097 target ofs009b type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestTryReturn2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestTryReturn2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestUndefined.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestUndefined.as new file mode 100644 index 000000000..cbcc2c50e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestUndefined.as @@ -0,0 +1,157 @@ +package tests +{ + public class TestUndefined + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestUndefined() + { + method + name "tests:TestUndefined/TestUndefined" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestUndefined/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"i") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"j") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"c") + slotid 3 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"f") + slotid 4 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 0 + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + getscopeobject 1 + pushbyte 0 + setslot 3 + getscopeobject 1 + pushbyte 5 + getscopeobject 1 + getslot 1 + add + convert_i + setslot 3 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 4 + jump ofs0048 + ofs0035: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUndefined"),ProtectedNamespace("tests:TestUndefined"),StaticProtectedNs("tests:TestUndefined"),PrivateNamespace("TestUndefined.as$0")]) + getscopeobject 1 + getslot 1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUndefined"),ProtectedNamespace("tests:TestUndefined"),StaticProtectedNs("tests:TestUndefined"),PrivateNamespace("TestUndefined.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 1 + increment_i + setslot 1 + ofs0048: + getscopeobject 1 + getslot 1 + pushbyte 10 + iflt ofs0035 + findpropstrict Multiname("f",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUndefined"),ProtectedNamespace("tests:TestUndefined"),StaticProtectedNs("tests:TestUndefined"),PrivateNamespace("TestUndefined.as$0")]) + callpropvoid Multiname("f",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUndefined"),ProtectedNamespace("tests:TestUndefined"),StaticProtectedNs("tests:TestUndefined"),PrivateNamespace("TestUndefined.as$0")]), 0 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestUndefined",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestUndefined") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestUsagesTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestUsagesTry.as new file mode 100644 index 000000000..e8dc7cdf2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestUsagesTry.as @@ -0,0 +1,238 @@ +package tests +{ + public class TestUsagesTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestUsagesTry() + { + method + name "tests:TestUsagesTry/TestUsagesTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : String + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestUsagesTry/run" + flag NEED_ACTIVATION + returns QName(PackageNamespace(""),"String") + + body + maxstack 3 + localcount 4 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"a") + slotid 1 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 2 + type QName(PackageNamespace(""),"Boolean") + end ; trait + trait slot QName(PackageInternalNs("tests"),"k") + slotid 3 + type QName(PackageNamespace(""),"int") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushbyte 5 + setslot 3 + jump ofs002e + ofs0015: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]) + pushstring "1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]), 1 + jump ofs005c + ofs0021: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]) + pushstring "2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]), 1 + ofs0029: + label + jump ofs005c + ofs002e: + getscopeobject 1 + getslot 3 + setlocal2 + pushbyte 0 + getlocal2 + ifstrictne ofs0040 + pushbyte 0 + jump ofs004f + ofs0040: + pushbyte 1 + getlocal2 + ifstrictne ofs004d + pushbyte 1 + jump ofs004f + ofs004d: + pushbyte -1 + ofs004f: + kill 2 + lookupswitch ofs0029, [ofs0015, ofs0021] + ofs005c: + getscopeobject 1 + pushtrue + convert_b + setslot 1 + getscopeobject 1 + pushtrue + convert_b + setslot 2 + ofs0068: + getscopeobject 1 + getslot 2 + iffalse ofs0081 + pushstring "B" + coerce_a + setlocal2 + pushbyte 0 + jump ofs00c4 + label + pop + ofs007c: + label + getlocal2 + kill 2 + returnvalue + ofs0081: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]), 1 + ofs0088: + jump ofs00a3 + ofs008c: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]) + pushstring "E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]), 1 + popscope + kill 2 + ofs00a3: + pushbyte -1 + ofs00a5: + jump ofs00c4 + ofs00a9: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + pushscope + popscope + kill 2 + coerce_a + setlocal3 + pushbyte 1 + jump ofs00c4 + label + pop + ofs00bf: + label + getlocal3 + kill 3 + throw + ofs00c4: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]) + pushstring "finally" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]), 1 + lookupswitch ofs00d6, [ofs007c, ofs00bf] + ofs00d6: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]) + pushstring "after" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestUsagesTry"),ProtectedNamespace("tests:TestUsagesTry"),StaticProtectedNs("tests:TestUsagesTry"),PrivateNamespace("TestUsagesTry.as$0")]), 1 + pushstring "X" + returnvalue + end ; code + try from ofs0068 to ofs0088 target ofs008c type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + try from ofs0068 to ofs00a5 target ofs00a9 type null name null end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestUsagesTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestUsagesTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVarFqn.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVarFqn.as new file mode 100644 index 000000000..05b8d05e6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVarFqn.as @@ -0,0 +1,137 @@ +package tests +{ + import tests_classes.mypackage1.TestClass; + import tests_classes.mypackage2.TestClass; + + public class TestVarFqn + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var c1:tests_classes.mypackage1.TestClass; + + private var c2:tests_classes.mypackage2.TestClass; + + public function TestVarFqn() + { + method + name "tests:TestVarFqn/TestVarFqn" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run(TestClass:int) : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestVarFqn/run" + flag NEED_ACTIVATION + param QName(PackageNamespace(""),"int") + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests"),"TestClass") + slotid 1 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"b") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"f") + slotid 3 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "TestClass", 0, 0 + debug 1, "+$activation", 1, 0 + newactivation + dup + setlocal2 + pushscope + getscopeobject 1 + getlocal1 + setslot 1 + getscopeobject 1 + getscopeobject 1 + getslot 1 + pushbyte 5 + add + convert_i + setslot 2 + getscopeobject 1 + newfunction 2 + coerce QName(PackageNamespace(""),"Function") + setslot 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestVarFqn",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestVarFqn") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVector.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVector.as new file mode 100644 index 000000000..e82ca1efa --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVector.as @@ -0,0 +1,127 @@ +package tests +{ + public class TestVector + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestVector() + { + method + name "tests:TestVector/TestVector" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestVector/run" + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "v", 0, 13 + debug 1, "a", 1, 16 + getlex QName(PackageNamespace("__AS3__.vec"),"Vector") + getlex QName(PackageNamespace(""),"String") + applytype 1 + construct 0 + coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) + setlocal1 + getlocal1 + pushstring "hello" + callpropvoid Multiname("push",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector"),ProtectedNamespace("tests:TestVector"),StaticProtectedNs("tests:TestVector"),PrivateNamespace("TestVector.as$0")]), 1 + getlocal1 + pushbyte 0 + pushstring "hi" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector"),ProtectedNamespace("tests:TestVector"),StaticProtectedNs("tests:TestVector"),PrivateNamespace("TestVector.as$0")]) + pushbyte 5 + convert_i + setlocal2 + getlocal1 + getlocal2 + pushbyte 8 + multiply + pushbyte 39 + subtract + pushstring "hi2" + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector"),ProtectedNamespace("tests:TestVector"),StaticProtectedNs("tests:TestVector"),PrivateNamespace("TestVector.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector"),ProtectedNamespace("tests:TestVector"),StaticProtectedNs("tests:TestVector"),PrivateNamespace("TestVector.as$0")]) + getlocal1 + pushbyte 0 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector"),ProtectedNamespace("tests:TestVector"),StaticProtectedNs("tests:TestVector"),PrivateNamespace("TestVector.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector"),ProtectedNamespace("tests:TestVector"),StaticProtectedNs("tests:TestVector"),PrivateNamespace("TestVector.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestVector",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestVector") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVector2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVector2.as new file mode 100644 index 000000000..32375e0e5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestVector2.as @@ -0,0 +1,125 @@ +package tests +{ + public class TestVector2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestVector2() + { + method + name "tests:TestVector2/TestVector2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestVector2/run" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + getlex QName(PackageNamespace("__AS3__.vec"),"Vector") + getlex QName(PackageNamespace("__AS3__.vec"),"Vector") + getlex QName(PackageNamespace(""),"int") + applytype 1 + applytype 1 + construct 0 + coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector"))>) + setlocal1 + getlex QName(PackageNamespace("__AS3__.vec"),"Vector") + getlex QName(PackageNamespace(""),"int") + applytype 1 + pushbyte 3 + construct 1 + dup + pushbyte 0 + pushbyte 10 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector2"),ProtectedNamespace("tests:TestVector2"),StaticProtectedNs("tests:TestVector2"),PrivateNamespace("TestVector2.as$0")]) + dup + pushbyte 1 + pushbyte 20 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector2"),ProtectedNamespace("tests:TestVector2"),StaticProtectedNs("tests:TestVector2"),PrivateNamespace("TestVector2.as$0")]) + dup + pushbyte 2 + pushbyte 30 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestVector2"),ProtectedNamespace("tests:TestVector2"),StaticProtectedNs("tests:TestVector2"),PrivateNamespace("TestVector2.as$0")]) + coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestVector2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestVector2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileAnd.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileAnd.as new file mode 100644 index 000000000..4972f413d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileAnd.as @@ -0,0 +1,127 @@ +package tests +{ + public class TestWhileAnd + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileAnd() + { + method + name "tests:TestWhileAnd/TestWhileAnd" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileAnd/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + pushbyte 5 + convert_i + setlocal1 + pushbyte 10 + convert_i + setlocal2 + jump ofs001d + ofs0018: + label + inclocal_i 1 + declocal_i 2 + ofs001d: + getlocal1 + pushbyte 10 + lessthan + dup + iffalse ofs002b + pop + getlocal2 + pushbyte 1 + greaterthan + ofs002b: + iftrue ofs0018 + pushbyte 7 + convert_i + setlocal1 + pushbyte 9 + convert_i + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileAnd",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileAnd") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak.as new file mode 100644 index 000000000..92ec59083 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak.as @@ -0,0 +1,151 @@ +package tests +{ + public class TestWhileBreak + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileBreak() + { + method + name "tests:TestWhileBreak/TestWhileBreak" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileBreak/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 0 + convert_i + setlocal1 + jump ofs0055 + ofs000f: + label + getlocal1 + pushbyte 1 + greaterthan + dup + iffalse ofs001e + pop + getlocal1 + pushbyte 2 + greaterthan + ofs001e: + dup + iffalse ofs0028 + pop + getlocal1 + pushbyte 3 + greaterthan + ofs0028: + dup + iffalse ofs0032 + pop + getlocal1 + pushbyte 4 + greaterthan + ofs0032: + dup + iffalse ofs003c + pop + getlocal1 + pushbyte 5 + greaterthan + ofs003c: + iffalse ofs0043 + pushstring "A" + returnvalue + ofs0043: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak"),ProtectedNamespace("tests:TestWhileBreak"),StaticProtectedNs("tests:TestWhileBreak"),PrivateNamespace("TestWhileBreak.as$0")]) + pushstring "middle" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak"),ProtectedNamespace("tests:TestWhileBreak"),StaticProtectedNs("tests:TestWhileBreak"),PrivateNamespace("TestWhileBreak.as$0")]), 1 + getlocal1 + pushbyte 5 + ifne ofs0055 + jump ofs005c + ofs0055: + getlocal1 + pushbyte 10 + iflt ofs000f + ofs005c: + pushstring "B" + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileBreak",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileBreak") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak2.as new file mode 100644 index 000000000..1e23c63ae --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak2.as @@ -0,0 +1,188 @@ +package tests +{ + public class TestWhileBreak2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileBreak2() + { + method + name "tests:TestWhileBreak2/TestWhileBreak2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileBreak2/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "k", 0, 13 + pushbyte 8 + convert_i + setlocal1 + jump ofs00b8 + ofs000f: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "X" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 1 + ifne ofs0026 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + returnvoid + ofs0026: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "Y" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 10 + ifnlt ofs009b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "k1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 2 + ifne ofs0062 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 1 + ifngt ofs005b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "B1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + jump ofs00bd + ofs005b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "B2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + ofs0062: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "Z" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 3 + ifne ofs007b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + jump ofs00bd + ofs007b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "Z2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 4 + ifne ofs0094 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + jump ofs00bd + ofs0094: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "k2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + ofs009b: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + getlocal1 + pushbyte 2 + ifne ofs00b1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "E1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + returnvoid + ofs00b1: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "gg" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + ofs00b8: + pushtrue + iftrue ofs000f + ofs00bd: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]) + pushstring "ss" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak2"),ProtectedNamespace("tests:TestWhileBreak2"),StaticProtectedNs("tests:TestWhileBreak2"),PrivateNamespace("TestWhileBreak2.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileBreak2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileBreak2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak3.as new file mode 100644 index 000000000..16b114bea --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileBreak3.as @@ -0,0 +1,143 @@ +package tests +{ + public class TestWhileBreak3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileBreak3() + { + method + name "tests:TestWhileBreak3/TestWhileBreak3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileBreak3/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 13 + getlex QName(PackageNamespace(""),"Math") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 11 + multiply + callproperty QName(PackageNamespace(""),"floor"), 1 + convert_i + setlocal1 + jump ofs005a + ofs001a: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak3"),ProtectedNamespace("tests:TestWhileBreak3"),StaticProtectedNs("tests:TestWhileBreak3"),PrivateNamespace("TestWhileBreak3.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak3"),ProtectedNamespace("tests:TestWhileBreak3"),StaticProtectedNs("tests:TestWhileBreak3"),PrivateNamespace("TestWhileBreak3.as$0")]), 1 + getlocal1 + pushbyte 100 + ifnlt ofs0043 + getlocal1 + pushbyte 0 + ifnlt ofs0034 + jump ofs005f + ofs0034: + getlocal1 + pushbyte 4 + ifnlt ofs003f + jump ofs005f + ofs003f: + jump ofs004a + ofs0043: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak3"),ProtectedNamespace("tests:TestWhileBreak3"),StaticProtectedNs("tests:TestWhileBreak3"),PrivateNamespace("TestWhileBreak3.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak3"),ProtectedNamespace("tests:TestWhileBreak3"),StaticProtectedNs("tests:TestWhileBreak3"),PrivateNamespace("TestWhileBreak3.as$0")]), 1 + ofs004a: + getlocal1 + pushbyte 4 + ifne ofs005a + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak3"),ProtectedNamespace("tests:TestWhileBreak3"),StaticProtectedNs("tests:TestWhileBreak3"),PrivateNamespace("TestWhileBreak3.as$0")]) + pushstring "D" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileBreak3"),ProtectedNamespace("tests:TestWhileBreak3"),StaticProtectedNs("tests:TestWhileBreak3"),PrivateNamespace("TestWhileBreak3.as$0")]), 1 + getlocal1 + returnvalue + ofs005a: + pushtrue + iftrue ofs001a + ofs005f: + getlocal1 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileBreak3",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileBreak3") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileContinue.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileContinue.as new file mode 100644 index 000000000..5f401eb63 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileContinue.as @@ -0,0 +1,127 @@ +package tests +{ + public class TestWhileContinue + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileContinue() + { + method + name "tests:TestWhileContinue/TestWhileContinue" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileContinue/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + pushbyte 5 + coerce_a + setlocal1 + jump ofs003b + ofs000f: + label + getlocal1 + pushbyte 9 + ifne ofs0034 + getlocal1 + pushbyte 8 + ifne ofs0022 + jump ofs003b + ofs0022: + getlocal1 + pushbyte 9 + ifne ofs002d + jump ofs0040 + ofs002d: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileContinue"),ProtectedNamespace("tests:TestWhileContinue"),StaticProtectedNs("tests:TestWhileContinue"),PrivateNamespace("TestWhileContinue.as$0")]) + pushstring "hello 1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileContinue"),ProtectedNamespace("tests:TestWhileContinue"),StaticProtectedNs("tests:TestWhileContinue"),PrivateNamespace("TestWhileContinue.as$0")]), 1 + ofs0034: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileContinue"),ProtectedNamespace("tests:TestWhileContinue"),StaticProtectedNs("tests:TestWhileContinue"),PrivateNamespace("TestWhileContinue.as$0")]) + pushstring "hello2" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileContinue"),ProtectedNamespace("tests:TestWhileContinue"),StaticProtectedNs("tests:TestWhileContinue"),PrivateNamespace("TestWhileContinue.as$0")]), 1 + ofs003b: + pushtrue + iftrue ofs000f + ofs0040: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileContinue",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileContinue") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileDoWhile.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileDoWhile.as new file mode 100644 index 000000000..6c5890d2f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileDoWhile.as @@ -0,0 +1,127 @@ +package tests +{ + public class TestWhileDoWhile + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileDoWhile() + { + method + name "tests:TestWhileDoWhile/TestWhileDoWhile" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileDoWhile/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "i", 0, 14 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]), 1 + pushbyte 0 + convert_i + setlocal1 + jump ofs0033 + ofs0016: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]), 1 + jump ofs0023 + ofs0022: + label + ofs0023: + inclocal_i 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]) + pushstring "C" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]), 1 + getlocal1 + pushbyte 5 + iflt ofs0022 + ofs0033: + getlocal1 + pushbyte 10 + iflt ofs0016 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]) + pushstring "E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileDoWhile"),ProtectedNamespace("tests:TestWhileDoWhile"),StaticProtectedNs("tests:TestWhileDoWhile"),PrivateNamespace("TestWhileDoWhile.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileDoWhile",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileDoWhile") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileSwitch.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileSwitch.as new file mode 100644 index 000000000..7266d6278 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileSwitch.as @@ -0,0 +1,159 @@ +package tests +{ + public class TestWhileSwitch + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileSwitch() + { + method + name "tests:TestWhileSwitch/TestWhileSwitch" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileSwitch/run" + returns null + + body + maxstack 2 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "d", 1, 14 + debug 1, "e", 2, 15 + debug 1, "i", 3, 16 + pushtrue + convert_b + setlocal1 + pushbyte 5 + convert_i + setlocal2 + pushtrue + convert_b + setlocal3 + pushbyte 0 + convert_i + setlocal 4 + jump ofs007d + ofs0029: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]) + pushstring "start" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]), 1 + getlocal1 + iffalse ofs0041 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]) + pushstring "A" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]), 1 + jump ofs006f + ofs0041: + jump ofs0052 + ofs0045: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]) + pushstring "D1" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]), 1 + ofs004d: + label + jump ofs006f + ofs0052: + getlocal2 + setlocal 5 + pushbyte 1 + getlocal 5 + ifstrictne ofs0063 + pushbyte 0 + jump ofs0065 + ofs0063: + pushbyte -1 + ofs0065: + kill 5 + lookupswitch ofs004d, [ofs0045] + ofs006f: + getlocal3 + iffalse ofs007b + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]) + pushstring "E" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileSwitch"),ProtectedNamespace("tests:TestWhileSwitch"),StaticProtectedNs("tests:TestWhileSwitch"),PrivateNamespace("TestWhileSwitch.as$0")]), 1 + ofs007b: + inclocal_i 4 + ofs007d: + getlocal 4 + pushbyte 100 + iflt ofs0029 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileSwitch",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileSwitch") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTrue.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTrue.as new file mode 100644 index 000000000..4291bb221 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTrue.as @@ -0,0 +1,115 @@ +package tests +{ + public class TestWhileTrue + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileTrue() + { + method + name "tests:TestWhileTrue/TestWhileTrue" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileTrue/run" + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + getlex QName(PackageNamespace(""),"Math") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 6 + multiply + callproperty QName(PackageNamespace(""),"floor"), 1 + convert_i + setlocal1 + getlocal1 + pushbyte 4 + ifngt ofs0027 + jump ofs0022 + ofs0021: + label + ofs0022: + pushtrue + iftrue ofs0021 + ofs0027: + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileTrue",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileTrue") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTry.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTry.as new file mode 100644 index 000000000..6107456cb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTry.as @@ -0,0 +1,153 @@ +package tests +{ + import flash.errors.EOFError; + + public class TestWhileTry + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileTry() + { + method + name "tests:TestWhileTry/TestWhileTry" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileTry/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 12 + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + jump ofs0049 + ofs000f: + label + ofs0010: + jump ofs001c + ofs0014: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry"),ProtectedNamespace("tests:TestWhileTry"),StaticProtectedNs("tests:TestWhileTry"),PrivateNamespace("TestWhileTry.as$0")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry"),ProtectedNamespace("tests:TestWhileTry"),StaticProtectedNs("tests:TestWhileTry"),PrivateNamespace("TestWhileTry.as$0")]), 1 + ofs001c: + pushtrue + iftrue ofs0014 + ofs0021: + jump ofs0049 + ofs0025: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + popscope + kill 2 + jump ofs0049 + ofs0039: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + popscope + kill 2 + ofs0049: + pushtrue + iftrue ofs000f + returnvoid + end ; code + try from ofs0010 to ofs0021 target ofs0025 type QName(PackageNamespace("flash.errors"),"EOFError") name QName(PackageNamespace(""),"e") end + try from ofs0010 to ofs0021 target ofs0039 type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileTry",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileTry") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTry2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTry2.as new file mode 100644 index 000000000..e9450b0a0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestWhileTry2.as @@ -0,0 +1,197 @@ +package tests +{ + import flash.errors.EOFError; + + public class TestWhileTry2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestWhileTry2() + { + method + name "tests:TestWhileTry2/TestWhileTry2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestWhileTry2/run" + flag NEED_ACTIVATION + returns null + + body + maxstack 3 + localcount 3 + initscopedepth 5 + maxscopedepth 12 + trait slot QName(PackageInternalNs("tests"),"i") + slotid 1 + type null + end ; trait + trait slot QName(PackageInternalNs("tests"),"j") + slotid 2 + type null + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushundefined + coerce_a + setslot 2 + getscopeobject 1 + pushbyte 0 + coerce_a + setslot 1 + jump ofs0083 + ofs001c: + label + ofs001d: + getscopeobject 1 + pushbyte 0 + coerce_a + setslot 2 + jump ofs0039 + ofs0028: + label + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry2"),ProtectedNamespace("tests:TestWhileTry2"),StaticProtectedNs("tests:TestWhileTry2"),PrivateNamespace("TestWhileTry2.as$0")]) + pushstring "a" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry2"),ProtectedNamespace("tests:TestWhileTry2"),StaticProtectedNs("tests:TestWhileTry2"),PrivateNamespace("TestWhileTry2.as$0")]), 1 + getscopeobject 1 + getscopeobject 1 + getslot 2 + increment + setslot 2 + ofs0039: + getscopeobject 1 + getslot 2 + pushbyte 20 + iflt ofs0028 + ofs0043: + jump ofs0073 + ofs0047: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 0 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + popscope + kill 2 + jump ofs007a + jump ofs0073 + ofs005f: + getlocal0 + pushscope + getlocal1 + pushscope + newcatch 1 + dup + setlocal2 + dup + pushscope + swap + setslot 1 + popscope + kill 2 + jump ofs007a + ofs0073: + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry2"),ProtectedNamespace("tests:TestWhileTry2"),StaticProtectedNs("tests:TestWhileTry2"),PrivateNamespace("TestWhileTry2.as$0")]) + pushstring "after_try" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry2"),ProtectedNamespace("tests:TestWhileTry2"),StaticProtectedNs("tests:TestWhileTry2"),PrivateNamespace("TestWhileTry2.as$0")]), 1 + ofs007a: + getscopeobject 1 + getscopeobject 1 + getslot 1 + increment + setslot 1 + ofs0083: + getscopeobject 1 + getslot 1 + pushbyte 100 + iflt ofs001c + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry2"),ProtectedNamespace("tests:TestWhileTry2"),StaticProtectedNs("tests:TestWhileTry2"),PrivateNamespace("TestWhileTry2.as$0")]) + pushstring "end" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestWhileTry2"),ProtectedNamespace("tests:TestWhileTry2"),StaticProtectedNs("tests:TestWhileTry2"),PrivateNamespace("TestWhileTry2.as$0")]), 1 + returnvoid + end ; code + try from ofs001d to ofs0043 target ofs0047 type QName(PackageNamespace("flash.errors"),"EOFError") name QName(PackageNamespace(""),"e") end + try from ofs001d to ofs0043 target ofs005f type QName(PackageNamespace(""),"Error") name QName(PackageNamespace(""),"e") end + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestWhileTry2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestWhileTry2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as new file mode 100644 index 000000000..3c5fbf1fb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as @@ -0,0 +1,450 @@ +package tests +{ + public class TestXml + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestXml() + { + method + name "tests:TestXml/TestXml" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestXml/run" + flag NEED_ACTIVATION + returns QName(PackageNamespace(""),"void") + + body + maxstack 5 + localcount 7 + initscopedepth 5 + maxscopedepth 8 + trait slot QName(PackageInternalNs("tests"),"list") + slotid 1 + type TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) + end ; trait + trait slot QName(PackageInternalNs("tests"),"i") + slotid 2 + type QName(PackageNamespace(""),"int") + end ; trait + trait slot QName(PackageInternalNs("tests"),"g") + slotid 3 + type QName(PackageNamespace(""),"XML") + end ; trait + trait slot QName(PackageInternalNs("tests"),"testCdata") + slotid 4 + type QName(PackageNamespace(""),"XML") + end ; trait + trait slot QName(PackageInternalNs("tests"),"testComment") + slotid 5 + type QName(PackageNamespace(""),"XML") + end ; trait + trait slot QName(PackageInternalNs("tests"),"xtaga") + slotid 6 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"xtagb") + slotid 7 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"xattrname") + slotid 8 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"xattrval") + slotid 9 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"xcontent") + slotid 10 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"xxx") + slotid 11 + type QName(PackageNamespace(""),"XML") + end ; trait + trait slot QName(PackageInternalNs("tests"),"m") + slotid 12 + type QName(PackageNamespace(""),"XMLList") + end ; trait + trait slot QName(PackageInternalNs("tests"),"name") + slotid 13 + type QName(PackageNamespace(""),"String") + end ; trait + trait slot QName(PackageInternalNs("tests"),"myXML") + slotid 14 + type QName(PackageNamespace(""),"XML") + end ; trait + trait slot QName(PackageInternalNs("tests"),"k") + slotid 15 + type null + end ; trait + trait slot QName(PackageInternalNs("tests"),"all") + slotid 16 + type QName(PackageNamespace(""),"String") + end ; trait + + code + getlocal0 + pushscope + debug 1, "+$activation", 0, 0 + newactivation + dup + setlocal1 + pushscope + getscopeobject 1 + pushnull + coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) + setslot 1 + getscopeobject 1 + pushbyte 0 + setslot 2 + getscopeobject 1 + pushnull + coerce QName(PackageNamespace(""),"XML") + setslot 3 + getscopeobject 1 + pushnull + coerce QName(PackageNamespace(""),"XML") + setslot 4 + getscopeobject 1 + pushnull + coerce QName(PackageNamespace(""),"XML") + setslot 5 + getscopeobject 1 + pushnull + coerce_s + setslot 6 + getscopeobject 1 + pushnull + coerce_s + setslot 7 + getscopeobject 1 + pushnull + coerce_s + setslot 8 + getscopeobject 1 + pushnull + coerce_s + setslot 9 + getscopeobject 1 + pushnull + coerce_s + setslot 10 + getscopeobject 1 + pushnull + coerce QName(PackageNamespace(""),"XML") + setslot 11 + getscopeobject 1 + pushnull + coerce QName(PackageNamespace(""),"XMLList") + setslot 12 + getscopeobject 1 + pushstring "ahoj" + coerce_s + setslot 13 + getscopeobject 1 + getlex QName(PackageNamespace(""),"XML") + pushstring "\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t" + getscopeobject 1 + getslot 13 + esc_xelem + add + pushstring "\r\n\t\t\t\t\t\r\n\t\t\t\t" + add + construct 1 + coerce QName(PackageNamespace(""),"XML") + setslot 14 + getscopeobject 1 + getscopeobject 1 + getslot 14 + getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + coerce_a + setslot 15 + getscopeobject 1 + getscopeobject 1 + getslot 14 + getproperty MultinameA(null,[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + callproperty Multiname("toXMLString",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]), 0 + coerce_s + setslot 16 + getscopeobject 1 + getscopeobject 1 + getslot 14 + getproperty Multiname("book",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + coerce_a + setslot 15 + getscopeobject 1 + pushbyte 0 + setlocal3 + getscopeobject 1 + getslot 14 + getproperty Multiname("book",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + checkfilter + coerce_a + setlocal 4 + getlex QName(PackageNamespace(""),"XMLList") + pushstring "" + construct 1 + setlocal2 + jump ofs00d3 + ofs00b3: + label + getlocal 4 + getlocal3 + nextvalue + dup + setlocal 5 + dup + setlocal 6 + pushwith + getlex MultinameA("isbn",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + pushstring "12345" + equals + iffalse ofs00ce + getlocal2 + getlocal3 + getlocal 5 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + ofs00ce: + popscope + kill 6 + kill 5 + ofs00d3: + hasnext2 4, 3 + iftrue ofs00b3 + kill 4 + kill 3 + getlocal2 + kill 2 + coerce_a + setslot 15 + getscopeobject 1 + getlex QName(PackageNamespace("__AS3__.vec"),"Vector") + getlex QName(PackageNamespace(""),"int") + applytype 1 + construct 0 + coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) + setslot 1 + getscopeobject 1 + findpropstrict QName(PackageNamespace(""),"int") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + callproperty QName(PackageNamespace(""),"int"), 1 + convert_i + setslot 2 + getscopeobject 1 + getslot 1 + getscopeobject 1 + getslot 2 + pushbyte 0 + setlocal3 + getscopeobject 1 + getslot 14 + getproperty Multiname("book",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + checkfilter + coerce_a + setlocal 4 + getlex QName(PackageNamespace(""),"XMLList") + pushstring "" + construct 1 + setlocal2 + jump ofs0146 + ofs0121: + label + getlocal 4 + getlocal3 + nextvalue + dup + setlocal 5 + dup + setlocal 6 + pushwith + getlex MultinameA("isbn",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + getscopeobject 1 + getslot 2 + pushbyte 1 + add + equals + iffalse ofs0141 + getlocal2 + getlocal3 + getlocal 5 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + ofs0141: + popscope + kill 6 + kill 5 + ofs0146: + hasnext2 4, 3 + iftrue ofs0121 + kill 4 + kill 3 + getlocal2 + kill 2 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + getscopeobject 1 + getlex QName(PackageNamespace(""),"XML") + pushstring "" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setslot 3 + getscopeobject 1 + getlex QName(PackageNamespace(""),"XML") + pushstring "" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setslot 4 + getscopeobject 1 + getlex QName(PackageNamespace(""),"XML") + pushstring "" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setslot 5 + getscopeobject 1 + pushstring "a" + coerce_s + setslot 6 + getscopeobject 1 + pushstring "b" + coerce_s + setslot 7 + getscopeobject 1 + pushstring "attr" + coerce_s + setslot 8 + getscopeobject 1 + pushstring "value" + coerce_s + setslot 9 + getscopeobject 1 + pushstring "content" + coerce_s + setslot 10 + getscopeobject 1 + getlex QName(PackageNamespace(""),"XML") + pushstring "<" + getscopeobject 1 + getslot 6 + add + pushstring ">\r\n\{28} <" + add + getscopeobject 1 + getslot 7 + add + pushstring ">\r\n\{32} \r\n\{34} Item 1\{28} \r\n\{34} Item 2: " + add + getscopeobject 1 + getslot 10 + esc_xelem + add + pushstring "\r\n\{34} \r\n\{34} \r\n\{32} \r\n\{28} \r\n\{24} " + add + construct 1 + coerce QName(PackageNamespace(""),"XML") + setslot 11 + getscopeobject 1 + getscopeobject 1 + getslot 14 + getproperty Multiname(null,[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) + coerce QName(PackageNamespace(""),"XMLList") + setslot 12 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestXml",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestXml") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml2.as new file mode 100644 index 000000000..374a01e5d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml2.as @@ -0,0 +1,139 @@ +package tests +{ + public class TestXml2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestXml2() + { + method + name "tests:TestXml2/TestXml2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests:TestXml2/run" + returns null + + body + maxstack 2 + localcount 8 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "x1", 0, 13 + debug 1, "x2", 1, 14 + debug 1, "x3", 2, 20 + debug 1, "x4", 3, 33 + debug 1, "x5", 4, 34 + debug 1, "x_invalid", 5, 35 + debug 1, "a", 6, 36 + getlex QName(PackageNamespace(""),"XML") + pushstring "" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal1 + getlex QName(PackageNamespace(""),"XML") + pushstring "" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal2 + getlex QName(PackageNamespace(""),"XML") + pushstring "\r\n \r\n ampersand: &\r\n \r\n \r\n " + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal3 + getlex QName(PackageNamespace(""),"XML") + pushstring "\r\n \r\n A\r\n \r\n \r\n B\r\n \r\n \r\n \r\n\{24} C\r\n \r\n \r\n " + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal 4 + getlex QName(PackageNamespace(""),"XML") + pushstring "" + construct 1 + coerce QName(PackageNamespace(""),"XML") + setlocal 5 + findpropstrict QName(PackageNamespace(""),"XML") + pushstring "> invalid \"\n" + constructprop QName(PackageNamespace(""),"XML"), 1 + coerce QName(PackageNamespace(""),"XML") + setlocal 6 + pushbyte 5 + convert_i + setlocal 7 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml2"),ProtectedNamespace("tests:TestXml2"),StaticProtectedNs("tests:TestXml2"),PrivateNamespace("TestXml2.as$0")]) + pushstring "B" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml2"),ProtectedNamespace("tests:TestXml2"),StaticProtectedNs("tests:TestXml2"),PrivateNamespace("TestXml2.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestXml2",[PackageNamespace("tests")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests"),"TestXml2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttribute.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttribute.as new file mode 100644 index 000000000..18b58fd27 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttribute.as @@ -0,0 +1,73 @@ +package tests_classes +{ + public class CollidingAttribute + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function CollidingAttribute() + { + method + name "tests_classes:CollidingAttribute/CollidingAttribute" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("CollidingAttribute",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"CollidingAttribute") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttribute2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttribute2.as new file mode 100644 index 000000000..79a0f0b73 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttribute2.as @@ -0,0 +1,73 @@ +package tests_classes +{ + public class CollidingAttribute2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function CollidingAttribute2() + { + method + name "tests_classes:CollidingAttribute2/CollidingAttribute2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("CollidingAttribute2",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"CollidingAttribute2") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttributeParent.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttributeParent.as new file mode 100644 index 000000000..055a7f8e8 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingAttributeParent.as @@ -0,0 +1,75 @@ +package tests_classes +{ + public class CollidingAttributeParent + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var CollidingAttribute2:int = 5; + + public function CollidingAttributeParent() + { + method + name "tests_classes:CollidingAttributeParent/CollidingAttributeParent" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("CollidingAttributeParent",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"CollidingAttributeParent") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingMethod.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingMethod.as new file mode 100644 index 000000000..9d8ba2cf2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/CollidingMethod.as @@ -0,0 +1,73 @@ +package tests_classes +{ + public class CollidingMethod + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function CollidingMethod() + { + method + name "tests_classes:CollidingMethod/CollidingMethod" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("CollidingMethod",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"CollidingMethod") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestCollidingTraitNames.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestCollidingTraitNames.as new file mode 100644 index 000000000..ab5a29a9e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestCollidingTraitNames.as @@ -0,0 +1,132 @@ +package tests_classes +{ + public class TestCollidingTraitNames extends CollidingAttributeParent + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var CollidingAttribute:tests_classes.CollidingAttribute; + + public function TestCollidingTraitNames() + { + method + name "tests_classes:TestCollidingTraitNames/TestCollidingTraitNames" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function test() : void + { + trait method QName(PackageNamespace(""),"test") + dispid 0 + method + name "tests_classes:TestCollidingTraitNames/test" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 2 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + debug 1, "t", 0, 15 + pushnull + coerce QName(PackageNamespace("tests_classes"),"CollidingAttribute2") + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + + public function CollidingMethod() : void + { + trait method QName(PackageNamespace(""),"CollidingMethod") + dispid 0 + method + name "tests_classes:TestCollidingTraitNames/CollidingMethod" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 2 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + debug 1, "t", 0, 20 + pushnull + coerce QName(PackageNamespace("tests_classes"),"CollidingMethod") + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 4 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestCollidingTraitNames",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace("tests_classes"),"CollidingAttributeParent") + pushscope + getlex QName(PackageNamespace("tests_classes"),"CollidingAttributeParent") + newclass 0 + popscope + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestCollidingTraitNames") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestConvertParent.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestConvertParent.as new file mode 100644 index 000000000..7f55b04bc --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestConvertParent.as @@ -0,0 +1,80 @@ +package tests_classes +{ + public class TestConvertParent + { + + protected static var sprot:int = 6; + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + findproperty QName(StaticProtectedNs("tests_classes:TestConvertParent"),"sprot") + pushbyte 6 + setproperty QName(StaticProtectedNs("tests_classes:TestConvertParent"),"sprot") + returnvoid + end ; code + end ; body + end ; method + + protected var prot:int = 5; + + public function TestConvertParent() + { + method + name "tests_classes:TestConvertParent/TestConvertParent" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestConvertParent",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestConvertParent") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestImports.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestImports.as new file mode 100644 index 000000000..d210af3dd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestImports.as @@ -0,0 +1,115 @@ +package tests_classes +{ + import tests_classes.myjson.JSON; + import tests_classes.myjson2.JSON; + + public class TestImports + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestImports() + { + method + name "tests_classes:TestImports/TestImports" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_classes:TestImports/run" + returns null + + body + maxstack 2 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "j1", 0, 16 + debug 1, "j2", 1, 17 + findpropstrict QName(PackageNamespace("tests_classes.myjson"),"JSON") + constructprop QName(PackageNamespace("tests_classes.myjson"),"JSON"), 0 + coerce QName(PackageNamespace("tests_classes.myjson"),"JSON") + setlocal1 + findpropstrict QName(PackageNamespace("tests_classes.myjson2"),"JSON") + constructprop QName(PackageNamespace("tests_classes.myjson2"),"JSON"), 0 + coerce QName(PackageNamespace("tests_classes.myjson2"),"JSON") + setlocal2 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestImports"),ProtectedNamespace("tests_classes:TestImports"),StaticProtectedNs("tests_classes:TestImports"),PrivateNamespace("TestImports.as$0")]) + getlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestImports"),ProtectedNamespace("tests_classes:TestImports"),StaticProtectedNs("tests_classes:TestImports"),PrivateNamespace("TestImports.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestImports"),ProtectedNamespace("tests_classes:TestImports"),StaticProtectedNs("tests_classes:TestImports"),PrivateNamespace("TestImports.as$0")]) + getlocal2 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestImports"),ProtectedNamespace("tests_classes:TestImports"),StaticProtectedNs("tests_classes:TestImports"),PrivateNamespace("TestImports.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestImports",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestImports") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestImports2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestImports2.as new file mode 100644 index 000000000..d17727218 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestImports2.as @@ -0,0 +1,103 @@ +package tests_classes +{ + import tests_classes.myjson.JSON; + + public class TestImports2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestImports2() + { + method + name "tests_classes:TestImports2/TestImports2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_classes:TestImports2/run" + returns null + + body + maxstack 1 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "j", 0, 15 + findpropstrict QName(PackageNamespace("tests_classes.myjson"),"JSON") + constructprop QName(PackageNamespace("tests_classes.myjson"),"JSON"), 0 + coerce QName(PackageNamespace("tests_classes.myjson"),"JSON") + setlocal1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestImports2",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestImports2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestInitializer.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestInitializer.as new file mode 100644 index 000000000..f674b94d3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestInitializer.as @@ -0,0 +1,153 @@ +package tests_classes +{ + public class TestInitializer + { + + public static var s_alpha:RegExp; + + public static var s_numbers:RegExp; + + public static var s_regs:Array; + + method + name "" + returns null + + body + maxstack 3 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace(""),"s_alpha") + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[a-z]+" + construct 1 + setproperty QName(PackageNamespace(""),"s_alpha") + findproperty QName(PackageNamespace(""),"s_numbers") + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[0-9]+" + construct 1 + setproperty QName(PackageNamespace(""),"s_numbers") + findproperty QName(PackageNamespace(""),"s_regs") + getlex QName(PackageNamespace(""),"s_alpha") + getlex QName(PackageNamespace(""),"s_numbers") + newarray 2 + setproperty QName(PackageNamespace(""),"s_regs") + returnvoid + end ; code + end ; body + end ; method + + public var i_email:RegExp; + + public var i_link:RegExp; + + public var i_regs:Array; + + public var i_a:int = 1; + + public var i_b:int; + + public const i_c:int; + + public var i_d:int; + + public function TestInitializer(p:int) + { + method + name "tests_classes:TestInitializer/TestInitializer" + param QName(PackageNamespace(""),"int") + returns null + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + getlex QName(PackageNamespace(""),"RegExp") + pushstring ".*@.*\\..*" + construct 1 + setproperty QName(PackageNamespace(""),"i_email") + getlocal0 + getlex QName(PackageNamespace(""),"RegExp") + pushstring "" + construct 1 + setproperty QName(PackageNamespace(""),"i_link") + getlocal0 + getlocal0 + getproperty QName(PackageNamespace(""),"i_email") + getlocal0 + getproperty QName(PackageNamespace(""),"i_link") + newarray 2 + setproperty QName(PackageNamespace(""),"i_regs") + getlocal0 + getlocal0 + getproperty QName(PackageNamespace(""),"i_a") + pushbyte 1 + add + setproperty QName(PackageNamespace(""),"i_b") + getlocal0 + getlocal0 + getproperty QName(PackageNamespace(""),"i_a") + getlocal0 + getproperty QName(PackageNamespace(""),"i_b") + add + pushbyte 1 + add + initproperty QName(PackageNamespace(""),"i_c") + debug 1, "p", 0, 0 + getlocal0 + constructsuper 0 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestInitializer"),ProtectedNamespace("tests_classes:TestInitializer"),StaticProtectedNs("tests_classes:TestInitializer"),PrivateNamespace("TestInitializer.as$0")]) + getlex QName(PackageNamespace(""),"s_regs") + pushbyte 1 + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestInitializer"),ProtectedNamespace("tests_classes:TestInitializer"),StaticProtectedNs("tests_classes:TestInitializer"),PrivateNamespace("TestInitializer.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestInitializer"),ProtectedNamespace("tests_classes:TestInitializer"),StaticProtectedNs("tests_classes:TestInitializer"),PrivateNamespace("TestInitializer.as$0")]), 1 + getlocal0 + pushbyte 7 + setproperty QName(PackageNamespace(""),"i_a") + getlocal0 + getlocal1 + setproperty QName(PackageNamespace(""),"i_d") + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInitializer",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestInitializer") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestModifiers.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestModifiers.as new file mode 100644 index 000000000..c414a0fa6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestModifiers.as @@ -0,0 +1,415 @@ +package tests_classes +{ + import tests_other.myInternal; + import tests_other.myInternal2; + + use namespace myInternal; + use namespace myInternal2; + + public class TestModifiers + { + + private static var attr_stat_private:int = 1; + + public static var attr_stat_public:int = 2; + + internal static var attr_stat_internal:int = 3; + + protected static var attr_stat_protected:int = 4; + + myInternal static var attr_stat_namespace_explicit:int = 5; + + myInternal2 static var attr_stat_namespace_implicit:int = 6; + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + findproperty QName(PrivateNamespace("tests_classes:TestModifiers"),"attr_stat_private") + pushbyte 1 + setproperty QName(PrivateNamespace("tests_classes:TestModifiers"),"attr_stat_private") + findproperty QName(PackageNamespace(""),"attr_stat_public") + pushbyte 2 + setproperty QName(PackageNamespace(""),"attr_stat_public") + findproperty QName(PackageInternalNs("tests_classes"),"attr_stat_internal") + pushbyte 3 + setproperty QName(PackageInternalNs("tests_classes"),"attr_stat_internal") + findproperty QName(StaticProtectedNs("tests_classes:TestModifiers"),"attr_stat_protected") + pushbyte 4 + setproperty QName(StaticProtectedNs("tests_classes:TestModifiers"),"attr_stat_protected") + findproperty QName(Namespace("http://www.adobe.com/2006/actionscript/examples"),"attr_stat_namespace_explicit") + pushbyte 5 + setproperty QName(Namespace("http://www.adobe.com/2006/actionscript/examples"),"attr_stat_namespace_explicit") + findproperty QName(PackageInternalNs("tests_other:myInternal2"),"attr_stat_namespace_implicit") + pushbyte 6 + setproperty QName(PackageInternalNs("tests_other:myInternal2"),"attr_stat_namespace_implicit") + returnvoid + end ; code + end ; body + end ; method + + private var attr_inst_private:int = 7; + + public var attr_inst_public:int = 8; + + internal var attr_inst_internal:int = 9; + + protected var attr_inst_protected:int = 10; + + myInternal var attr_inst_namespace_explicit:int = 11; + + myInternal2 var attr_inst_namespace_implicit:int = 12; + + public function TestModifiers() + { + method + name "tests_classes:TestModifiers/TestModifiers" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + private static function func_stat_private() : int + { + trait method QName(PrivateNamespace("tests_classes:TestModifiers"),"func_stat_private") + flag FINAL + dispid 3 + method + name "tests_classes:TestModifiers/private/func_stat_private" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushbyte 1 + returnvalue + end ; code + end ; body + end ; method + } + + public static function func_stat_public() : int + { + trait method QName(PackageNamespace(""),"func_stat_public") + flag FINAL + dispid 4 + method + name "tests_classes:TestModifiers/func_stat_public" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushbyte 2 + returnvalue + end ; code + end ; body + end ; method + } + + internal static function func_stat_internal() : int + { + trait method QName(PackageInternalNs("tests_classes"),"func_stat_internal") + flag FINAL + dispid 5 + method + name "tests_classes:TestModifierstests_classes/func_stat_internal" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushbyte 3 + returnvalue + end ; code + end ; body + end ; method + } + + protected static function func_stat_protected() : int + { + trait method QName(StaticProtectedNs("tests_classes:TestModifiers"),"func_stat_protected") + flag FINAL + dispid 6 + method + name "tests_classes:TestModifiers/protected/func_stat_protected" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushbyte 4 + returnvalue + end ; code + end ; body + end ; method + } + + myInternal static function func_stat_namespace_explicit() : int + { + trait method QName(Namespace("http://www.adobe.com/2006/actionscript/examples"),"func_stat_namespace_explicit") + flag FINAL + dispid 7 + method + name "tests_classes:TestModifiersmyInternal/func_stat_namespace_explicit" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushbyte 5 + returnvalue + end ; code + end ; body + end ; method + } + + myInternal2 static function func_stat_namespace_implicit() : int + { + trait method QName(PackageInternalNs("tests_other:myInternal2"),"func_stat_namespace_implicit") + flag FINAL + dispid 8 + method + name "tests_classes:TestModifiersmyInternal2/func_stat_namespace_implicit" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushbyte 6 + returnvalue + end ; code + end ; body + end ; method + } + + private function func_inst_private() : int + { + trait method QName(PrivateNamespace("tests_classes:TestModifiers"),"func_inst_private") + dispid 0 + method + name "tests_classes:TestModifiers/private/func_inst_private" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 7 + returnvalue + end ; code + end ; body + end ; method + } + + public function func_inst_public() : int + { + trait method QName(PackageNamespace(""),"func_inst_public") + dispid 0 + method + name "tests_classes:TestModifiers/func_inst_public" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 8 + returnvalue + end ; code + end ; body + end ; method + } + + internal function func_inst_internal() : int + { + trait method QName(PackageInternalNs("tests_classes"),"func_inst_internal") + dispid 0 + method + name "tests_classes:TestModifierstests_classes/func_inst_internal" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 9 + returnvalue + end ; code + end ; body + end ; method + } + + protected function func_inst_protected() : int + { + trait method QName(ProtectedNamespace("tests_classes:TestModifiers"),"func_inst_protected") + dispid 0 + method + name "tests_classes:TestModifiers/protected/func_inst_protected" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 10 + returnvalue + end ; code + end ; body + end ; method + } + + myInternal function func_inst_namespace_explicit() : int + { + trait method QName(Namespace("http://www.adobe.com/2006/actionscript/examples"),"func_inst_namespace_explicit") + dispid 0 + method + name "tests_classes:TestModifiersmyInternal/func_inst_namespace_explicit" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 11 + returnvalue + end ; code + end ; body + end ; method + } + + myInternal2 function func_inst_namespace_implicit() : int + { + trait method QName(PackageInternalNs("tests_other:myInternal2"),"func_inst_namespace_implicit") + dispid 0 + method + name "tests_classes:TestModifiersmyInternal2/func_inst_namespace_implicit" + returns QName(PackageNamespace(""),"int") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushbyte 12 + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestModifiers",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestModifiers") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestRegexpHilight.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestRegexpHilight.as new file mode 100644 index 000000000..ec3c1926c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestRegexpHilight.as @@ -0,0 +1,126 @@ +package tests_classes +{ + public class TestRegexpHilight + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestRegexpHilight() + { + method + name "tests_classes:TestRegexpHilight/TestRegexpHilight" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_classes:TestRegexpHilight/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 3 + localcount 5 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "myregexp", 0, 13 + debug 1, "a", 1, 14 + debug 1, "b", 2, 15 + debug 1, "notaregexp", 3, 16 + getlex QName(PackageNamespace(""),"RegExp") + pushstring "[a-z0-9_]+" + construct 1 + coerce QName(PackageNamespace(""),"RegExp") + setlocal1 + pushbyte 10 + convert_d + setlocal2 + pushbyte 20 + convert_d + setlocal3 + getlocal2 + getlocal3 + divide + getlocal3 + getlocal2 + divide + add + convert_d + setlocal 4 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestRegexpHilight"),ProtectedNamespace("tests_classes:TestRegexpHilight"),StaticProtectedNs("tests_classes:TestRegexpHilight"),PrivateNamespace("TestRegexpHilight.as$0")]) + getlocal1 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestRegexpHilight"),ProtectedNamespace("tests_classes:TestRegexpHilight"),StaticProtectedNs("tests_classes:TestRegexpHilight"),PrivateNamespace("TestRegexpHilight.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestRegexpHilight"),ProtectedNamespace("tests_classes:TestRegexpHilight"),StaticProtectedNs("tests_classes:TestRegexpHilight"),PrivateNamespace("TestRegexpHilight.as$0")]) + getlocal 4 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestRegexpHilight"),ProtectedNamespace("tests_classes:TestRegexpHilight"),StaticProtectedNs("tests_classes:TestRegexpHilight"),PrivateNamespace("TestRegexpHilight.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestRegexpHilight",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestRegexpHilight") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestScriptInitializer.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestScriptInitializer.as new file mode 100644 index 000000000..24a51529b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestScriptInitializer.as @@ -0,0 +1,291 @@ +package tests_classes +{ + import tests.TestHello; + + public class TestScriptInitializer + { + + private static var sv:int; + + private static var sa:int = 5; + + private static const sc:int; + + private static var sb:int; + + method + name "" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + pushbyte 5 + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sc") + getlex QName(PackageNamespace(""),"Math") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 50 + multiply + callproperty QName(PackageNamespace(""),"floor"), 1 + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + add + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"x") + add + initproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sc") + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + pushbyte 20 + add + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 10 + multiply + pushbyte 5 + ifnge ofs0043 + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + pushbyte 100 + add + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + jump ofs004d + ofs0043: + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + pushshort 200 + add + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sa") + ofs004d: + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + pushbyte 100 + ifngt ofs0062 + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + pushbyte 10 + add + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + jump ofs006b + ofs0062: + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + pushbyte 20 + add + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sb") + ofs006b: + pushbyte 0 + setlocal1 + pushbyte 1 + pushbyte 3 + pushbyte 5 + newarray 3 + coerce_a + setlocal2 + jump ofs008b + ofs007c: + label + findproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sv") + getlocal2 + getlocal1 + nextvalue + setproperty QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sv") + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestScriptInitializer"),ProtectedNamespace("tests_classes:TestScriptInitializer"),StaticProtectedNs("tests_classes:TestScriptInitializer"),PrivateNamespace("TestScriptInitializer.as$0")]) + getlex QName(PrivateNamespace("tests_classes:TestScriptInitializer"),"sv") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestScriptInitializer"),ProtectedNamespace("tests_classes:TestScriptInitializer"),StaticProtectedNs("tests_classes:TestScriptInitializer"),PrivateNamespace("TestScriptInitializer.as$0")]), 1 + ofs008b: + hasnext2 2, 1 + iftrue ofs007c + kill 2 + kill 1 + returnvoid + end ; code + end ; body + end ; method + + public function TestScriptInitializer() + { + method + name "tests_classes:TestScriptInitializer/TestScriptInitializer" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function test() : void + { + trait method QName(PackageNamespace(""),"test") + dispid 0 + method + name "tests_classes:TestScriptInitializer/test" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "x", 0, 44 + debug 1, "th", 1, 45 + pushbyte 5 + convert_i + setlocal1 + findpropstrict QName(PackageNamespace("tests"),"TestHello") + constructprop QName(PackageNamespace("tests"),"TestHello"), 0 + coerce QName(PackageNamespace("tests"),"TestHello") + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + import tests.TestHello; + + var v:int; + + var x:int; + + var a:int = 5; + + const c:int; + + var b:int; + + method + name "" + returns null + + body + maxstack 4 + localcount 3 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestScriptInitializer",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestScriptInitializer") + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"x") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 100 + multiply + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"x") + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + pushbyte 5 + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 10 + multiply + pushbyte 5 + ifnge ofs003b + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + pushbyte 100 + add + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + jump ofs0045 + ofs003b: + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + pushshort 200 + add + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + ofs0045: + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"c") + getlex QName(PackageNamespace(""),"Math") + getlex QName(PackageNamespace(""),"Math") + callproperty QName(PackageNamespace(""),"random"), 0 + pushbyte 50 + multiply + callproperty QName(PackageNamespace(""),"floor"), 1 + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + add + initproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"c") + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"a") + pushbyte 20 + add + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + pushbyte 100 + ifngt ofs0077 + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + pushbyte 10 + add + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + jump ofs0080 + ofs0077: + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + pushbyte 20 + add + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"b") + ofs0080: + pushbyte 0 + setlocal1 + pushbyte 1 + pushbyte 3 + pushbyte 5 + newarray 3 + coerce_a + setlocal2 + jump ofs00a0 + ofs0091: + label + findproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"v") + getlocal2 + getlocal1 + nextvalue + setproperty QName(PrivateNamespace("TestScriptInitializer.as$0"),"v") + findpropstrict QName(PackageNamespace(""),"trace") + getlex QName(PrivateNamespace("TestScriptInitializer.as$0"),"v") + callpropvoid QName(PackageNamespace(""),"trace"), 1 + ofs00a0: + hasnext2 2, 1 + iftrue ofs0091 + kill 2 + kill 1 + getlex QName(PackageNamespace("tests"),"TestHello") + pop + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestSubClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestSubClass.as new file mode 100644 index 000000000..b366eaf18 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestSubClass.as @@ -0,0 +1,165 @@ +package tests_classes +{ + public class TestSubClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestSubClass() + { + method + name "tests_classes:TestSubClass/TestSubClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : * + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_classes:TestSubClass/run" + returns null + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "sc", 0, 13 + findpropstrict QName(PrivateNamespace("TestSubClass.as$0"),"SubClass") + constructprop QName(PrivateNamespace("TestSubClass.as$0"),"SubClass"), 0 + coerce QName(PrivateNamespace("TestSubClass.as$0"),"SubClass") + setlocal1 + getlocal1 + pushbyte 1 + setproperty Multiname("a_internal",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestSubClass"),ProtectedNamespace("tests_classes:TestSubClass"),StaticProtectedNs("tests_classes:TestSubClass"),PrivateNamespace("TestSubClass.as$0")]) + getlocal1 + pushbyte 3 + setproperty Multiname("c_public",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestSubClass"),ProtectedNamespace("tests_classes:TestSubClass"),StaticProtectedNs("tests_classes:TestSubClass"),PrivateNamespace("TestSubClass.as$0")]) + returnvoid + end ; code + end ; body + end ; method + } + } + } + + class SubClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + internal var a_internal:int; + + private var b_private:int; + + public var c_public:int; + + public function SubClass() + { + method + name "TestSubClass.as$0:SubClass/SubClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestSubClass",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestSubClass") + findpropstrict Multiname("SubClass",[PrivateNamespace("TestSubClass.as$0")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 1 + popscope + initproperty QName(PrivateNamespace("TestSubClass.as$0"),"SubClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestThisOutsideClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestThisOutsideClass.as new file mode 100644 index 000000000..18da98b0d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/TestThisOutsideClass.as @@ -0,0 +1,142 @@ +package tests_classes +{ + public class TestThisOutsideClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var attrib:int = 0; + + public function TestThisOutsideClass() + { + method + name "tests_classes:TestThisOutsideClass/TestThisOutsideClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_classes:TestThisOutsideClass/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 3 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlex QName(PrivateNamespace("TestThisOutsideClass.as$0"),"helperFunc") + getlocal0 + pushstring "hello" + callpropvoid Multiname("call",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PrivateNamespace("tests_classes:TestThisOutsideClass"),ProtectedNamespace("tests_classes:TestThisOutsideClass"),StaticProtectedNs("tests_classes:TestThisOutsideClass"),PrivateNamespace("TestThisOutsideClass.as$0")]), 2 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + function helperFunc(a:String) : void + { + trait method QName(PrivateNamespace("TestThisOutsideClass.as$0"),"helperFunc") + dispid 3 + method + name "/helperFunc" + param QName(PackageNamespace(""),"String") + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 4 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + debug 1, "a", 0, 0 + findpropstrict QName(PackageNamespace(""),"trace") + getlocal1 + callpropvoid QName(PackageNamespace(""),"trace"), 1 + getlocal0 + dup + setlocal2 + getproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PrivateNamespace("TestThisOutsideClass.as$0")]) + convert_d + increment + setlocal3 + getlocal2 + getlocal3 + setproperty Multiname("attrib",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes"),PackageInternalNs("tests_classes"),PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PrivateNamespace("TestThisOutsideClass.as$0")]) + kill 3 + kill 2 + returnvoid + end ; code + end ; body + end ; method + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestThisOutsideClass",[PackageNamespace("tests_classes")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes"),"TestThisOutsideClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/initializedconst.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/initializedconst.as new file mode 100644 index 000000000..f27443266 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/initializedconst.as @@ -0,0 +1,32 @@ +package tests_classes +{ + public const initializedconst:Object; +} + +method + name "" + returns null + + body + maxstack 7 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace("tests_classes"),"initializedconst") + pushstring "a" + pushbyte 1 + pushstring "b" + pushbyte 2 + pushstring "c" + pushbyte 3 + newobject 3 + initproperty QName(PackageNamespace("tests_classes"),"initializedconst") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/initializedvar.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/initializedvar.as new file mode 100644 index 000000000..5da5743f3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/initializedvar.as @@ -0,0 +1,32 @@ +package tests_classes +{ + public var initializedvar:Object; +} + +method + name "" + returns null + + body + maxstack 7 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace("tests_classes"),"initializedvar") + pushstring "a" + pushbyte 1 + pushstring "b" + pushbyte 2 + pushstring "c" + pushbyte 3 + newobject 3 + setproperty QName(PackageNamespace("tests_classes"),"initializedvar") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myconst.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myconst.as new file mode 100644 index 000000000..10d96869d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myconst.as @@ -0,0 +1,26 @@ +package tests_classes +{ + public const myconst:int = 29; +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace("tests_classes"),"myconst") + pushbyte 29 + initproperty QName(PackageNamespace("tests_classes"),"myconst") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myjson/JSON.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myjson/JSON.as new file mode 100644 index 000000000..70a949550 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myjson/JSON.as @@ -0,0 +1,73 @@ +package tests_classes.myjson +{ + public class JSON + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function JSON() + { + method + name "tests_classes.myjson:JSON/JSON" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("JSON",[PackageNamespace("tests_classes.myjson")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.myjson"),"JSON") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myjson2/JSON.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myjson2/JSON.as new file mode 100644 index 000000000..8191673d2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myjson2/JSON.as @@ -0,0 +1,73 @@ +package tests_classes.myjson2 +{ + public class JSON + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function JSON() + { + method + name "tests_classes.myjson2:JSON/JSON" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("JSON",[PackageNamespace("tests_classes.myjson2")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.myjson2"),"JSON") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/SetupMyPackage1.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/SetupMyPackage1.as new file mode 100644 index 000000000..959156e35 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/SetupMyPackage1.as @@ -0,0 +1,73 @@ +package tests_classes.mypackage1 +{ + public class SetupMyPackage1 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function SetupMyPackage1() + { + method + name "tests_classes.mypackage1:SetupMyPackage1/SetupMyPackage1" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("SetupMyPackage1",[PackageNamespace("tests_classes.mypackage1")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage1"),"SetupMyPackage1") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass.as new file mode 100644 index 000000000..5dadb7de0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass.as @@ -0,0 +1,234 @@ +package tests_classes.mypackage1 +{ + import tests_classes.mypackage2.TestClass; + import tests_classes.mypackage2.TestInterface; + + public class TestClass implements tests_classes.mypackage1.TestInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestClass() + { + method + name "tests_classes.mypackage1:TestClass/TestClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function testCall() : String + { + trait method QName(PackageNamespace(""),"testCall") + dispid 0 + method + name "tests_classes.mypackage1:TestClass/testCall" + returns QName(PackageNamespace(""),"String") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PrivateNamespace("tests_classes.mypackage1:TestClass"),ProtectedNamespace("tests_classes.mypackage1:TestClass"),StaticProtectedNs("tests_classes.mypackage1:TestClass"),PrivateNamespace("TestClass.as$0")]) + pushstring "pkg1hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PrivateNamespace("tests_classes.mypackage1:TestClass"),ProtectedNamespace("tests_classes.mypackage1:TestClass"),StaticProtectedNs("tests_classes.mypackage1:TestClass"),PrivateNamespace("TestClass.as$0")]), 1 + pushstring "pkg1hello" + returnvalue + end ; code + end ; body + end ; method + } + + public function testMethod1() : void + { + trait method QName(PackageNamespace(""),"testMethod1") + dispid 0 + method + name "tests_classes.mypackage1:TestClass/testMethod1" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 22 + debug 1, "b", 1, 24 + getlocal0 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + setlocal1 + getlocal1 + callpropvoid Multiname("testMethod1",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PrivateNamespace("tests_classes.mypackage1:TestClass"),ProtectedNamespace("tests_classes.mypackage1:TestClass"),StaticProtectedNs("tests_classes.mypackage1:TestClass"),PrivateNamespace("TestClass.as$0")]), 0 + getlocal0 + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + setlocal2 + findpropstrict QName(PackageNamespace("tests_classes.mypackage2"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage2"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + + public function testMethod2() : void + { + trait method QName(PackageNamespace(""),"testMethod2") + dispid 0 + method + name "tests_classes.mypackage1:TestClass/testMethod2" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 3 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 30 + debug 1, "b", 1, 32 + getlocal0 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + setlocal1 + getlocal1 + callpropvoid Multiname("testMethod1",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PrivateNamespace("tests_classes.mypackage1:TestClass"),ProtectedNamespace("tests_classes.mypackage1:TestClass"),StaticProtectedNs("tests_classes.mypackage1:TestClass"),PrivateNamespace("TestClass.as$0")]), 0 + getlocal0 + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + setlocal2 + findpropstrict QName(PackageNamespace("tests_classes.mypackage2"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage2"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + setlocal2 + returnvoid + end ; code + end ; body + end ; method + } + + public function testParam(p1:tests_classes.mypackage1.TestInterface, p2:tests_classes.mypackage2.TestInterface) : void + { + trait method QName(PackageNamespace(""),"testParam") + dispid 0 + method + name "tests_classes.mypackage1:TestClass/testParam" + flag NEED_ACTIVATION + param QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + param QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 4 + initscopedepth 5 + maxscopedepth 7 + trait slot QName(PackageInternalNs("tests_classes.mypackage1"),"p1") + slotid 1 + type QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + end ; trait + trait slot QName(PackageInternalNs("tests_classes.mypackage1"),"p2") + slotid 2 + type QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + end ; trait + trait slot QName(PackageInternalNs("tests_classes.mypackage1"),"m") + slotid 3 + type QName(PackageNamespace(""),"Function") + end ; trait + + code + getlocal0 + pushscope + debug 1, "p1", 0, 0 + debug 1, "p2", 1, 0 + debug 1, "+$activation", 2, 0 + newactivation + dup + setlocal3 + pushscope + getscopeobject 1 + getlocal1 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + setslot 1 + getscopeobject 1 + getlocal2 + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + setslot 2 + getscopeobject 1 + newfunction 5 + coerce QName(PackageNamespace(""),"Function") + setslot 3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass",[PackageNamespace("tests_classes.mypackage1")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass2.as new file mode 100644 index 000000000..ce8e8653c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass2.as @@ -0,0 +1,429 @@ +package tests_classes.mypackage1 +{ + import tests_classes.mypackage2.TestClass; + import tests_classes.mypackage3.TestClass; + + use namespace myNamespace; + + public class TestClass2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestClass2() + { + method + name "tests_classes.mypackage1:TestClass2/TestClass2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + myNamespace static function testCall5() : String + { + trait method QName(Namespace("https://www.free-decompiler.com/flash/test/namespace"),"testCall5") + flag FINAL + dispid 3 + method + name "tests_classes.mypackage1:TestClass2myNamespace/testCall5" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushstring "x" + returnvalue + end ; code + end ; body + end ; method + } + + protected static function testCall5() : String + { + trait method QName(StaticProtectedNs("tests_classes.mypackage1:TestClass2"),"testCall5") + flag FINAL + dispid 4 + method + name "tests_classes.mypackage1:TestClass2/protected/testCall5" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + pushstring "5" + returnvalue + end ; code + end ; body + end ; method + } + + public function testCall() : String + { + trait method QName(PackageNamespace(""),"testCall") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2/testCall" + returns QName(PackageNamespace(""),"String") + + body + maxstack 3 + localcount 6 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 28 + debug 1, "b", 1, 29 + debug 1, "c", 2, 30 + debug 1, "res", 3, 34 + pushnull + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + setlocal1 + pushnull + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestClass") + setlocal2 + pushnull + coerce QName(PackageNamespace("tests_classes.mypackage3"),"TestClass") + setlocal3 + findpropstrict QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage1"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_classes.mypackage1"),"TestClass") + setlocal1 + findpropstrict QName(PackageNamespace("tests_classes.mypackage2"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage2"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_classes.mypackage2"),"TestClass") + setlocal2 + findpropstrict QName(PackageNamespace("tests_classes.mypackage3"),"TestClass") + constructprop QName(PackageNamespace("tests_classes.mypackage3"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_classes.mypackage3"),"TestClass") + setlocal3 + getlocal1 + callproperty QName(PackageNamespace(""),"testCall"), 0 + getlocal2 + callproperty QName(PackageNamespace(""),"testCall"), 0 + add + getlocal3 + callproperty QName(PackageNamespace(""),"testCall"), 0 + add + getlocal0 + callproperty QName(PackageNamespace(""),"testCall2"), 0 + add + getlocal0 + callproperty QName(PrivateNamespace("tests_classes.mypackage1:TestClass2"),"testCall3"), 0 + add + getlocal0 + callproperty QName(ProtectedNamespace("tests_classes.mypackage1:TestClass2"),"testCall4"), 0 + add + findpropstrict QName(StaticProtectedNs("tests_classes.mypackage1:TestClass2"),"testCall5") + callproperty QName(StaticProtectedNs("tests_classes.mypackage1:TestClass2"),"testCall5"), 0 + add + getlocal0 + callproperty QName(PackageInternalNs("tests_classes.mypackage1"),"testCall6"), 0 + add + getlex QName(PackageNamespace("tests_classes.mypackage1"),"myNamespace") + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict RTQName("testCall3") + dup + setlocal 5 + getlex QName(PackageNamespace("tests_classes.mypackage1"),"myNamespace") + coerce QName(PackageNamespace(""),"Namespace") + getproperty RTQName("testCall3") + getlocal 5 + call 0 + kill 5 + add + coerce_s + setlocal 4 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PrivateNamespace("tests_classes.mypackage1:TestClass2"),ProtectedNamespace("tests_classes.mypackage1:TestClass2"),StaticProtectedNs("tests_classes.mypackage1:TestClass2"),PrivateNamespace("TestClass2.as$0")]) + getlocal 4 + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PrivateNamespace("tests_classes.mypackage1:TestClass2"),ProtectedNamespace("tests_classes.mypackage1:TestClass2"),StaticProtectedNs("tests_classes.mypackage1:TestClass2"),PrivateNamespace("TestClass2.as$0")]), 1 + getlocal 4 + returnvalue + end ; code + end ; body + end ; method + } + + myNamespace function testCall2() : String + { + trait method QName(Namespace("https://www.free-decompiler.com/flash/test/namespace"),"testCall2") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2myNamespace/testCall2" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "1" + returnvalue + end ; code + end ; body + end ; method + } + + myNamespace function testCall3() : String + { + trait method QName(Namespace("https://www.free-decompiler.com/flash/test/namespace"),"testCall3") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2myNamespace/testCall3" + returns QName(PackageNamespace(""),"String") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlex QName(PackageNamespace("tests_classes.mypackage1"),"myNamespace") + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict RTQName("testCall2") + dup + setlocal1 + getlex QName(PackageNamespace("tests_classes.mypackage1"),"myNamespace") + coerce QName(PackageNamespace(""),"Namespace") + getproperty RTQName("testCall2") + getlocal1 + call 0 + kill 1 + returnvalue + end ; code + end ; body + end ; method + } + + myNamespace function testCall4() : String + { + trait method QName(Namespace("https://www.free-decompiler.com/flash/test/namespace"),"testCall4") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2myNamespace/testCall4" + returns QName(PackageNamespace(""),"String") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlex QName(PackageNamespace("tests_classes.mypackage1"),"myNamespace") + coerce QName(PackageNamespace(""),"Namespace") + findpropstrict RTQName("testCall3") + dup + setlocal1 + getlex QName(PackageNamespace("tests_classes.mypackage1"),"myNamespace") + coerce QName(PackageNamespace(""),"Namespace") + getproperty RTQName("testCall3") + getlocal1 + call 0 + kill 1 + returnvalue + end ; code + end ; body + end ; method + } + + myNamespace function testCall6() : String + { + trait method QName(Namespace("https://www.free-decompiler.com/flash/test/namespace"),"testCall6") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2myNamespace/testCall6" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "y" + returnvalue + end ; code + end ; body + end ; method + } + + public function testCall2() : String + { + trait method QName(PackageNamespace(""),"testCall2") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2/testCall2" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "2" + returnvalue + end ; code + end ; body + end ; method + } + + private function testCall3() : String + { + trait method QName(PrivateNamespace("tests_classes.mypackage1:TestClass2"),"testCall3") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2/private/testCall3" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "3" + returnvalue + end ; code + end ; body + end ; method + } + + protected function testCall4() : String + { + trait method QName(ProtectedNamespace("tests_classes.mypackage1:TestClass2"),"testCall4") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2/protected/testCall4" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "4" + returnvalue + end ; code + end ; body + end ; method + } + + internal function testCall6() : String + { + trait method QName(PackageInternalNs("tests_classes.mypackage1"),"testCall6") + dispid 0 + method + name "tests_classes.mypackage1:TestClass2tests_classes.mypackage1/testCall6" + returns QName(PackageNamespace(""),"String") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + pushstring "6" + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass2",[PackageNamespace("tests_classes.mypackage1")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage1"),"TestClass2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass3.as new file mode 100644 index 000000000..86fb5bccf --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestClass3.as @@ -0,0 +1,115 @@ +package tests_classes.mypackage1 +{ + import flash.utils.Dictionary; + import tests_classes.mypackage2.*; + + public class TestClass3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var c:tests_classes.mypackage1.TestClass; + + public function TestClass3() + { + method + name "tests_classes.mypackage1:TestClass3/TestClass3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_classes.mypackage1:TestClass3/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 3 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 18 + findpropstrict QName(PackageNamespace("flash.utils"),"Dictionary") + constructprop QName(PackageNamespace("flash.utils"),"Dictionary"), 0 + coerce QName(PackageNamespace("flash.utils"),"Dictionary") + setlocal1 + getlocal1 + pushstring "test" + pushbyte 5 + setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PackageNamespace("tests_classes.mypackage2"),PrivateNamespace("tests_classes.mypackage1:TestClass3"),ProtectedNamespace("tests_classes.mypackage1:TestClass3"),StaticProtectedNs("tests_classes.mypackage1:TestClass3"),PrivateNamespace("TestClass3.as$0")]) + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PackageNamespace("tests_classes.mypackage2"),PrivateNamespace("tests_classes.mypackage1:TestClass3"),ProtectedNamespace("tests_classes.mypackage1:TestClass3"),StaticProtectedNs("tests_classes.mypackage1:TestClass3"),PrivateNamespace("TestClass3.as$0")]) + getlocal1 + pushstring "test" + getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PackageNamespace("tests_classes.mypackage2"),PrivateNamespace("tests_classes.mypackage1:TestClass3"),ProtectedNamespace("tests_classes.mypackage1:TestClass3"),StaticProtectedNs("tests_classes.mypackage1:TestClass3"),PrivateNamespace("TestClass3.as$0")]) + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage1"),PackageInternalNs("tests_classes.mypackage1"),PackageNamespace("tests_classes.mypackage2"),PrivateNamespace("tests_classes.mypackage1:TestClass3"),ProtectedNamespace("tests_classes.mypackage1:TestClass3"),StaticProtectedNs("tests_classes.mypackage1:TestClass3"),PrivateNamespace("TestClass3.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass3",[PackageNamespace("tests_classes.mypackage1")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage1"),"TestClass3") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestInterface.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestInterface.as new file mode 100644 index 000000000..1ada7ae93 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/TestInterface.as @@ -0,0 +1,51 @@ +package tests_classes.mypackage1 +{ + import tests_classes.mypackage2.TestInterface; + + public interface TestInterface extends tests_classes.mypackage2.TestInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + function testMethod1() : void; + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInterface",[PackageNamespace("tests_classes.mypackage1")]) + pushnull + newclass 0 + initproperty QName(PackageNamespace("tests_classes.mypackage1"),"TestInterface") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/myNamespace.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/myNamespace.as new file mode 100644 index 000000000..683db49fa --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage1/myNamespace.as @@ -0,0 +1,23 @@ +package tests_classes.mypackage1 +{ + public namespace myNamespace = "https://www.free-decompiler.com/flash/test/namespace"; +} + +method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/SetupMyPackage2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/SetupMyPackage2.as new file mode 100644 index 000000000..c898457c9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/SetupMyPackage2.as @@ -0,0 +1,73 @@ +package tests_classes.mypackage2 +{ + public class SetupMyPackage2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function SetupMyPackage2() + { + method + name "tests_classes.mypackage2:SetupMyPackage2/SetupMyPackage2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("SetupMyPackage2",[PackageNamespace("tests_classes.mypackage2")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage2"),"SetupMyPackage2") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/TestClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/TestClass.as new file mode 100644 index 000000000..6f2c72c09 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/TestClass.as @@ -0,0 +1,123 @@ +package tests_classes.mypackage2 +{ + public class TestClass implements TestInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestClass() + { + method + name "tests_classes.mypackage2:TestClass/TestClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function testCall() : String + { + trait method QName(PackageNamespace(""),"testCall") + dispid 0 + method + name "tests_classes.mypackage2:TestClass/testCall" + returns QName(PackageNamespace(""),"String") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage2"),PackageInternalNs("tests_classes.mypackage2"),PrivateNamespace("tests_classes.mypackage2:TestClass"),ProtectedNamespace("tests_classes.mypackage2:TestClass"),StaticProtectedNs("tests_classes.mypackage2:TestClass"),PrivateNamespace("TestClass.as$0")]) + pushstring "pkg2hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage2"),PackageInternalNs("tests_classes.mypackage2"),PrivateNamespace("tests_classes.mypackage2:TestClass"),ProtectedNamespace("tests_classes.mypackage2:TestClass"),StaticProtectedNs("tests_classes.mypackage2:TestClass"),PrivateNamespace("TestClass.as$0")]), 1 + pushstring "pkg2hello" + returnvalue + end ; code + end ; body + end ; method + } + + public function testMethod2() : void + { + trait method QName(PackageNamespace(""),"testMethod2") + dispid 0 + method + name "tests_classes.mypackage2:TestClass/testMethod2" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass",[PackageNamespace("tests_classes.mypackage2")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage2"),"TestClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/TestInterface.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/TestInterface.as new file mode 100644 index 000000000..107246911 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage2/TestInterface.as @@ -0,0 +1,49 @@ +package tests_classes.mypackage2 +{ + public interface TestInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 2 + maxscopedepth 3 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + function testMethod2() : void; + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInterface",[PackageNamespace("tests_classes.mypackage2")]) + pushnull + newclass 0 + initproperty QName(PackageNamespace("tests_classes.mypackage2"),"TestInterface") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/SetupMyPackage3.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/SetupMyPackage3.as new file mode 100644 index 000000000..6663f3c04 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/SetupMyPackage3.as @@ -0,0 +1,73 @@ +package tests_classes.mypackage3 +{ + public class SetupMyPackage3 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function SetupMyPackage3() + { + method + name "tests_classes.mypackage3:SetupMyPackage3/SetupMyPackage3" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("SetupMyPackage3",[PackageNamespace("tests_classes.mypackage3")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage3"),"SetupMyPackage3") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/TestClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/TestClass.as new file mode 100644 index 000000000..cb79170bb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/TestClass.as @@ -0,0 +1,100 @@ +package tests_classes.mypackage3 +{ + public class TestClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestClass() + { + method + name "tests_classes.mypackage3:TestClass/TestClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function testCall() : String + { + trait method QName(PackageNamespace(""),"testCall") + dispid 0 + method + name "tests_classes.mypackage3:TestClass/testCall" + returns QName(PackageNamespace(""),"String") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage3"),PackageInternalNs("tests_classes.mypackage3"),PrivateNamespace("tests_classes.mypackage3:TestClass"),ProtectedNamespace("tests_classes.mypackage3:TestClass"),StaticProtectedNs("tests_classes.mypackage3:TestClass"),PrivateNamespace("TestClass.as$0")]) + pushstring "pkg3hello" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_classes.mypackage3"),PackageInternalNs("tests_classes.mypackage3"),PrivateNamespace("tests_classes.mypackage3:TestClass"),ProtectedNamespace("tests_classes.mypackage3:TestClass"),StaticProtectedNs("tests_classes.mypackage3:TestClass"),PrivateNamespace("TestClass.as$0")]), 1 + pushstring "pkg3hello" + returnvalue + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass",[PackageNamespace("tests_classes.mypackage3")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_classes.mypackage3"),"TestClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/TestInterface.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/TestInterface.as new file mode 100644 index 000000000..17d30732b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/mypackage3/TestInterface.as @@ -0,0 +1,49 @@ +package tests_classes.mypackage3 +{ + public interface TestInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 2 + maxscopedepth 3 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + function testMethod3() : void; + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInterface",[PackageNamespace("tests_classes.mypackage3")]) + pushnull + newclass 0 + initproperty QName(PackageNamespace("tests_classes.mypackage3"),"TestInterface") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myvar.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myvar.as new file mode 100644 index 000000000..15d03b055 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_classes/myvar.as @@ -0,0 +1,26 @@ +package tests_classes +{ + public var myvar:int = 10; +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findproperty QName(PackageNamespace("tests_classes"),"myvar") + pushbyte 10 + setproperty QName(PackageNamespace("tests_classes"),"myvar") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_edit/TestPropertyCoerce.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_edit/TestPropertyCoerce.as new file mode 100644 index 000000000..7271dbda9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_edit/TestPropertyCoerce.as @@ -0,0 +1,101 @@ +package tests_edit +{ + public class TestPropertyCoerce + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + private var attr:Number = 5; + + public function TestPropertyCoerce() + { + method + name "tests_edit:TestPropertyCoerce/TestPropertyCoerce" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_edit:TestPropertyCoerce/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + pushbyte 10 + setproperty QName(PrivateNamespace("tests_edit:TestPropertyCoerce"),"attr") + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestPropertyCoerce",[PackageNamespace("tests_edit")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_edit"),"TestPropertyCoerce") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_edit/TestUnaryMinus.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_edit/TestUnaryMinus.as new file mode 100644 index 000000000..e1ae3879e --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_edit/TestUnaryMinus.as @@ -0,0 +1,111 @@ +package tests_edit +{ + public class TestUnaryMinus + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestUnaryMinus() + { + method + name "tests_edit:TestUnaryMinus/TestUnaryMinus" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function run() : void + { + trait method QName(PackageNamespace(""),"run") + dispid 0 + method + name "tests_edit:TestUnaryMinus/run" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 4 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "a", 0, 13 + debug 1, "b", 1, 14 + debug 1, "c", 2, 15 + pushbyte 5 + convert_i + setlocal1 + pushbyte 6 + convert_i + setlocal2 + getlocal1 + negate + getlocal2 + multiply + convert_i + setlocal3 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestUnaryMinus",[PackageNamespace("tests_edit")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_edit"),"TestUnaryMinus") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_other/myInternal.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_other/myInternal.as new file mode 100644 index 000000000..ecc7e765b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_other/myInternal.as @@ -0,0 +1,23 @@ +package tests_other +{ + public namespace myInternal = "http://www.adobe.com/2006/actionscript/examples"; +} + +method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_other/myInternal2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_other/myInternal2.as new file mode 100644 index 000000000..e1e03f0d1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_other/myInternal2.as @@ -0,0 +1,23 @@ +package tests_other +{ + public namespace myInternal2; +} + +method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestClass.as new file mode 100644 index 000000000..f454e57eb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestClass.as @@ -0,0 +1,156 @@ +package tests_uses +{ + public class TestClass extends TestParentClass implements TestInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var classVar:int = 2; + + public function TestClass() + { + method + name "tests_uses:TestClass/TestClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function interfaceMethod() : void + { + trait method QName(PackageNamespace(""),"interfaceMethod") + dispid 0 + method + name "tests_uses:TestClass/interfaceMethod" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),StaticProtectedNs("tests_uses:TestParentClass"),PrivateNamespace("tests_uses:TestClass"),ProtectedNamespace("tests_uses:TestClass"),StaticProtectedNs("tests_uses:TestClass"),PrivateNamespace("TestClass.as$0")]) + pushstring "interfaceMethod" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),StaticProtectedNs("tests_uses:TestParentClass"),PrivateNamespace("tests_uses:TestClass"),ProtectedNamespace("tests_uses:TestClass"),StaticProtectedNs("tests_uses:TestClass"),PrivateNamespace("TestClass.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + + public function parentInterfaceMethod() : void + { + trait method QName(PackageNamespace(""),"parentInterfaceMethod") + dispid 0 + method + name "tests_uses:TestClass/parentInterfaceMethod" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),StaticProtectedNs("tests_uses:TestParentClass"),PrivateNamespace("tests_uses:TestClass"),ProtectedNamespace("tests_uses:TestClass"),StaticProtectedNs("tests_uses:TestClass"),PrivateNamespace("TestClass.as$0")]) + pushstring "parentInterfaceMethod" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),StaticProtectedNs("tests_uses:TestParentClass"),PrivateNamespace("tests_uses:TestClass"),ProtectedNamespace("tests_uses:TestClass"),StaticProtectedNs("tests_uses:TestClass"),PrivateNamespace("TestClass.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + + public function classMethod() : void + { + trait method QName(PackageNamespace(""),"classMethod") + dispid 0 + method + name "tests_uses:TestClass/classMethod" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 5 + maxscopedepth 6 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),StaticProtectedNs("tests_uses:TestParentClass"),PrivateNamespace("tests_uses:TestClass"),ProtectedNamespace("tests_uses:TestClass"),StaticProtectedNs("tests_uses:TestClass"),PrivateNamespace("TestClass.as$0")]) + pushstring "classMethod" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),StaticProtectedNs("tests_uses:TestParentClass"),PrivateNamespace("tests_uses:TestClass"),ProtectedNamespace("tests_uses:TestClass"),StaticProtectedNs("tests_uses:TestClass"),PrivateNamespace("TestClass.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 4 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass",[PackageNamespace("tests_uses")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace("tests_uses"),"TestParentClass") + pushscope + getlex QName(PackageNamespace("tests_uses"),"TestParentClass") + newclass 0 + popscope + popscope + initproperty QName(PackageNamespace("tests_uses"),"TestClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestClass2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestClass2.as new file mode 100644 index 000000000..0b5495784 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestClass2.as @@ -0,0 +1,99 @@ +package tests_uses +{ + public class TestClass2 + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestClass2() + { + method + name "tests_uses:TestClass2/TestClass2" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function classMethod() : void + { + trait method QName(PackageNamespace(""),"classMethod") + dispid 0 + method + name "tests_uses:TestClass2/classMethod" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestClass2"),ProtectedNamespace("tests_uses:TestClass2"),StaticProtectedNs("tests_uses:TestClass2"),PrivateNamespace("TestClass2.as$0")]) + pushstring "class2Method" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestClass2"),ProtectedNamespace("tests_uses:TestClass2"),StaticProtectedNs("tests_uses:TestClass2"),PrivateNamespace("TestClass2.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestClass2",[PackageNamespace("tests_uses")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_uses"),"TestClass2") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestInterface.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestInterface.as new file mode 100644 index 000000000..5b07b7195 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestInterface.as @@ -0,0 +1,49 @@ +package tests_uses +{ + public interface TestInterface extends TestParentInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + function interfaceMethod() : void; + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestInterface",[PackageNamespace("tests_uses")]) + pushnull + newclass 0 + initproperty QName(PackageNamespace("tests_uses"),"TestInterface") + returnvoid + end ; code + end ; body +end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestOtherClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestOtherClass.as new file mode 100644 index 000000000..d7a1a6b08 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestOtherClass.as @@ -0,0 +1,255 @@ +package tests_uses +{ + public class TestOtherClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public function TestOtherClass() + { + method + name "tests_uses:TestOtherClass/TestOtherClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function methodBody() : void + { + trait method QName(PackageNamespace(""),"methodBody") + dispid 0 + method + name "tests_uses:TestOtherClass/methodBody" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "tc", 0, 13 + findpropstrict QName(PackageNamespace("tests_uses"),"TestClass") + constructprop QName(PackageNamespace("tests_uses"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_uses"),"TestClass") + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]) + pushstring "method" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + + public function argsMethod(tc:TestClass) : void + { + trait method QName(PackageNamespace(""),"argsMethod") + dispid 0 + method + name "tests_uses:TestOtherClass/argsMethod" + param QName(PackageNamespace("tests_uses"),"TestClass") + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "tc", 0, 0 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]) + pushstring "argsMethod" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + + public function returnTypeMethod() : TestClass + { + trait method QName(PackageNamespace(""),"returnTypeMethod") + dispid 0 + method + name "tests_uses:TestOtherClass/returnTypeMethod" + returns QName(PackageNamespace("tests_uses"),"TestClass") + + body + maxstack 2 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]) + pushstring "returnTypeMethod" + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]), 1 + pushnull + returnvalue + end ; code + end ; body + end ; method + } + + public function methodCall() : void + { + trait method QName(PackageNamespace(""),"methodCall") + dispid 0 + method + name "tests_uses:TestOtherClass/methodCall" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "tc", 0, 30 + findpropstrict QName(PackageNamespace("tests_uses"),"TestClass") + constructprop QName(PackageNamespace("tests_uses"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_uses"),"TestClass") + setlocal1 + getlocal1 + callpropvoid QName(PackageNamespace(""),"classMethod"), 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function methodCall2() : void + { + trait method QName(PackageNamespace(""),"methodCall2") + dispid 0 + method + name "tests_uses:TestOtherClass/methodCall2" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "tc2", 0, 36 + findpropstrict QName(PackageNamespace("tests_uses"),"TestClass2") + constructprop QName(PackageNamespace("tests_uses"),"TestClass2"), 0 + coerce QName(PackageNamespace("tests_uses"),"TestClass2") + setlocal1 + getlocal1 + callpropvoid QName(PackageNamespace(""),"classMethod"), 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function varUse() : void + { + trait method QName(PackageNamespace(""),"varUse") + dispid 0 + method + name "tests_uses:TestOtherClass/varUse" + returns QName(PackageNamespace(""),"void") + + body + maxstack 2 + localcount 2 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + debug 1, "tc", 0, 42 + findpropstrict QName(PackageNamespace("tests_uses"),"TestClass") + constructprop QName(PackageNamespace("tests_uses"),"TestClass"), 0 + coerce QName(PackageNamespace("tests_uses"),"TestClass") + setlocal1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]) + getlocal1 + getproperty QName(PackageNamespace(""),"parentVar") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]), 1 + findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]) + getlocal1 + getproperty QName(PackageNamespace(""),"classVar") + callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests_uses"),PackageInternalNs("tests_uses"),PrivateNamespace("tests_uses:TestOtherClass"),ProtectedNamespace("tests_uses:TestOtherClass"),StaticProtectedNs("tests_uses:TestOtherClass"),PrivateNamespace("TestOtherClass.as$0")]), 1 + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestOtherClass",[PackageNamespace("tests_uses")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_uses"),"TestOtherClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestParentClass.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestParentClass.as new file mode 100644 index 000000000..27b102780 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestParentClass.as @@ -0,0 +1,98 @@ +package tests_uses +{ + public class TestParentClass + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 3 + maxscopedepth 4 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + public var parentVar:int = 1; + + public function TestParentClass() + { + method + name "tests_uses:TestParentClass/TestParentClass" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + getlocal0 + constructsuper 0 + returnvoid + end ; code + end ; body + end ; method + } + + public function parentClassMethod() : void + { + trait method QName(PackageNamespace(""),"parentClassMethod") + dispid 0 + method + name "tests_uses:TestParentClass/parentClassMethod" + returns QName(PackageNamespace(""),"void") + + body + maxstack 1 + localcount 1 + initscopedepth 4 + maxscopedepth 5 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + } + } + } + + method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 3 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestParentClass",[PackageNamespace("tests_uses")]) + getlex QName(PackageNamespace(""),"Object") + pushscope + getlex QName(PackageNamespace(""),"Object") + newclass 0 + popscope + initproperty QName(PackageNamespace("tests_uses"),"TestParentClass") + returnvoid + end ; code + end ; body + end ; method + diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestParentInterface.as b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestParentInterface.as new file mode 100644 index 000000000..384669620 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests_uses/TestParentInterface.as @@ -0,0 +1,49 @@ +package tests_uses +{ + public interface TestParentInterface + { + + method + name "" + returns null + + body + maxstack 1 + localcount 1 + initscopedepth 2 + maxscopedepth 3 + + code + getlocal0 + pushscope + returnvoid + end ; code + end ; body + end ; method + + function parentInterfaceMethod() : void; + } +} + +method + name "" + returns null + + body + maxstack 2 + localcount 1 + initscopedepth 1 + maxscopedepth 2 + + code + getlocal0 + pushscope + findpropstrict Multiname("TestParentInterface",[PackageNamespace("tests_uses")]) + pushnull + newclass 0 + initproperty QName(PackageNamespace("tests_uses"),"TestParentInterface") + returnvoid + end ; code + end ; body +end ; method +