diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DirectEditingPCodeTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DirectEditingPCodeTest.java new file mode 100644 index 000000000..ac850e722 --- /dev/null +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript2DirectEditingPCodeTest.java @@ -0,0 +1,141 @@ +/* + * 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.avm2.parser.AVM2ParseException; +import com.jpexs.decompiler.flash.action.parser.ActionParseException; +import com.jpexs.decompiler.flash.action.parser.script.ActionScript2Parser; +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.tags.base.ASMSource; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.helpers.Helper; +import com.jpexs.helpers.utf8.Utf8Helper; +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.Map; +import java.util.Objects; +import static org.testng.Assert.fail; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * + * @author JPEXS + */ +public class ActionScript2DirectEditingPCodeTest { + + @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/as2/as2.swf"; + File expectedDir = new File("testexpected/as2"); + File actualDir = new File("testactual/as2"); + + if (!actualDir.exists()) { + actualDir.mkdirs(); + } + + List paths = new ArrayList<>(); + + try { + + SWF swf = new SWF(new BufferedInputStream(new FileInputStream(filePath)), false); + + Map asms = swf.getASMs(true); + + for (String key : asms.keySet()) { + ASMSource asm = asms.get(key); + HighlightedTextWriter writer = new HighlightedTextWriter(new CodeFormatting(), false); + asm.getActionScriptSource(writer, null); + writer.finishHilights(); + String as = writer.toString(); + //as = asm.removePrefixAndSuffix(as); + + ActionScript2Parser par = new ActionScript2Parser(swf, asm); + try { + asm.setActions(par.actionsFromString(as, Utf8Helper.charsetName)); + } catch (ActionParseException | CompilationException ex) { + fail("Unable to parse: " + as + "/" + asm.toString(), ex); + } + writer = new HighlightedTextWriter(new CodeFormatting(), false); + asm.getActionScriptSource(writer, null); + writer.finishHilights(); + String as2 = writer.toString(); + //as2 = asm.removePrefixAndSuffix(as2); + try { + asm.setActions(par.actionsFromString(as2, Utf8Helper.charsetName)); + } catch (ActionParseException | CompilationException ex) { + fail("Unable to parse: " + asm.getSwf().getTitleOrShortFileName() + "/" + asm.toString(), ex); + } + writer = new HighlightedTextWriter(new CodeFormatting(), false); + asm.getASMSource(ScriptExportMode.PCODE, writer, null); + //asm.getActionScriptSource(writer, null); + writer.finishHilights(); + String modifiedPcode = writer.toString(); + + String classDirPath = key.replace("\\", "/"); + File actualFile = new File(actualDir.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(); + paths.add(classDirPath); + } + + } catch (Exception ex) { + fail("Exception during decompilation: " + filePath + ":" + ex.getMessage(), ex); + } + + StringBuilder notSameBuilder = new StringBuilder(); + + for (String path : paths) { + File expectedFile = new File(expectedDir.getAbsolutePath() + "/" + path + ".as"); + File actualFile = new File(actualDir.getAbsolutePath() + "/" + path + ".as"); + String expectedText = Helper.readTextFile(expectedFile.getAbsolutePath()); + String actualText = Helper.readTextFile(actualFile.getAbsolutePath()); + + expectedText = expectedText.replace("\r\n", "\n"); + actualText = actualText.replace("\r\n", "\n"); + + if (!Objects.equals(actualText, expectedText)) { + notSameBuilder.append(actualDir.getPath()).append(path.replace("\\", "/")).append(".as\r\n"); + // + } + } + if (notSameBuilder.length() > 0) { + fail("File(s) are not same: " + notSameBuilder.toString()); + } + } +} diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS2DirectEditingPCodeGenerator.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS2DirectEditingPCodeGenerator.java new file mode 100644 index 000000000..962c9aaaa --- /dev/null +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/generators/AS2DirectEditingPCodeGenerator.java @@ -0,0 +1,103 @@ +/* + * 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.generators; + +import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.action.parser.ActionParseException; +import com.jpexs.decompiler.flash.action.parser.script.ActionScript2Parser; +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.tags.base.ASMSource; +import com.jpexs.decompiler.graph.CompilationException; +import com.jpexs.decompiler.graph.TranslateException; +import com.jpexs.helpers.utf8.Utf8Helper; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Map; +import static org.testng.Assert.fail; + +/** + * + * @author JPEXS + */ +public class AS2DirectEditingPCodeGenerator { + public static void main(String[] args) throws IOException, InterruptedException { + String filePath = "testdata/as2/as2.swf"; + File outDir = new File("testexpected/as2"); + + + 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); + + Map asms = swf.getASMs(true); + + for (String key : asms.keySet()) { + ASMSource asm = asms.get(key); + HighlightedTextWriter writer = new HighlightedTextWriter(new CodeFormatting(), false); + asm.getActionScriptSource(writer, null); + writer.finishHilights(); + String as = writer.toString(); + //as = asm.removePrefixAndSuffix(as); + + ActionScript2Parser par = new ActionScript2Parser(swf, asm); + try { + asm.setActions(par.actionsFromString(as, Utf8Helper.charsetName)); + } catch (ActionParseException | CompilationException ex) { + fail("Unable to parse: " + as + "/" + asm.toString(), ex); + } + writer = new HighlightedTextWriter(new CodeFormatting(), false); + asm.getActionScriptSource(writer, null); + writer.finishHilights(); + String as2 = writer.toString(); + //as2 = asm.removePrefixAndSuffix(as2); + try { + asm.setActions(par.actionsFromString(as2, Utf8Helper.charsetName)); + } catch (ActionParseException | CompilationException ex) { + fail("Unable to parse: " + asm.getSwf().getTitleOrShortFileName() + "/" + asm.toString(), ex); + } + writer = new HighlightedTextWriter(new CodeFormatting(), false); + asm.getASMSource(ScriptExportMode.PCODE, writer, null); + //asm.getActionScriptSource(writer, null); + writer.finishHilights(); + String modifiedPcode = writer.toString(); + + String classDirPath = key; + 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(); + } + System.exit(0); + } +} diff --git a/libsrc/ffdec_lib/testdata/as2/as2.swf b/libsrc/ffdec_lib/testdata/as2/as2.swf index 2cfa3bec1..8f9bd03ba 100644 Binary files a/libsrc/ffdec_lib/testdata/as2/as2.swf and b/libsrc/ffdec_lib/testdata/as2/as2.swf differ diff --git a/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/TestLoader.as b/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/TestLoader.as index 6fa3c6435..343ea98a8 100644 --- a/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/TestLoader.as +++ b/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/TestLoader.as @@ -6,8 +6,10 @@ class com.jpexs.flash.test.TestLoader { public function includeTests() { new com.jpexs.flash.test.testcases.TestSetterGetter(); new com.jpexs.flash.test.testcases.TestCallSetterGetter(); + new com.jpexs.flash.test.testcases.TestSuperSetterGetter(); + new com.jpexs.flash.test.testcases.TestSuper2SetterGetter(); new com.jpexs.flash.test.testcases.TestVarsMethods(); new com.jpexs.flash.test.testcases.TestMaintainOrder(); - new com.jpexs.flash.test.testcases.TestReturnInConstructor(); + new com.jpexs.flash.test.testcases.TestReturnInConstructor(); } } \ No newline at end of file diff --git a/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/testcases/TestSuper2SetterGetter.as b/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/testcases/TestSuper2SetterGetter.as new file mode 100644 index 000000000..1246c101a --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/testcases/TestSuper2SetterGetter.as @@ -0,0 +1,12 @@ +class com.jpexs.flash.test.testcases.TestSuper2SetterGetter extends com.jpexs.flash.test.testcases.TestSuperSetterGetter { + public function testSuperGetSet() { + super.myvar = 3; + trace(super.myvar); + super.myvar(); + new super.myvar(); + delete super.myvar; + super.myvar++ + trace(super.myvar++); + trace(++super.myvar); + } +} \ No newline at end of file diff --git a/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/testcases/TestSuperSetterGetter.as b/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/testcases/TestSuperSetterGetter.as new file mode 100644 index 000000000..a4dfb0eee --- /dev/null +++ b/libsrc/ffdec_lib/testdata/as2/com/jpexs/flash/test/testcases/TestSuperSetterGetter.as @@ -0,0 +1,44 @@ +class com.jpexs.flash.test.testcases.TestSuperSetterGetter extends com.jpexs.flash.test.testcases.TestSetterGetter { + + private var _myvar2 = 1; + + public function get myvar2(){ + return _myvar2; + } + + public function set myvar2(val){ + _myvar2 = val; + } + + public function testThisGetSet(){ + this.myvar2 = 2; + trace(this.myvar2); + this.myvar2(); + new this.myvar2(); + this.myvar2++ + trace(this.myvar2++); + trace(++this.myvar2); + } + + public function testThisParentGetSet(){ + this.myvar = 2; + trace(this.myvar); + this.myvar(); + new this.myvar(); + this.myvar++ + trace(this.myvar++); + trace(++this.myvar); + } + + + public function testSuperGetSet() { + super.myvar = 3; + trace(super.myvar); + super.myvar(); + new super.myvar(); + delete super.myvar; + super.myvar++ + trace(super.myvar++); + trace(++super.myvar); + } +} \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/Blue Symbol.as b/libsrc/ffdec_lib/testexpected/as2/Blue Symbol.as new file mode 100644 index 000000000..089a1cb76 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/Blue Symbol.as @@ -0,0 +1,9 @@ +Push "init_blue" +Trace +Push "MyBlueSprite" +GetVariable +Push "Blue Symbol", 2, "Object" +GetVariable +Push "registerClass" +CallMethod +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineButton2_30/BUTTONCONDACTION on(press).as b/libsrc/ffdec_lib/testexpected/as2/DefineButton2_30/BUTTONCONDACTION on(press).as new file mode 100644 index 000000000..b7992a2a9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/DefineButton2_30/BUTTONCONDACTION on(press).as @@ -0,0 +1,2 @@ +Push "button pressed" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineSprite_15/frame_1/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_15/frame_1/DoAction.as new file mode 100644 index 000000000..2854c1320 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_15/frame_1/DoAction.as @@ -0,0 +1,2 @@ +Push "script layer 1" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineSprite_15/frame_1/DoAction[2].as b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_15/frame_1/DoAction[2].as new file mode 100644 index 000000000..39d8364b3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_15/frame_1/DoAction[2].as @@ -0,0 +1,2 @@ +Push "script layer 2" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineSprite_2_Blue Symbol/frame_1/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_2_Blue Symbol/frame_1/DoAction.as new file mode 100644 index 000000000..e69de29bb diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineSprite_4/frame_1/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_4/frame_1/DoAction.as new file mode 100644 index 000000000..e69de29bb diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineSprite_53/frame_1/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_53/frame_1/DoAction.as new file mode 100644 index 000000000..e69de29bb diff --git a/libsrc/ffdec_lib/testexpected/as2/DefineSprite_6/frame_1/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/DefineSprite_6/frame_1/DoAction.as new file mode 100644 index 000000000..e69de29bb diff --git a/libsrc/ffdec_lib/testexpected/as2/DoInitAction.as b/libsrc/ffdec_lib/testexpected/as2/DoInitAction.as new file mode 100644 index 000000000..0f8ed62c9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/DoInitAction.as @@ -0,0 +1,2 @@ +Push "initclip 1" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/DoInitAction[2].as b/libsrc/ffdec_lib/testexpected/as2/DoInitAction[2].as new file mode 100644 index 000000000..21e233907 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/DoInitAction[2].as @@ -0,0 +1,2 @@ +Push "initclip 2" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/DoInitAction[3].as b/libsrc/ffdec_lib/testexpected/as2/DoInitAction[3].as new file mode 100644 index 000000000..1fdf30b50 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/DoInitAction[3].as @@ -0,0 +1,2 @@ +Push "star init" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/Box.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/Box.as new file mode 100644 index 000000000..eb6d2fc6a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/Box.as @@ -0,0 +1,82 @@ +ConstantPool "_global", "Box", "box_mc", "MovieClip", "prototype", "moveUp", "_y", "moveDown", "ASSetPropFlags" +Push "_global" +GetVariable +Push "Box" +GetMember +Not +Not +If loc017b +Push "_global" +GetVariable +Push "Box" +DefineFunction2 "", 1, 4, false, false, false, true, true, false, false, true, false, 3, "passed_mc" { +Push 0 +Push register2 +Push undefined +CallMethod +Pop +Push register1 +Push "box_mc" +Push register3 +SetMember +} +StoreRegister 1 +SetMember +Push "_global" +GetVariable +Push "Box" +GetMember +Push "MovieClip" +GetVariable +Extends +Push register1 +Push "prototype" +GetMember +StoreRegister 2 +Pop +Push register2 +Push "moveUp" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push register1 +Push "box_mc" +GetMember +Push "_y" +Push register1 +Push "box_mc" +GetMember +Push "_y" +GetMember +Push 1 +Subtract +SetMember +} +SetMember +Push register2 +Push "moveDown" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push register1 +Push "box_mc" +GetMember +Push "_y" +Push register1 +Push "box_mc" +GetMember +Push "_y" +GetMember +Push 20 +Add2 +SetMember +} +SetMember +Push 1 +Push null +Push "_global" +GetVariable +Push "Box" +GetMember +Push "prototype" +GetMember +Push 3 +Push "ASSetPropFlags" +CallFunction +loc017b:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/Cox.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/Cox.as new file mode 100644 index 000000000..c7d2c59fa --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/Cox.as @@ -0,0 +1,50 @@ +ConstantPool "_global", "Cox", "Box", "prototype", "testPublic", "pub", "testPrivate", "priv", "ASSetPropFlags" +Push "_global" +GetVariable +Push "Cox" +GetMember +Not +Not +If loc0105 +Push "_global" +GetVariable +Push "Cox" +DefineFunction2 "", 1, 3, false, false, false, true, true, false, true, false, false, 2, "passed_mc" { +Push register2, 1, register1, undefined +CallMethod +Pop +} +StoreRegister 1 +SetMember +Push "_global" +GetVariable +Push "Cox" +GetMember +Push "Box" +GetVariable +Extends +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "testPublic" +DefineFunction "", 0 { +Push "pub" +Trace +} +SetMember +Push register2, "testPrivate" +DefineFunction "", 0 { +Push "priv" +Trace +} +SetMember +Push 1, null, "_global" +GetVariable +Push "Cox" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc0105:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/Enemy.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/Enemy.as new file mode 100644 index 000000000..54f80d61a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/Enemy.as @@ -0,0 +1,96 @@ +ConstantPool "_global", "Enemy", "x", "prototype", "Moving", "sfunc", "hu", "moveLeft", "tst", "moveLeft = ", "moveRight", "moveRight = ", "moveUp", "moveDown", "stat_tst", "ASSetPropFlags" +Push "_global" +GetVariable +Push "Enemy" +GetMember +Not +Not +If loc020a +Push "_global" +GetVariable +Push "Enemy" +DefineFunction2 "", 1, 5, false, false, true, false, true, false, false, true, false, 4, "px" { +Push 57 +StoreRegister 2 +Pop +Push register2, 27 +Multiply +StoreRegister 2 +Pop +Push register2 +StoreRegister 3 +Pop +Push register1, "x", register4, register3 +Add2 +SetMember +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push "_global" +GetVariable +Push "Moving" +GetMember +Push 1, "_global" +GetVariable +Push "Enemy" +GetMember +ImplementsOp +Push register1, "sfunc" +DefineFunction "", 0 { +Push "hu" +Trace +} +SetMember +Push register2, "moveLeft" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "lx" { +Push register1, "x", register1, "x" +GetMember +Push register2 +Subtract +SetMember +Push register1, "tst", 7 +SetMember +Push "moveLeft = ", register1, "x" +GetMember +Add2 +Trace +} +SetMember +Push register2, "moveRight" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "rx" { +Push register1, "x", register1, "x" +GetMember +Push register2 +Add2 +SetMember +Push "moveRight = ", register1, "x" +GetMember +Add2 +Trace +} +SetMember +Push register2, "moveUp" +DefineFunction "", 1, "uy" { +} +SetMember +Push register2, "moveDown" +DefineFunction "", 1, "dy" { +} +SetMember +Push register2, "tst", 5 +SetMember +Push register1, "stat_tst", 6 +SetMember +Push 1, null, "_global" +GetVariable +Push "Enemy" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc020a:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/Moving.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/Moving.as new file mode 100644 index 000000000..795eb5753 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/Moving.as @@ -0,0 +1,24 @@ +ConstantPool "_global", "Moving", "Moving2" +Push "_global" +GetVariable +Push "Moving" +GetMember +Not +Not +If loc0061 +Push "_global" +GetVariable +Push "Moving" +DefineFunction "", 0 { +} +SetMember +Push "_global" +GetVariable +Push "Moving2" +GetMember +Push 1, "_global" +GetVariable +Push "Moving" +GetMember +ImplementsOp +loc0061:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/Moving2.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/Moving2.as new file mode 100644 index 000000000..c36ea4ab6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/Moving2.as @@ -0,0 +1,15 @@ +ConstantPool "_global", "Moving2" +Push "_global" +GetVariable +Push "Moving2" +GetMember +Not +Not +If loc003c +Push "_global" +GetVariable +Push "Moving2" +DefineFunction "", 0 { +} +SetMember +loc003c:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/MyBlueSprite.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/MyBlueSprite.as new file mode 100644 index 000000000..5f92b80bf --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/MyBlueSprite.as @@ -0,0 +1,38 @@ +ConstantPool "_global", "MyBlueSprite", "MovieClip", "prototype", "ASSetPropFlags" +Push "_global" +GetVariable +Push "MyBlueSprite" +GetMember +Not +Not +If loc00bf +Push "_global" +GetVariable +Push "MyBlueSprite" +DefineFunction2 "", 0, 2, false, false, false, true, true, false, true, false, false { +Push 0.0, register1, undefined +CallMethod +Pop +} +StoreRegister 1 +SetMember +Push "_global" +GetVariable +Push "MyBlueSprite" +GetMember +Push "MovieClip" +GetVariable +Extends +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push 1, null, "_global" +GetVariable +Push "MyBlueSprite" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc00bf:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/MyError.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/MyError.as new file mode 100644 index 000000000..5e33d46f2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/MyError.as @@ -0,0 +1,40 @@ +ConstantPool "_global", "MyError", "Error", "prototype", "message", "My custom error occurred", "ASSetPropFlags" +Push "_global" +GetVariable +Push "MyError" +GetMember +Not +Not +If loc00e1 +Push "_global" +GetVariable +Push "MyError" +DefineFunction2 "", 0, 2, false, false, false, true, true, false, true, false, false { +Push 0.0, register1, undefined +CallMethod +Pop +} +StoreRegister 1 +SetMember +Push "_global" +GetVariable +Push "MyError" +GetMember +Push "Error" +GetVariable +Extends +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "message", "My custom error occurred" +SetMember +Push 1, null, "_global" +GetVariable +Push "MyError" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc00e1:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/Ship.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/Ship.as new file mode 100644 index 000000000..524ffc255 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/Ship.as @@ -0,0 +1,83 @@ +ConstantPool "_global", "Ship", "y", "prototype", "Moving", "moveUp", "moveUp = ", "moveDown", "moveDown = ", "moveLeft", "b", "moveRight", "a", "d", "ASSetPropFlags" +Push "_global" +GetVariable +Push "Ship" +GetMember +Not +Not +If loc01c3 +Push "_global" +GetVariable +Push "Ship" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "py" { +Push register1, "y", register2 +SetMember +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push "_global" +GetVariable +Push "Moving" +GetMember +Push 1, "_global" +GetVariable +Push "Ship" +GetMember +ImplementsOp +Push register2, "moveUp" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "uy" { +Push register1, "y", register1, "y" +GetMember +Push register2 +Multiply +SetMember +Push "moveUp = ", register1, "y" +GetMember +Add2 +Trace +} +SetMember +Push register2, "moveDown" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "dy" { +Push register1, "y", register1, "y" +GetMember +Push register2 +Multiply +SetMember +Push "moveDown = ", register1, "y" +GetMember +Add2 +Trace +} +SetMember +Push register2, "moveLeft" +DefineFunction2 "", 1, 2, false, false, true, false, true, false, false, true, false, 0, "lx" { +Push register1, "b", 6 +SetMember +} +SetMember +Push register2, "moveRight" +DefineFunction2 "", 1, 2, false, false, true, false, true, false, false, true, false, 0, "rx" { +Push register1, "a" +GetMember +Trace +Push register1, "d" +GetMember +Trace +} +SetMember +Push register2, "d", 5 +SetMember +Push 1, null, "_global" +GetVariable +Push "Ship" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc01c3:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/TestLoader.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/TestLoader.as new file mode 100644 index 000000000..0c4ca2b44 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/TestLoader.as @@ -0,0 +1,219 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "TestLoader", "prototype", "includeTests", "testcases", "TestSetterGetter", "TestCallSetterGetter", "TestSuperSetterGetter", "TestSuper2SetterGetter", "TestVarsMethods", "TestMaintainOrder", "TestReturnInConstructor", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc011c +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc011c:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc0154 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc0154:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc0198 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc0198:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc01e8 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc01e8:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "TestLoader" +GetMember +Not +Not +If loc03d2 +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "TestLoader" +DefineFunction "", 0 { +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "includeTests" +DefineFunction "", 0 { +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +NewMethod +Pop +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestCallSetterGetter" +NewMethod +Pop +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuperSetterGetter" +NewMethod +Pop +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuper2SetterGetter" +NewMethod +Pop +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestVarsMethods" +NewMethod +Pop +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestMaintainOrder" +NewMethod +Pop +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestReturnInConstructor" +NewMethod +Pop +} +SetMember +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "TestLoader" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc03d2:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestCallSetterGetter.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestCallSetterGetter.as new file mode 100644 index 000000000..1b4961433 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestCallSetterGetter.as @@ -0,0 +1,215 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestCallSetterGetter", "prototype", "testSetterCall", "myobj", "__set__myvar", "testGetterCall", "__get__myvar", "testStatGetterCall", "TestSetterGetter", "__get__mystvar", "testStatSetterCall", "__set__mystvar", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc011f +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc011f:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc0157 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc0157:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc019b +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc019b:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc01eb +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc01eb:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc0247 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc0247:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestCallSetterGetter" +GetMember +Not +Not +If loc03d5 +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestCallSetterGetter" +DefineFunction "", 0 { +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "testSetterCall" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push 5, 1, register1, "myobj" +GetMember +Push "__set__myvar" +CallMethod +Pop +} +SetMember +Push register2, "testGetterCall" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push 0.0, register1, "myobj" +GetMember +Push "__get__myvar" +CallMethod +Return +} +SetMember +Push register2, "testStatGetterCall" +DefineFunction "", 0 { +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Push "__get__mystvar" +CallMethod +Return +} +SetMember +Push register2, "testStatSetterCall" +DefineFunction "", 1, "val" { +Push 6, 1, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Push "__set__mystvar" +CallMethod +Pop +} +SetMember +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestCallSetterGetter" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc03d5:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestMaintainOrder.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestMaintainOrder.as new file mode 100644 index 000000000..6d05b8c61 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestMaintainOrder.as @@ -0,0 +1,217 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestMaintainOrder", "prototype", "h", "8", "i", "9", "j", "10", "k", "11", "l", "12", "m", "13", "_x2", "after _x1", "a", "b", "c", "d", "e", "f", "g", "_x1", "after method m", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc00d4 +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc00d4:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc010c +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc010c:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc0150 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc0150:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc01a0 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc01a0:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc01fc +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc01fc:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestMaintainOrder" +GetMember +Not +Not +If loc03a5 +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestMaintainOrder" +DefineFunction "", 0 { +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "h" +DefineFunction "", 0 { +Push "8" +Trace +} +SetMember +Push register2, "i" +DefineFunction "", 0 { +Push "9" +Trace +} +SetMember +Push register1, "j" +DefineFunction "", 0 { +Push "10" +Trace +} +SetMember +Push register1, "k" +DefineFunction "", 0 { +Push "11" +Trace +} +SetMember +Push register2, "l" +DefineFunction "", 0 { +Push "12" +Trace +} +SetMember +Push register1, "m" +DefineFunction "", 0 { +Push "13" +Trace +} +SetMember +Push register2, "_x2" +DefineFunction "", 0 { +Push "after _x1" +Trace +} +SetMember +Push register2, "a", 1 +SetMember +Push register1, "b", 2 +SetMember +Push register2, "c", 3 +SetMember +Push register1, "d", 4 +SetMember +Push register1, "e", 5 +SetMember +Push register2, "f", 6 +SetMember +Push register2, "g", 7 +SetMember +Push register2, "_x1", "after method m" +SetMember +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestMaintainOrder" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc03a5:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestReturnInConstructor.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestReturnInConstructor.as new file mode 100644 index 000000000..76e6e728c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestReturnInConstructor.as @@ -0,0 +1,191 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestReturnInConstructor", "A", "B", "prototype", "func", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc0098 +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc0098:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc00d0 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc00d0:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc0114 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc0114:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc0164 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc0164:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc01c0 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc01c0:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestReturnInConstructor" +GetMember +Not +Not +If loc02e7 +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestReturnInConstructor" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, true, false, false { +Push 3 +StoreRegister 1 +Pop +Push register1, 3 +Equals2 +Not +If loc0249 +Push "A" +Trace +Push undefined +Return +loc0249:Push "B" +Trace +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "func" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, true, false, false { +Push 3 +StoreRegister 1 +Pop +Push register1, 3 +Equals2 +Not +If loc029c +Push "A" +Trace +Push undefined +Return +loc029c:Push "B" +Trace +Push 5 +Return +} +SetMember +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestReturnInConstructor" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc02e7:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSetterGetter.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSetterGetter.as new file mode 100644 index 000000000..e4553fbc7 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSetterGetter.as @@ -0,0 +1,281 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestSetterGetter", "prototype", "__get__mystvar", "_mystvar", "__set__mystvar", "__get__myvar", "_myvar", "__set__myvar", "__get__myvargetonly", "_myvargetonly", "__set__myvarsetonly", "_myvarsetonly", "__get__myvarsetonly", "classic", "okay", "mystvar", "addProperty", "myvar", "myvargetonly", "myvarsetonly", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc0169 +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc0169:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc01a1 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc01a1:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc01e5 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc01e5:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc0235 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc0235:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc0291 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc0291:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Not +Not +If loc0554 +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +DefineFunction "", 0 { +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register1, "__get__mystvar" +DefineFunction "", 0 { +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Push "_mystvar" +GetMember +Return +} +SetMember +Push register1, "__set__mystvar" +DefineFunction2 "", 1, 2, false, false, true, false, true, false, true, false, false, 1, "val" { +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Push "_mystvar", register1 +SetMember +Push 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Push "__get__mystvar" +CallMethod +Return +} +SetMember +Push register2, "__get__myvar" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push register1, "_myvar" +GetMember +Return +} +SetMember +Push register2, "__set__myvar" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "val" { +Push register1, "_myvar", register2 +SetMember +Push 0.0, register1, "__get__myvar" +CallMethod +Return +} +SetMember +Push register2, "__get__myvargetonly" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push register1, "_myvargetonly" +GetMember +Return +} +SetMember +Push register2, "__set__myvarsetonly" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "val" { +Push register1, "_myvarsetonly", register2 +SetMember +Push 0.0, register1, "__get__myvarsetonly" +CallMethod +Return +} +SetMember +Push register2, "classic" +DefineFunction "", 0 { +Push "okay" +Trace +} +SetMember +Push register2, "_myvar", 1 +SetMember +Push register1, "_mystvar", 2 +SetMember +Push register2, "_myvarsetonly", 3 +SetMember +Push register2, "_myvargetonly", 4 +SetMember +Push register1, "__set__mystvar" +GetMember +Push register1, "__get__mystvar" +GetMember +Push "mystvar", 3, register1, "addProperty" +CallMethod +Push register2, "__set__myvar" +GetMember +Push register2, "__get__myvar" +GetMember +Push "myvar", 3, register2, "addProperty" +CallMethod +DefineFunction "", 0 { +} +Push register2, "__get__myvargetonly" +GetMember +Push "myvargetonly", 3, register2, "addProperty" +CallMethod +Push register2, "__set__myvarsetonly" +GetMember +DefineFunction "", 0 { +} +Push "myvarsetonly", 3, register2, "addProperty" +CallMethod +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc0554:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSuper2SetterGetter.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSuper2SetterGetter.as new file mode 100644 index 000000000..d35ed0c70 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSuper2SetterGetter.as @@ -0,0 +1,232 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestSuper2SetterGetter", "TestSuperSetterGetter", "prototype", "testSuperGetSet", "__set__myvar", "__get__myvar", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc00ce +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc00ce:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc0106 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc0106:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc014a +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc014a:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc019a +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc019a:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc01f6 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc01f6:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuper2SetterGetter" +GetMember +Not +Not +If loc03fa +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuper2SetterGetter" +DefineFunction2 "", 0, 2, false, false, false, true, true, false, true, false, false { +Push 0.0, register1, undefined +CallMethod +Pop +} +StoreRegister 1 +SetMember +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuper2SetterGetter" +GetMember +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuperSetterGetter" +GetMember +Extends +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "testSuperGetSet" +DefineFunction2 "", 0, 2, false, false, false, true, true, false, true, false, false { +Push 3, 1, register1, "__set__myvar" +CallMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Trace +Push 0.0, 0.0, register1, "__get__myvar" +CallMethod +Push undefined +CallMethod +Pop +Push 0.0, 0.0, register1, "__get__myvar" +CallMethod +Push undefined +NewMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Delete2 +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Pop +Trace +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Trace +} +SetMember +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuper2SetterGetter" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc03fa:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSuperSetterGetter.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSuperSetterGetter.as new file mode 100644 index 000000000..616c713cd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestSuperSetterGetter.as @@ -0,0 +1,338 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestSuperSetterGetter", "TestSetterGetter", "prototype", "__get__myvar2", "_myvar2", "__set__myvar2", "testThisGetSet", "testThisParentGetSet", "__set__myvar", "__get__myvar", "testSuperGetSet", "myvar2", "addProperty", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc0123 +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc0123:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc015b +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc015b:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc019f +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc019f:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc01ef +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc01ef:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc024b +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc024b:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuperSetterGetter" +GetMember +Not +Not +If loc069f +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuperSetterGetter" +DefineFunction2 "", 0, 2, false, false, false, true, true, false, true, false, false { +Push 0.0, register1, undefined +CallMethod +Pop +} +StoreRegister 1 +SetMember +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuperSetterGetter" +GetMember +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSetterGetter" +GetMember +Extends +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "__get__myvar2" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push register1, "_myvar2" +GetMember +Return +} +SetMember +Push register2, "__set__myvar2" +DefineFunction2 "", 1, 3, false, false, true, false, true, false, false, true, false, 2, "val" { +Push register1, "_myvar2", register2 +SetMember +Push 0.0, register1, "__get__myvar2" +CallMethod +Return +} +SetMember +Push register2, "testThisGetSet" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push 2, 1, register1, "__set__myvar2" +CallMethod +Pop +Push 0.0, register1, "__get__myvar2" +CallMethod +Trace +Push 0.0, 0.0, register1, "__get__myvar2" +CallMethod +Push undefined +CallMethod +Pop +Push 0.0, 0.0, register1, "__get__myvar2" +CallMethod +Push undefined +NewMethod +Pop +Push 0.0, register1, "__get__myvar2" +CallMethod +Increment +Push 1, register1, "__set__myvar2" +CallMethod +Pop +Push 0.0, register1, "__get__myvar2" +CallMethod +Push 0.0, register1, "__get__myvar2" +CallMethod +Increment +Push 1, register1, "__set__myvar2" +CallMethod +Pop +Trace +Push 0.0, register1, "__get__myvar2" +CallMethod +Increment +Push 1, register1, "__set__myvar2" +CallMethod +Trace +} +SetMember +Push register2, "testThisParentGetSet" +DefineFunction2 "", 0, 2, false, false, true, false, true, false, false, true, false { +Push 2, 1, register1, "__set__myvar" +CallMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Trace +Push 0.0, 0.0, register1, "__get__myvar" +CallMethod +Push undefined +CallMethod +Pop +Push 0.0, 0.0, register1, "__get__myvar" +CallMethod +Push undefined +NewMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Pop +Trace +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Trace +} +SetMember +Push register2, "testSuperGetSet" +DefineFunction2 "", 0, 2, false, false, false, true, true, false, true, false, false { +Push 3, 1, register1, "__set__myvar" +CallMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Trace +Push 0.0, 0.0, register1, "__get__myvar" +CallMethod +Push undefined +CallMethod +Pop +Push 0.0, 0.0, register1, "__get__myvar" +CallMethod +Push undefined +NewMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Delete2 +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Pop +Push 0.0, register1, "__get__myvar" +CallMethod +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Pop +Trace +Push 0.0, register1, "__get__myvar" +CallMethod +Increment +Push 1, register1, "__set__myvar" +CallMethod +Trace +} +SetMember +Push register2, "_myvar2", 1 +SetMember +Push register2, "__set__myvar2" +GetMember +Push register2, "__get__myvar2" +GetMember +Push "myvar2", 3, register2, "addProperty" +CallMethod +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestSuperSetterGetter" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc069f:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestVarsMethods.as b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestVarsMethods.as new file mode 100644 index 000000000..3b2a32f3a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/__Packages/com/jpexs/flash/test/testcases/TestVarsMethods.as @@ -0,0 +1,177 @@ +ConstantPool "_global", "com", "Object", "jpexs", "flash", "test", "testcases", "TestVarsMethods", "constructor", "prototype", "instMethod", "instance method", "statMethod", "static method", "instVar", "statVar", "ASSetPropFlags" +Push "_global" +GetVariable +Push "com" +GetMember +Not +Not +If loc00d7 +Push "_global" +GetVariable +Push "com", 0.0, "Object" +NewObject +SetMember +loc00d7:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Not +Not +If loc010f +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs", 0.0, "Object" +NewObject +SetMember +loc010f:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Not +Not +If loc0153 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash", 0.0, "Object" +NewObject +SetMember +loc0153:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Not +Not +If loc01a3 +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test", 0.0, "Object" +NewObject +SetMember +loc01a3:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Not +Not +If loc01ff +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases", 0.0, "Object" +NewObject +SetMember +loc01ff:Pop +Push "_global" +GetVariable +Push "com" +GetMember +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestVarsMethods" +GetMember +Not +Not +If loc02f5 +Push "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestVarsMethods" +DefineFunction "", 0 { +Push "constructor" +Trace +} +StoreRegister 1 +SetMember +Push register1, "prototype" +GetMember +StoreRegister 2 +Pop +Push register2, "instMethod" +DefineFunction "", 0 { +Push "instance method" +Trace +} +SetMember +Push register1, "statMethod" +DefineFunction "", 0 { +Push "static method" +Trace +} +SetMember +Push register2, "instVar", 1 +SetMember +Push register1, "statVar", 2 +SetMember +Push 1, null, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "testcases" +GetMember +Push "TestVarsMethods" +GetMember +Push "prototype" +GetMember +Push 3, "ASSetPropFlags" +CallFunction +loc02f5:Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_1/PlaceObject2_2_Blue Symbol_1/CLIPACTIONRECORD onClipEvent(load).as b/libsrc/ffdec_lib/testexpected/as2/frame_1/PlaceObject2_2_Blue Symbol_1/CLIPACTIONRECORD onClipEvent(load).as new file mode 100644 index 000000000..a26c73c5f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_1/PlaceObject2_2_Blue Symbol_1/CLIPACTIONRECORD onClipEvent(load).as @@ -0,0 +1,2 @@ +Push "load unload" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_23/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_23/DoAction.as new file mode 100644 index 000000000..030cf2c57 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_23/DoAction.as @@ -0,0 +1 @@ +Stop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_24/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_24/DoAction.as new file mode 100644 index 000000000..0ddd55990 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_24/DoAction.as @@ -0,0 +1,8 @@ +ConstantPool "unicodeTest", "k", "היפופוטמי, או א" +Push "unicodeTest" +Trace +Push "k", "היפופוטמי, או א" +DefineLocal +Push "k" +GetVariable +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_25/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_25/DoAction.as new file mode 100644 index 000000000..9c02d7a99 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_25/DoAction.as @@ -0,0 +1,19 @@ +ConstantPool "ifWithElseTest", "i", "onTrue", "onFalse" +Push "ifWithElseTest" +Trace +Push "i", 5 +DefineLocal +Push "i" +GetVariable +Push 258 +Equals2 +Not +If loc0056 +Push "onTrue" +Trace +Jump loc0060 +loc0056:Push "onFalse", "i" +GetVariable +Add2 +Trace +loc0060: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_26/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_26/DoAction.as new file mode 100644 index 000000000..b997ecb32 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_26/DoAction.as @@ -0,0 +1,21 @@ +ConstantPool "forTest", "i", "hello:" +Push "forTest" +Trace +Push "i", 0.0 +DefineLocal +loc002b:Push "i" +GetVariable +Push 10 +Less2 +Not +If loc0059 +Push "hello:", "i" +GetVariable +Add2 +Trace +Push "i", "i" +GetVariable +Increment +SetVariable +Jump loc002b +loc0059: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_27/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_27/DoAction.as new file mode 100644 index 000000000..8aba588d0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_27/DoAction.as @@ -0,0 +1,21 @@ +ConstantPool "whileTest", "i", "hello:" +Push "whileTest" +Trace +Push "i", 0.0 +DefineLocal +loc002d:Push "i" +GetVariable +Push 10 +Less2 +Not +If loc005b +Push "hello:", "i" +GetVariable +Add2 +Trace +Push "i", "i" +GetVariable +Increment +SetVariable +Jump loc002d +loc005b: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_28/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_28/DoAction.as new file mode 100644 index 000000000..358b4cadc --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_28/DoAction.as @@ -0,0 +1,40 @@ +ConstantPool "forWithContinueTest", "i", "hello:", "i==5", "hawk", "end of the loop" +Push "forWithContinueTest" +Trace +Push "i", 0.0 +DefineLocal +loc0051:Push "i" +GetVariable +Push 10 +Less2 +Not +If loc00c0 +Push "hello:", "i" +GetVariable +Add2 +Trace +Push "i" +GetVariable +Push 5 +Equals2 +Not +If loc00ab +Push "i==5" +Trace +Push "i" +GetVariable +Push 7 +Equals2 +Not +If loc00a5 +Jump loc00b1 +loc00a5:Push "hawk" +Trace +loc00ab:Push "end of the loop" +Trace +loc00b1:Push "i", "i" +GetVariable +Increment +SetVariable +Jump loc0051 +loc00c0: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_29/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_29/DoAction.as new file mode 100644 index 000000000..0dd1b123f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_29/DoAction.as @@ -0,0 +1,20 @@ +ConstantPool "doWhileTest", "i", "i=", "end" +Push "doWhileTest" +Trace +Push "i", 0.0 +DefineLocal +loc002f:Push "i=", "i" +GetVariable +Add2 +Trace +Push "i", "i" +GetVariable +Increment +SetVariable +Push "i" +GetVariable +Push 10 +Less2 +If loc002f +Push "end" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_30/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_30/DoAction.as new file mode 100644 index 000000000..265ad9eb4 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_30/DoAction.as @@ -0,0 +1,39 @@ +ConstantPool "switchTest", "i", "one", "two", "three", "four", "default clause", "scriptend" +Push "switchTest" +Trace +Push "i", 5 +DefineLocal +Push "i" +GetVariable +StoreRegister 0 +Push 0.0 +StrictEquals +If loc00b0 +Push register0, 1 +StrictEquals +If loc00b0 +Push register0, 2 +StrictEquals +If loc00bb +Push register0, 3 +StrictEquals +If loc00c1 +Push register0, 4 +StrictEquals +If loc00cc +Jump loc00d7 +loc00b0:Push "one" +Trace +Jump loc00dd +loc00bb:Push "two" +Trace +loc00c1:Push "three" +Trace +Jump loc00dd +loc00cc:Push "four" +Trace +Jump loc00dd +loc00d7:Push "default clause" +Trace +loc00dd:Push "scriptend" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_31/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_31/DoAction.as new file mode 100644 index 000000000..fc092a390 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_31/DoAction.as @@ -0,0 +1,23 @@ +ConstantPool "strictEqualsTest", "i", "equals strict", "not equals strict" +Push "strictEqualsTest" +Trace +Push "i", 5 +DefineLocal +Push "i" +GetVariable +Push 5 +StrictEquals +Not +If loc0064 +Push "equals strict" +Trace +loc0064:Push "i" +GetVariable +Push 5 +StrictEquals +Not +Not +If loc0080 +Push "not equals strict" +Trace +loc0080: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_32/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_32/DoAction.as new file mode 100644 index 000000000..2e260a1b7 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_32/DoAction.as @@ -0,0 +1,55 @@ +ConstantPool "switchForTest", "i", "zero", "five", "ten", "one", "def", "before loop end" +Push "switchForTest" +Trace +Push "i", 0.0 +DefineLocal +loc0050:Push "i" +GetVariable +Push 10 +Less2 +Not +If loc0112 +Push "i" +GetVariable +StoreRegister 0 +Push 0.0 +StrictEquals +If loc00b6 +Push register0, 5 +StrictEquals +If loc00c1 +Push register0, 10 +StrictEquals +If loc00cc +Push register0, 1 +StrictEquals +If loc00d7 +Jump loc00f7 +loc00b6:Push "zero" +Trace +Jump loc0103 +loc00c1:Push "five" +Trace +Jump loc00fd +loc00cc:Push "ten" +Trace +Jump loc00fd +loc00d7:Push "i" +GetVariable +Push 7 +Equals2 +Not +If loc00f1 +Jump loc0103 +loc00f1:Push "one" +Trace +loc00f7:Push "def" +Trace +loc00fd:Push "before loop end" +Trace +loc0103:Push "i", "i" +GetVariable +Increment +SetVariable +Jump loc0050 +loc0112: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_33/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_33/DoAction.as new file mode 100644 index 000000000..4feac47f0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_33/DoAction.as @@ -0,0 +1,14 @@ +DefineFunction2 "hello", 2, 3, false, false, true, false, true, false, true, false, false, 2, "what", 1, "second" { +Push "hello ", register2 +Add2 +Push "! " +Add2 +Push register1 +Add2 +Trace +} +Push "functionTest" +Trace +Push 7, "friend", 2, "hello" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_34/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_34/DoAction.as new file mode 100644 index 000000000..e3413321a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_34/DoAction.as @@ -0,0 +1,31 @@ +ConstantPool "multipleConditionsTest", "k", "first", "second", "finish" +Push "multipleConditionsTest" +Trace +Push "k", 5 +DefineLocal +Push "k" +GetVariable +Push 7 +Equals2 +PushDuplicate +Not +If loc0069 +Pop +Push "k" +GetVariable +Push 8 +Equals2 +loc0069:Not +If loc0075 +Push "first" +Trace +loc0075:Push "k" +GetVariable +Push 9 +Equals2 +Not +If loc0090 +Push "second" +Trace +loc0090:Push "finish" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_35/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_35/DoAction.as new file mode 100644 index 000000000..36f1e3566 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_35/DoAction.as @@ -0,0 +1,38 @@ +ConstantPool "multipleConditions2Test", "k", "first", "second", "finish" +Push "multipleConditions2Test" +Trace +Push "k", 5 +DefineLocal +Push "k" +GetVariable +Push 7 +Equals2 +PushDuplicate +Not +If loc006a +Pop +Push "k" +GetVariable +Push 8 +Equals2 +loc006a:Not +If loc0076 +Push "first" +Trace +loc0076:Push "k" +GetVariable +Push 9 +Equals2 +PushDuplicate +If loc009b +Pop +Push "k" +GetVariable +Push 6 +Equals2 +loc009b:Not +If loc00a7 +Push "second" +Trace +loc00a7:Push "finish" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_36/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_36/DoAction.as new file mode 100644 index 000000000..3c5417e60 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_36/DoAction.as @@ -0,0 +1,23 @@ +ConstantPool "chainedAssignmentsTest", "a", "b", "c", "d" +Push "chainedAssignmentsTest" +Trace +Push "a", 7 +DefineLocal +Push "b", 8 +DefineLocal +Push "c", 9 +DefineLocal +Push "d", "c", "b", "a", 10 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +DefineLocal +Push "d" +GetVariable +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_37/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_37/DoAction.as new file mode 100644 index 000000000..beae37329 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_37/DoAction.as @@ -0,0 +1,50 @@ +ConstantPool "objectsTest", "flashBox", "box1", "Box", "_root", "onEnterFrame", "moveUp", "ship", "Ship", "enemy", "Enemy", "moveDown", "moveRight", "moveLeft", "c", "Cox" +Push "objectsTest" +Trace +Push "flashBox", "box1" +GetVariable +Push 1, "Box" +NewObject +DefineLocal +Push "_root" +GetVariable +Push "onEnterFrame" +DefineFunction "", 0 { +Push 0.0, "flashBox" +GetVariable +Push "moveUp" +CallMethod +Pop +} +SetMember +Push "ship", 200, 1, "Ship" +NewObject +DefineLocal +Push "enemy", 56, 1, "Enemy" +NewObject +DefineLocal +Push 0.5, 1, "ship" +GetVariable +Push "moveDown" +CallMethod +Pop +Push 0.2, 1, "ship" +GetVariable +Push "moveUp" +CallMethod +Pop +Push 230, 1, "enemy" +GetVariable +Push "moveRight" +CallMethod +Pop +Push 100, 1, "enemy" +GetVariable +Push "moveLeft" +CallMethod +Pop +Push "c", "box1" +GetVariable +Push 1, "Cox" +NewObject +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_38/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_38/DoAction.as new file mode 100644 index 000000000..3c1869b3c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_38/DoAction.as @@ -0,0 +1,29 @@ +ConstantPool "doWhile2Test", "k" +Push "doWhile2Test" +Trace +Push "k", 5 +DefineLocal +loc0025:Push "k", "k" +GetVariable +Increment +SetVariable +Push "k" +GetVariable +Push 7 +Equals2 +Not +If loc0058 +Push "k", 5, "k" +GetVariable +Multiply +SetVariable +Jump loc0067 +loc0058:Push "k", 5, "k" +GetVariable +Add2 +SetVariable +loc0067:Push "k" +GetVariable +Push 9 +Less2 +If loc0025 diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_39/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_39/DoAction.as new file mode 100644 index 000000000..20e87b986 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_39/DoAction.as @@ -0,0 +1,34 @@ +ConstantPool "whileAndTest", "a", "b" +Push "whileAndTest" +Trace +Push "a", 5 +DefineLocal +Push "b", 10 +DefineLocal +loc0032:Push "a" +GetVariable +Push 10 +Less2 +PushDuplicate +Not +If loc0058 +Pop +Push "b" +GetVariable +Push 1 +Greater +loc0058:Not +If loc0077 +Push "a", "a" +GetVariable +Increment +SetVariable +Push "b", "b" +GetVariable +Decrement +SetVariable +Jump loc0032 +loc0077:Push "a", 7 +SetVariable +Push "b", 9 +SetVariable diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_40/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_40/DoAction.as new file mode 100644 index 000000000..2585e6ff8 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_40/DoAction.as @@ -0,0 +1,59 @@ +ConstantPool "forInTest", "testForIn", "arr", "a" +DefineFunction2 "testForIn", 0, 3, false, false, true, false, true, false, true, false, false { +Push 0.0 +InitArray +StoreRegister 1 +Pop +Push register1 +Enumerate2 +loc004b:StoreRegister 0 +Push null +Equals2 +If loc00b2 +Push register0 +StoreRegister 2 +Pop +Push register2, 3 +Greater +Not +If loc00ad +Push register2, 5 +Equals2 +Not +If loc0099 +loc0085:Push null +Equals2 +Not +If loc0085 +Push 7 +Return +loc0099:Push null +Equals2 +Not +If loc0099 +Push 8 +Return +loc00ad:Jump loc004b +} +loc00b2:Push "forInTest" +Trace +Push 0.0, "testForIn" +CallFunction +Trace +Push "arr", 0.0 +InitArray +DefineLocal +Push "arr" +GetVariable +Enumerate2 +loc00df:StoreRegister 0 +Push null +Equals2 +If loc0101 +Push "a", register0 +DefineLocal +Push "a" +GetVariable +Trace +Jump loc00df +loc0101: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_41/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_41/DoAction.as new file mode 100644 index 000000000..704a72aeb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_41/DoAction.as @@ -0,0 +1,47 @@ +ConstantPool "tryTest", "k", "bug ", "e", "huu", "next", "bug2 ", "next2", "final", "end" +Push "tryTest" +Trace +Push "k", 5 +DefineLocal +Try "e" { +Push "k", Infinity +SetVariable +Jump loc0070 +} +Catch { +Push "bug ", "e" +GetVariable +Add2 +Trace +} +Finally { +loc0070:Push "huu" +Trace +} +Push "next" +Trace +Try "e" { +Push "k", 6 +SetVariable +Jump loc00a2 +} +Catch { +Push "bug2 ", "e" +GetVariable +Add2 +Trace +} +loc00a2:Push "next2" +Trace +Push "k", 5 +DefineLocal +Try { +Push "k", Infinity +SetVariable +} +Finally { +Push "final" +Trace +} +Push "end" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_42/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_42/DoAction.as new file mode 100644 index 000000000..a503b62b2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_42/DoAction.as @@ -0,0 +1,14 @@ +ConstantPool "indicesTest", "k", "b" +Push "indicesTest" +Trace +Push "k", 3, 2, 1, 3 +InitArray +DefineLocal +Push "b", "k" +GetVariable +Push 1 +GetMember +DefineLocal +Push "b" +GetVariable +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_43/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_43/DoAction.as new file mode 100644 index 000000000..8ce918f87 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_43/DoAction.as @@ -0,0 +1,61 @@ +ConstantPool "incDecTest", "i", "b", "c", "a:", "a", " b:", " c:", "arr", "d", "tst" +DefineFunction "tst", 0 { +Push 1 +Return +} +Push "incDecTest" +Trace +Push "i", 5 +DefineLocal +Push "b", "i" +GetVariable +Push "i", "i" +GetVariable +Increment +SetVariable +DefineLocal +Push "c", "i", "i" +GetVariable +Decrement +StoreRegister 0 +SetVariable +Push register0, 5 +Add2 +DefineLocal +Push "a:", "a" +GetVariable +Add2 +Push " b:" +Add2 +Push "b" +GetVariable +Add2 +Push " c:" +Add2 +Push "c" +GetVariable +Add2 +Trace +Push "arr", 3, 2, 1, 3 +InitArray +DefineLocal +Push "d", "arr" +GetVariable +Push 0.0, "tst" +CallFunction +GetMember +Push "arr" +GetVariable +Push 0.0, "tst" +CallFunction +Push "arr" +GetVariable +Push 0.0, "tst" +CallFunction +GetMember +Increment +SetMember +DefineLocal +Push "d" +GetVariable +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_44/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_44/DoAction.as new file mode 100644 index 000000000..2b98ead26 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_44/DoAction.as @@ -0,0 +1,65 @@ +ConstantPool "chainedAssignments2Test", "a", "b", "c", "d", "i" +Push "chainedAssignments2Test" +Trace +Push "a", 5 +DefineLocal +Push "b", 6 +DefineLocal +Push "c", 7 +DefineLocal +Push "d", "c", "b", "a", 4 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +DefineLocal +Push "d", "c", "b", "a", 7 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0, 2 +Greater +Not +If loc00c8 +Push "d" +GetVariable +Trace +loc00c8:Push "d" +GetVariable +Push 1 +Add2 +Trace +Push "i", 0.0 +DefineLocal +loc00e7:Push "i" +GetVariable +Push 5 +Less2 +Not +If loc0125 +Push "i" +GetVariable +Push 7 +Equals2 +Not +If loc0116 +Jump loc0116 +loc0116:Push "i", "i" +GetVariable +Increment +SetVariable +Jump loc00e7 +loc0125: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_45/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_45/DoAction.as new file mode 100644 index 000000000..52257650b --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_45/DoAction.as @@ -0,0 +1,21 @@ +DefineFunction2 "a", 0, 2, false, false, true, false, true, false, true, false, false { +Push "hi" +Trace +Push 5 +StoreRegister 1 +Pop +Push register1, 7 +Equals2 +Not +If loc0037 +Push undefined +Return +loc0037:Push register1, 9 +Multiply +StoreRegister 1 +Pop +Push register1 +Trace +} +Push "function2Test" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_46/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_46/DoAction.as new file mode 100644 index 000000000..b21abe36d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_46/DoAction.as @@ -0,0 +1,34 @@ +DefineFunction2 "testtry", 0, 2, false, false, true, false, true, false, true, false, false { +Push 5 +StoreRegister 1 +Pop +Try "e" { +Push register1, 3 +Equals2 +Not +If loc0041 +Push undefined +Return +loc0041:Push register1, 4 +Equals2 +Not +If loc0067 +Push 0.0, "Error" +NewObject +Throw +loc0067:Push 7 +StoreRegister 1 +Pop +Jump loc0084 +} +Catch { +Push "error" +Trace +} +Finally { +loc0084:Push "finally" +Trace +} +} +Push "tryFunctionTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_47/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_47/DoAction.as new file mode 100644 index 000000000..bc40833a7 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_47/DoAction.as @@ -0,0 +1,17 @@ +ConstantPool "ternarTest", "a", "b" +Push "ternarTest" +Trace +Push "a", 5 +DefineLocal +Push "b", "a" +GetVariable +Push 4 +Equals2 +If loc0048 +Push 3 +Jump loc0050 +loc0048:Push 2 +loc0050:DefineLocal +Push "b" +GetVariable +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_48/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_48/DoAction.as new file mode 100644 index 000000000..5b0352d39 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_48/DoAction.as @@ -0,0 +1,60 @@ +DefineFunction2 "tst", 0, 4, false, false, true, false, true, false, true, false, false { +Push 0.0 +InitArray +StoreRegister 2 +Pop +Push register2, 0.0, 0.0 +InitArray +SetMember +Push register2 +Enumerate2 +loc003f:StoreRegister 0 +Push null +Equals2 +If loc00d4 +Push register0 +StoreRegister 3 +Pop +Push register3 +Enumerate2 +loc005d:StoreRegister 0 +Push null +Equals2 +If loc00aa +Push register0 +StoreRegister 1 +Pop +Push register1, 5 +Equals2 +Not +If loc00a5 +loc0086:Push null +Equals2 +Not +If loc0086 +loc0091:Push null +Equals2 +Not +If loc0091 +Push 5 +Return +loc00a5:Jump loc005d +loc00aa:Push register3, 8 +Equals2 +Not +If loc00cf +loc00bb:Push null +Equals2 +Not +If loc00bb +Push 3 +Return +loc00cf:Jump loc003f +loc00d4:Push 8 +Return +} +Push "forInInTest" +Trace +Push 0.0, "tst" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_49/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_49/DoAction.as new file mode 100644 index 000000000..803876d28 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_49/DoAction.as @@ -0,0 +1,17 @@ +DefineFunction2 "tst", 1, 2, false, false, true, false, true, false, true, false, false, 0, "px" { +Push 57 +StoreRegister 1 +Pop +Push register1, 27 +Multiply +StoreRegister 1 +Pop +} +Push "registersFuncTest" +Trace +Push 5, 1, "tst" +CallFunction +Pop +Push "s", 5 +ToString +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_50/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_50/DoAction.as new file mode 100644 index 000000000..9de34989c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_50/DoAction.as @@ -0,0 +1,5 @@ +Push "ifFrameLoadedTest" +Trace +WaitForFrame 9, 2 +Push "loaded" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_51/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_51/DoAction.as new file mode 100644 index 000000000..90927e14c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_51/DoAction.as @@ -0,0 +1,42 @@ +ConstantPool "c", "hi", "e", "d", "f", "dd", "function3Test", "tst" +DefineFunction2 "tst", 0, 2, false, false, true, false, true, false, true, false, false { +Push 5 +StoreRegister 1 +Pop +Push "c", 8 +StoreRegister 1 +SetVariable +Push "hi" +Trace +Push register1 +Trace +Push "e", "d", "f", "c", 9 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0 +StoreRegister 0 +SetVariable +Push register0, 5 +Greater +Not +If loc00a5 +Push "dd" +Trace +} +loc00a5:Push "function3Test" +Trace +Push "c", 7 +DefineLocal +Push "d", 7 +DefineLocal +Push "e", 8 +DefineLocal +Push 0.0, "tst" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_52/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_52/DoAction.as new file mode 100644 index 000000000..3ba6c485c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_52/DoAction.as @@ -0,0 +1,40 @@ +ConstantPool "commaOperatorTest", "a", "b", "c", "konec" +Push "commaOperatorTest" +Trace +Push "a", 0.0 +DefineLocal +Push "b", 0.0 +DefineLocal +Push "c", 0.0 +DefineLocal +loc0056:Push "a" +GetVariable +Push "a", "a" +GetVariable +Increment +SetVariable +Pop +Push "b", "b" +GetVariable +Push 2 +Add2 +StoreRegister 0 +SetVariable +Push register0 +Pop +Push "c" +GetVariable +Push 10 +Less2 +Not +If loc00ae +Push "c" +GetVariable +Trace +Push "c", "c" +GetVariable +Increment +SetVariable +Jump loc0056 +loc00ae:Push "konec" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_53/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_53/DoAction.as new file mode 100644 index 000000000..b9fa6457f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_53/DoAction.as @@ -0,0 +1,40 @@ +ConstantPool "commaOperator2Test", "k", "h", "f", "b", "gg", "ss" +Push "commaOperator2Test" +Trace +Push "k", 8 +DefineLocal +loc0037:Push "k" +GetVariable +Push 9 +Equals2 +Not +If loc0078 +Push "h" +Trace +Push "k" +GetVariable +Push 9 +Equals2 +Not +If loc0072 +Push "f" +Trace +Jump loc007e +loc0072:Push "b" +Trace +loc0078:Push "gg" +Trace +loc007e:Push "k" +GetVariable +Push "k", "k" +GetVariable +Increment +SetVariable +Pop +Push "k" +GetVariable +Push 10 +Less2 +If loc0037 +Push "ss" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_54/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_54/DoAction.as new file mode 100644 index 000000000..67cabd6d9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_54/DoAction.as @@ -0,0 +1,32 @@ +DefineFunction2 "tst", 0, 2, false, false, true, false, true, false, true, false, false { +Push 5 +StoreRegister 1 +Pop +loc001b:Push register1, 10 +Less2 +Not +If loc006f +Push register1, 5 +Equals2 +Not +If loc0059 +Push register1, 6 +Equals2 +Not +If loc0054 +Push true +Return +loc0054:Jump loc005f +loc0059:Push false +Return +loc005f:Push register1 +Increment +StoreRegister 1 +Pop +Jump loc001b +} +loc006f:Push "function4Test" +Trace +Push 0.0, "tst" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_55/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_55/DoAction.as new file mode 100644 index 000000000..e65ad87af --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_55/DoAction.as @@ -0,0 +1,4 @@ +Push "pushTest" +Trace +Push 53 +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_56/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_56/DoAction.as new file mode 100644 index 000000000..4268b6abd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_56/DoAction.as @@ -0,0 +1,29 @@ +ConstantPool "commaOperator3Test", "k", "end" +Push "commaOperator3Test" +Trace +Push "k", 1 +DefineLocal +loc002f:Push "k" +GetVariable +Push "k", "k" +GetVariable +Increment +SetVariable +Pop +Push "k" +GetVariable +Push 10 +Less2 +Not +If loc0073 +Push "k", "k" +GetVariable +Push 5 +Multiply +SetVariable +Push "k" +GetVariable +Trace +Jump loc002f +loc0073:Push "end" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_57/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_57/DoAction.as new file mode 100644 index 000000000..f5cce5443 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_57/DoAction.as @@ -0,0 +1,46 @@ +ConstantPool "commaOperator4Test", "k", "a", "d", "b", "end" +Push "commaOperator4Test" +Trace +Push "k", 0.0 +DefineLocal +loc0039:Push "k" +GetVariable +Trace +Push "k" +GetVariable +Push 8 +Equals2 +Not +If loc0081 +Push "a" +Trace +Push "k" +GetVariable +Push 9 +Equals2 +Not +If loc0075 +Jump loc008b +loc0075:Push "d" +Trace +Push "b" +Trace +loc0081:Push "k", "k" +GetVariable +Increment +SetVariable +loc008b:Push "k", "k" +GetVariable +Push 5 +Add2 +StoreRegister 0 +SetVariable +Push register0 +Pop +Push "k" +GetVariable +Push 20 +Less2 +If loc0039 +Push "end" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_58/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_58/DoAction.as new file mode 100644 index 000000000..fc7e6cd1d --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_58/DoAction.as @@ -0,0 +1,205 @@ +ConstantPool "test", "globalFunctionsTest", "k", "Array", "a", "b", "Boolean", "c", "A", "clearInterval", "clearTimeout", "mc", "copy", "how", "escape", "f", "http://localhost/", "wnd", "/:$version", "loaded", "isFinite", "isNaN", "http://localhost/test.swf", "_level5", "http://localhost/vars.txt", "_level4", "aaaa", "destroyPC", "MMExecute", "Object", "parseFloat", "parseInt", "print:#bframe", "printasbitmap:#bframe", "tst", "setInterval", "ts", "setTimeout", "showRedrawRegions", "aa", "told", "unescape", "", "updateAfterEvent" +DefineFunction "tst", 1, "p1" { +Push "test" +Trace +} +Push "globalFunctionsTest" +Trace +Push "k", 3, 2, 1, 3, "Array" +CallFunction +DefineLocal +Push "a", 1 +DefineLocal +Push "b", "a" +GetVariable +Push 1, "Boolean" +CallFunction +DefineLocal +Push 5 +Call +Push "c", "A" +DefineLocal +Push 5, 1, "clearInterval" +CallFunction +Pop +Push 4, 1, "clearTimeout" +CallFunction +Pop +Push "mc" +DefineLocal2 +Push "mc" +GetVariable +Push "copy", 16389 +CloneSprite +Push "a", "how", 1, "escape" +CallFunction +SetVariable +Push "f", "a" +GetVariable +DefineLocal +GetURL "FSCommand:alert(\"hi\");", "" +Push "a", "mc" +GetVariable +Push 6 +GetProperty +SetVariable +Push "a" +GetTime +SetVariable +Push "http://localhost/", "wnd" +GetURL2 false, false, 2 +Push "a", "/:$version" +GetVariable +SetVariable +GotoFrame 4 +Play +GotoFrame 7 +WaitForFrame 4, 2 +Push "loaded" +Trace +Push "a", "f" +GetVariable +ToInteger +SetVariable +Push "a", "f" +GetVariable +Push 1, "isFinite" +CallFunction +SetVariable +Push "a", "f" +GetVariable +Push 1, "isNaN" +CallFunction +SetVariable +Push "a", "f" +GetVariable +StringLength +SetVariable +Push "http://localhost/test.swf", "a" +GetVariable +GetURL2 false, true, 1 +Push "http://localhost/test.swf", "_level5" +GetURL2 false, false, 1 +Push "http://localhost/vars.txt", "a" +GetVariable +GetURL2 true, true, 1 +Push "http://localhost/vars.txt", "_level4" +GetURL2 true, false, 1 +Push "a", "f" +GetVariable +MBAsciiToChar +SetVariable +Push "a", "f" +GetVariable +MBStringLength +SetVariable +Push "a", "f" +GetVariable +MBCharToAscii +SetVariable +Push "a", "aaaa", 5, 4 +MBStringExtract +SetVariable +Push "destroyPC", 1, "MMExecute" +CallFunction +Pop +NextFrame +GotoFrame 0 +Push "a", "f" +GetVariable +ToNumber +SetVariable +Push "a", "f" +GetVariable +Push 1, "Object" +CallFunction +SetVariable +Push "a", "f" +GetVariable +CharToAscii +SetVariable +Push "a", "f" +GetVariable +Push 1, "parseFloat" +CallFunction +SetVariable +Push "a", 16, "f" +GetVariable +Push 2, "parseInt" +CallFunction +SetVariable +Play +PrevFrame +GotoFrame 0 +Push "print:#bframe", "mc" +GetVariable +GetURL2 false, false, 0 +Push "printasbitmap:#bframe", "mc" +GetVariable +GetURL2 false, false, 0 +Push "printasbitmap:#bframe", "_level5" +GetURL2 false, false, 0 +Push "print:#bframe", "_level4" +GetURL2 false, false, 0 +Push "a", 10 +RandomNumber +SetVariable +Push "mc" +GetVariable +RemoveSprite +Push "f" +GetVariable +Push 5, "tst" +GetVariable +Push 3, "setInterval" +CallFunction +Pop +Push "mc" +GetVariable +Push 6f, 25 +SetProperty +Push "f" +GetVariable +Push 5, "ts" +GetVariable +Push 3, "setTimeout" +CallFunction +Pop +Push 0.0, false, 2, "showRedrawRegions" +CallFunction +Pop +Push 5, 5, 6, 6, 1, 1, "mc" +GetVariable +StartDrag +Stop +StopSounds +EndDrag +Push "a", "f" +GetVariable +ToString +SetVariable +Push "a", "aa" +SetVariable +Push "f" +GetVariable +TargetPath +Pop +Push "mc" +GetVariable +SetTarget2 +Push "told" +Trace +SetTarget "" +ToggleQuality +Push "a", "f" +GetVariable +Push 1, "unescape" +CallFunction +SetVariable +Push "", "mc" +GetVariable +GetURL2 false, true, 0 +GetURL "", "_level4" +Push 0.0, "updateAfterEvent" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_59/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_59/DoAction.as new file mode 100644 index 000000000..93288f113 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_59/DoAction.as @@ -0,0 +1,22 @@ +ConstantPool "unaryOpTest", "a", "c", "d", "e" +Push "unaryOpTest" +Trace +Push "a", 5 +DefineLocal +Push "c", "a" +GetVariable +Push 4294967295.0 +BitXor +DefineLocal +Push "d", "a" +GetVariable +Push "c" +GetVariable +Add2 +Push 4294967295.0 +BitXor +DefineLocal +Push "e", 0.0, "c" +GetVariable +Subtract +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_60/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_60/DoAction.as new file mode 100644 index 000000000..d60a6d549 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_60/DoAction.as @@ -0,0 +1,51 @@ +ConstantPool "numbersTest", "x", "null:", "true:", "false:", "1:", "0x7fffffff:", "0x80000000:", "-0x80000000:", "-0x80000001:" +Push "numbersTest" +Trace +Push "x", null +DefineLocal +Push "null:", "x" +GetVariable +Add2 +Trace +Push "x", true +SetVariable +Push "true:", "x" +GetVariable +Add2 +Trace +Push "x", false +SetVariable +Push "false:", "x" +GetVariable +Add2 +Trace +Push "x", 1 +SetVariable +Push "1:", "x" +GetVariable +Add2 +Trace +Push "x", 2147483647 +SetVariable +Push "0x7fffffff:", "x" +GetVariable +Add2 +Trace +Push "x", 2147483648.0 +SetVariable +Push "0x80000000:", "x" +GetVariable +Add2 +Trace +Push "x", -2147483648 +SetVariable +Push "-0x80000000:", "x" +GetVariable +Add2 +Trace +Push "x", -2147483649 +SetVariable +Push "-0x80000001:", "x" +GetVariable +Add2 +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_61/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_61/DoAction.as new file mode 100644 index 000000000..cd8fb5c8c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_61/DoAction.as @@ -0,0 +1,27 @@ +ConstantPool "switchDefaultTest", "k", "default 5", "default 5,6", "7", "afterSwitch" +Push "switchDefaultTest" +Trace +Push "k", 5 +DefineLocal +Push "k" +GetVariable +StoreRegister 0 +Push 5 +StrictEquals +If loc008b +Push register0, 6 +StrictEquals +If loc0091 +Push register0, 7 +StrictEquals +If loc009c +Jump loc008b +loc008b:Push "default 5" +Trace +loc0091:Push "default 5,6" +Trace +Jump loc00a2 +loc009c:Push "7" +Trace +loc00a2:Push "afterSwitch" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_62/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_62/DoAction.as new file mode 100644 index 000000000..071e14b13 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_62/DoAction.as @@ -0,0 +1,30 @@ +ConstantPool "switchDefaultTest2", "k", "5", "default", "default, 6", "7", "afterSwitch" +Push "switchDefaultTest2" +Trace +Push "k", 5 +DefineLocal +Push "k" +GetVariable +StoreRegister 0 +Push 5 +StrictEquals +If loc008b +Push register0, 6 +StrictEquals +If loc009c +Push register0, 7 +StrictEquals +If loc00a7 +Jump loc0096 +loc008b:Push "5" +Trace +Jump loc00ad +loc0096:Push "default" +Trace +loc009c:Push "default, 6" +Trace +Jump loc00ad +loc00a7:Push "7" +Trace +loc00ad:Push "afterSwitch" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_63/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_63/DoAction.as new file mode 100644 index 000000000..c14470b49 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_63/DoAction.as @@ -0,0 +1,34 @@ +ConstantPool "a", "functionVariablesTest" +DefineFunction2 "outfunc", 0, 5, false, false, true, false, true, false, true, false, false { +DefineFunction2 "", 0, 4, false, false, true, false, true, false, true, false, false { +Push "a", 5 +DefineLocal +Push 6 +StoreRegister 3 +Pop +DefineFunction2 "", 0, 2, false, false, true, false, true, false, true, false, false { +Push "a" +GetVariable +Push 2 +Add2 +StoreRegister 1 +Pop +Push register1 +Trace +Push register1 +Return +} +StoreRegister 2 +Pop +Push 0.0, register2, undefined +CallMethod +Return +} +StoreRegister 2 +Pop +Push 0.0, register2, undefined +CallMethod +Return +} +Push "functionVariablesTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_64/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_64/DoAction.as new file mode 100644 index 000000000..36c5224c2 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_64/DoAction.as @@ -0,0 +1,37 @@ +ConstantPool "a", "functionInnerParametersTest" +DefineFunction2 "outfunc", 0, 5, false, false, true, false, true, false, true, false, false { +DefineFunction2 "", 2, 5, false, false, true, false, true, false, true, false, false, 0, "a", 4, "x" { +Push "a" +GetVariable +Push 3 +Add2 +Push register4 +Add2 +StoreRegister 3 +Pop +DefineFunction2 "", 0, 2, false, false, true, false, true, false, true, false, false { +Push "a" +GetVariable +Push 2 +Add2 +StoreRegister 1 +Pop +Push register1 +Trace +Push register1 +Return +} +StoreRegister 2 +Pop +Push 0.0, register2, undefined +CallMethod +Return +} +StoreRegister 2 +Pop +Push 2, 5, 2, register2, undefined +CallMethod +Return +} +Push "functionInnerParametersTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_65/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_65/DoAction.as new file mode 100644 index 000000000..8f2a0facf --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_65/DoAction.as @@ -0,0 +1,19 @@ +ConstantPool "loadClassesTest", "tst", "com", "jpexs", "flash", "test", "TestLoader", "includeTests" +Push "loadClassesTest" +Trace +Push "tst", 0.0, "com" +GetVariable +Push "jpexs" +GetMember +Push "flash" +GetMember +Push "test" +GetMember +Push "TestLoader" +NewMethod +DefineLocal +Push 0.0, "tst" +GetVariable +Push "includeTests" +CallMethod +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_66/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_66/DoAction.as new file mode 100644 index 000000000..c07818a27 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_66/DoAction.as @@ -0,0 +1,226 @@ +ConstantPool "obj", "b", "found", "hi", "after", "c", "hello", "hohoho", "key1", "key2", "key3", "a", "loop1_break", "loop2_break", "loop2_inside", "after_loop2", "loop1_inside", "after_loop1", "forInBreakTest" +DefineFunction2 "testFunc1", 0, 2, false, false, true, false, true, false, true, false, false { +Push "obj" +GetVariable +Enumerate2 +loc00ae:StoreRegister 0 +Push null +Equals2 +If loc00d1 +Push register0 +StoreRegister 1 +Pop +Push register1 +Trace +Jump loc00ae +} +loc00d1:DefineFunction2 "testFunc2", 0, 2, false, false, true, false, true, false, true, false, false { +Push "obj" +GetVariable +Enumerate2 +loc00ec:StoreRegister 0 +Push null +Equals2 +If loc012d +Push register0 +StoreRegister 1 +Pop +Push register1, "b" +Equals2 +Not +If loc011d +Push "found" +Trace +Jump loc0122 +loc011d:Jump loc00ec +loc0122:Push null +Equals2 +Not +If loc0122 +} +loc012d:DefineFunction2 "testFunc3", 0, 2, false, false, true, false, true, false, true, false, false { +Push "obj" +GetVariable +Enumerate2 +loc0148:StoreRegister 0 +Push null +Equals2 +If loc0189 +Push register0 +StoreRegister 1 +Pop +Push register1, "b" +Equals2 +Not +If loc0179 +Push "hi" +Trace +Jump loc017e +loc0179:Jump loc0148 +loc017e:Push null +Equals2 +Not +If loc017e +loc0189:Push "after" +Trace +} +DefineFunction2 "testFunc4", 0, 2, false, false, true, false, true, false, true, false, false { +Push "obj" +GetVariable +Enumerate2 +loc01aa:StoreRegister 0 +Push null +Equals2 +If loc020a +Push register0 +StoreRegister 1 +Pop +Push register1, "b" +Equals2 +Not +If loc01db +Push "hi" +Trace +Jump loc01ff +loc01db:Push register1, "c" +Equals2 +Not +If loc01f4 +Push "hello" +Trace +Jump loc01ff +loc01f4:Push "hohoho" +Trace +Jump loc01aa +loc01ff:Push null +Equals2 +Not +If loc01ff +loc020a:Push "after" +Trace +} +DefineFunction2 "testFunc5", 0, 7, false, false, true, false, true, false, true, false, false { +Push "key1", 1, "key2", 2, "key3", 3, 3 +InitObject +StoreRegister 1 +Pop +Push "obj" +GetVariable +Enumerate2 +loc024e:StoreRegister 0 +Push null +Equals2 +If loc02fc +Push register0 +StoreRegister 3 +Pop +Push register3, "a" +Equals2 +Not +If loc027f +Push "loop1_break" +Trace +Jump loc02f1 +loc027f:Push register3, "b" +Equals2 +Not +If loc02e6 +Push "hello" +Trace +Push register1 +Enumerate2 +loc0299:StoreRegister 0 +Push null +Equals2 +If loc02e0 +Push register0 +StoreRegister 2 +Pop +Push register2, "key1" +Equals2 +Not +If loc02ca +Push "loop2_break" +Trace +Jump loc02d5 +loc02ca:Push "loop2_inside" +Trace +Jump loc0299 +loc02d5:Push null +Equals2 +Not +If loc02d5 +loc02e0:Push "after_loop2" +Trace +loc02e6:Push "loop1_inside" +Trace +Jump loc024e +loc02f1:Push null +Equals2 +Not +If loc02f1 +loc02fc:Push "after_loop1" +Trace +} +DefineFunction2 "testFunc6", 0, 7, false, false, true, false, true, false, true, false, false { +Push "key1", 1, "key2", 2, "key3", 3, 3 +InitObject +StoreRegister 1 +Pop +Push "obj" +GetVariable +Enumerate2 +loc0340:StoreRegister 0 +Push null +Equals2 +If loc03da +Push register0 +StoreRegister 3 +Pop +Push register3, "a" +Equals2 +Not +If loc0371 +Push "loop1_break" +Trace +Jump loc03cf +loc0371:Push "hello" +Trace +Push register1 +Enumerate2 +loc037d:StoreRegister 0 +Push null +Equals2 +If loc03c4 +Push register0 +StoreRegister 2 +Pop +Push register2, "key1" +Equals2 +Not +If loc03ae +Push "loop2_break" +Trace +Jump loc03b9 +loc03ae:Push "loop2_inside" +Trace +Jump loc037d +loc03b9:Push null +Equals2 +Not +If loc03b9 +loc03c4:Push "after_loop2" +Trace +Jump loc0340 +loc03cf:Push null +Equals2 +Not +If loc03cf +loc03da:Push "after_loop1" +Trace +} +Push "forInBreakTest" +Trace +Push "obj", "a", 5, "b", 6, "c", 7, 3 +InitObject +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_67/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_67/DoAction.as new file mode 100644 index 000000000..c4ccbb028 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_67/DoAction.as @@ -0,0 +1,1456 @@ +ConstantPool "place1", "place2", "place3", "after switch", "switchVariantsTest" +DefineFunction2 "test1", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0084 +Push register0, 2 +StrictEquals +If loc008a +Jump loc0090 +loc0084:Push "place1" +Trace +loc008a:Push "place2" +Trace +loc0090:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test2", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc00f6 +Push register0, 2 +StrictEquals +If loc00f6 +Push register0, 3 +StrictEquals +If loc00f6 +Jump loc00fc +loc00f6:Push "place3" +Trace +loc00fc:Push "after switch" +Trace +} +DefineFunction2 "test3", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc015c +Push register0, 2 +StrictEquals +If loc0162 +Push register0, 3 +StrictEquals +If loc0168 +Jump loc016e +loc015c:Push "place1" +Trace +loc0162:Push "place2" +Trace +loc0168:Push "place3" +Trace +loc016e:Push "after switch" +Trace +} +DefineFunction2 "test4", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc01be +Push register0, 2 +StrictEquals +If loc01c9 +Jump loc01cf +loc01be:Push "place1" +Trace +Jump loc01d5 +loc01c9:Push "place2" +Trace +loc01cf:Push "place3" +Trace +loc01d5:Push "after switch" +Trace +} +DefineFunction2 "test5", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0235 +Push register0, 2 +StrictEquals +If loc0240 +Push register0, 3 +StrictEquals +If loc0246 +Jump loc024c +loc0235:Push "place1" +Trace +Jump loc024c +loc0240:Push "place2" +Trace +loc0246:Push "place3" +Trace +loc024c:Push "after switch" +Trace +} +DefineFunction2 "test6", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc029c +Push register0, 2 +StrictEquals +If loc02a2 +Jump loc02a2 +loc029c:Push "place1" +Trace +loc02a2:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test7", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc02f8 +Push register0, 2 +StrictEquals +If loc02fe +Jump loc0309 +loc02f8:Push "place1" +Trace +loc02fe:Push "place2" +Trace +Jump loc030f +loc0309:Push "place3" +Trace +loc030f:Push "after switch" +Trace +} +DefineFunction2 "test8", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc036f +Push register0, 2 +StrictEquals +If loc036f +Push register0, 3 +StrictEquals +If loc0375 +Jump loc037b +loc036f:Push "place2" +Trace +loc0375:Push "place3" +Trace +loc037b:Push "after switch" +Trace +} +DefineFunction2 "test9", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc03db +Push register0, 2 +StrictEquals +If loc03e1 +Push register0, 3 +StrictEquals +If loc03e1 +Jump loc03e7 +loc03db:Push "place1" +Trace +loc03e1:Push "place3" +Trace +loc03e7:Push "after switch" +Trace +} +DefineFunction2 "test10", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0438 +Push register0, 2 +StrictEquals +If loc044e +Jump loc0443 +loc0438:Push "place1" +Trace +Jump loc0454 +loc0443:Push "place2" +Trace +Jump loc0454 +loc044e:Push "place3" +Trace +loc0454:Push "after switch" +Trace +} +DefineFunction2 "test11", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc04b5 +Push register0, 2 +StrictEquals +If loc04c0 +Push register0, 3 +StrictEquals +If loc04cb +Jump loc04d1 +loc04b5:Push "place1" +Trace +Jump loc04d1 +loc04c0:Push "place2" +Trace +Jump loc04d1 +loc04cb:Push "place3" +Trace +loc04d1:Push "after switch" +Trace +} +DefineFunction2 "test12", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0532 +Push register0, 2 +StrictEquals +If loc053d +Push register0, 3 +StrictEquals +If loc053d +Jump loc0543 +loc0532:Push "place1" +Trace +Jump loc0543 +loc053d:Push "place3" +Trace +loc0543:Push "after switch" +Trace +} +DefineFunction2 "test13", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0594 +Push register0, 2 +StrictEquals +If loc059f +Jump loc0594 +loc0594:Push "place2" +Trace +Jump loc05a5 +loc059f:Push "place3" +Trace +loc05a5:Push "after switch" +Trace +} +DefineFunction2 "test14", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0606 +Push register0, 2 +StrictEquals +If loc0606 +Push register0, 3 +StrictEquals +If loc0611 +Jump loc0617 +loc0606:Push "place2" +Trace +Jump loc0617 +loc0611:Push "place3" +Trace +loc0617:Push "after switch" +Trace +} +DefineFunction2 "test15", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0678 +Push register0, 2 +StrictEquals +If loc067e +Push register0, 3 +StrictEquals +If loc0684 +Jump loc068a +loc0678:Push "place1" +Trace +loc067e:Push "place2" +Trace +loc0684:Push "place3" +Trace +loc068a:Push "after switch" +Trace +} +DefineFunction2 "test16", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc06eb +Push register0, 2 +StrictEquals +If loc06eb +Push register0, 3 +StrictEquals +If loc06eb +Jump loc06f1 +loc06eb:Push "place3" +Trace +loc06f1:Push "after switch" +Trace +} +DefineFunction2 "test17", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0742 +Push register0, 2 +StrictEquals +If loc074d +Jump loc0753 +loc0742:Push "place1" +Trace +Jump loc0753 +loc074d:Push "place2" +Trace +loc0753:Push "after switch" +Trace +} +DefineFunction2 "test18", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc07a4 +Push register0, 2 +StrictEquals +If loc07aa +Jump loc07b0 +loc07a4:Push "place1" +Trace +loc07aa:Push "place2" +Trace +loc07b0:Push "after switch" +Trace +} +DefineFunction2 "test19", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0801 +Push register0, 2 +StrictEquals +If loc0801 +Jump loc0807 +loc0801:Push "place2" +Trace +loc0807:Push "after switch" +Trace +} +DefineFunction2 "test20", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0868 +Push register0, 2 +StrictEquals +If loc0873 +Push register0, 3 +StrictEquals +If loc0879 +Jump loc087f +loc0868:Push "place1" +Trace +Jump loc087f +loc0873:Push "place2" +Trace +loc0879:Push "place3" +Trace +loc087f:Push "after switch" +Trace +} +DefineFunction2 "test21", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc08e0 +Push register0, 2 +StrictEquals +If loc08e6 +Push register0, 3 +StrictEquals +If loc08f1 +Jump loc08f7 +loc08e0:Push "place1" +Trace +loc08e6:Push "place2" +Trace +Jump loc08f7 +loc08f1:Push "place3" +Trace +loc08f7:Push "after switch" +Trace +} +DefineFunction2 "test22", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0958 +Push register0, 2 +StrictEquals +If loc095e +Push register0, 3 +StrictEquals +If loc0969 +Jump loc096f +loc0958:Push "place1" +Trace +loc095e:Push "place2" +Trace +Jump loc096f +loc0969:Push "place3" +Trace +loc096f:Push "after switch" +Trace +} +DefineFunction2 "test23", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc09c0 +Push register0, 2 +StrictEquals +If loc09cb +Jump loc09d6 +loc09c0:Push "place1" +Trace +Jump loc09dc +loc09cb:Push "place2" +Trace +Jump loc09dc +loc09d6:Push "place3" +Trace +loc09dc:Push "after switch" +Trace +} +DefineFunction2 "test24", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0a2d +Push register0, 2 +StrictEquals +If loc0a2d +Jump loc0a33 +loc0a2d:Push "place2" +Trace +loc0a33:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test25", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0a9a +Push register0, 2 +StrictEquals +If loc0aa0 +Push register0, 3 +StrictEquals +If loc0aa0 +Jump loc0aa6 +loc0a9a:Push "place1" +Trace +loc0aa0:Push "place3" +Trace +loc0aa6:Push "after switch" +Trace +} +DefineFunction2 "test26", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0b07 +Push register0, 2 +StrictEquals +If loc0b07 +Push register0, 3 +StrictEquals +If loc0b0d +Jump loc0b13 +loc0b07:Push "place2" +Trace +loc0b0d:Push "place3" +Trace +loc0b13:Push "after switch" +Trace +} +DefineFunction2 "test27", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0b74 +Push register0, 2 +StrictEquals +If loc0b7f +Push register0, 3 +StrictEquals +If loc0b8a +Jump loc0b90 +loc0b74:Push "place1" +Trace +Jump loc0b90 +loc0b7f:Push "place2" +Trace +Jump loc0b90 +loc0b8a:Push "place3" +Trace +loc0b90:Push "after switch" +Trace +} +DefineFunction2 "test28", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0be1 +Push register0, 2 +StrictEquals +If loc0bec +Jump loc0bec +loc0be1:Push "place1" +Trace +Jump loc0bf2 +loc0bec:Push "place3" +Trace +loc0bf2:Push "after switch" +Trace +} +DefineFunction2 "test29", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0c43 +Push register0, 2 +StrictEquals +If loc0c43 +Jump loc0c4e +loc0c43:Push "place2" +Trace +Jump loc0c54 +loc0c4e:Push "place3" +Trace +loc0c54:Push "after switch" +Trace +} +DefineFunction2 "test30", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0cb5 +Push register0, 2 +StrictEquals +If loc0cc0 +Push register0, 3 +StrictEquals +If loc0cc0 +Jump loc0cc6 +loc0cb5:Push "place1" +Trace +Jump loc0cc6 +loc0cc0:Push "place3" +Trace +loc0cc6:Push "after switch" +Trace +} +DefineFunction2 "test31", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0d27 +Push register0, 2 +StrictEquals +If loc0d27 +Push register0, 3 +StrictEquals +If loc0d32 +Jump loc0d38 +loc0d27:Push "place2" +Trace +Jump loc0d38 +loc0d32:Push "place3" +Trace +loc0d38:Push "after switch" +Trace +} +DefineFunction2 "test32", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0d89 +Push register0, 2 +StrictEquals +If loc0d89 +Jump loc0d89 +loc0d89:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test33", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0de6 +Push register0, 2 +StrictEquals +If loc0dec +Jump loc0de0 +loc0de0:Push "place1" +Trace +loc0de6:Push "place2" +Trace +loc0dec:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test34", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0e53 +Push register0, 2 +StrictEquals +If loc0e59 +Push register0, 3 +StrictEquals +If loc0e5f +Jump loc0e65 +loc0e53:Push "place1" +Trace +loc0e59:Push "place2" +Trace +loc0e5f:Push "place3" +Trace +loc0e65:Push "after switch" +Trace +} +DefineFunction2 "test35", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0ec1 +Push register0, 2 +StrictEquals +If loc0ec7 +Jump loc0eb6 +loc0eb6:Push "place1" +Trace +Jump loc0ecd +loc0ec1:Push "place2" +Trace +loc0ec7:Push "place3" +Trace +loc0ecd:Push "after switch" +Trace +} +DefineFunction2 "test36", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0f24 +Push register0, 2 +StrictEquals +If loc0f2f +Jump loc0f1e +loc0f1e:Push "place1" +Trace +loc0f24:Push "place2" +Trace +Jump loc0f35 +loc0f2f:Push "place3" +Trace +loc0f35:Push "after switch" +Trace +} +DefineFunction2 "test37", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc0f96 +Push register0, 2 +StrictEquals +If loc0fa1 +Push register0, 3 +StrictEquals +If loc0fa7 +Jump loc0fad +loc0f96:Push "place1" +Trace +Jump loc0fad +loc0fa1:Push "place2" +Trace +loc0fa7:Push "place3" +Trace +loc0fad:Push "after switch" +Trace +} +DefineFunction2 "test38", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1004 +Push register0, 2 +StrictEquals +If loc1004 +Jump loc0ffe +loc0ffe:Push "place1" +Trace +loc1004:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test39", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc106b +Push register0, 2 +StrictEquals +If loc1071 +Push register0, 3 +StrictEquals +If loc107c +Jump loc1082 +loc106b:Push "place1" +Trace +loc1071:Push "place2" +Trace +Jump loc1082 +loc107c:Push "place3" +Trace +loc1082:Push "after switch" +Trace +} +DefineFunction2 "test40", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc10e3 +Push register0, 2 +StrictEquals +If loc10ee +Push register0, 3 +StrictEquals +If loc10f9 +Jump loc10ff +loc10e3:Push "place1" +Trace +Jump loc10ff +loc10ee:Push "place2" +Trace +Jump loc10ff +loc10f9:Push "place3" +Trace +loc10ff:Push "after switch" +Trace +} +DefineFunction2 "test41", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1160 +Push register0, 2 +StrictEquals +If loc1166 +Push register0, 3 +StrictEquals +If loc1166 +Jump loc116c +loc1160:Push "place1" +Trace +loc1166:Push "place3" +Trace +loc116c:Push "after switch" +Trace +} +DefineFunction2 "test42", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc11cd +Push register0, 2 +StrictEquals +If loc11cd +Push register0, 3 +StrictEquals +If loc11d3 +Jump loc11d9 +loc11cd:Push "place2" +Trace +loc11d3:Push "place3" +Trace +loc11d9:Push "after switch" +Trace +} +DefineFunction2 "test43", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc123a +Push register0, 2 +StrictEquals +If loc1245 +Push register0, 3 +StrictEquals +If loc1245 +Jump loc124b +loc123a:Push "place1" +Trace +Jump loc124b +loc1245:Push "place3" +Trace +loc124b:Push "after switch" +Trace +} +DefineFunction2 "test44", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc12ac +Push register0, 2 +StrictEquals +If loc12ac +Push register0, 3 +StrictEquals +If loc12b7 +Jump loc12bd +loc12ac:Push "place2" +Trace +Jump loc12bd +loc12b7:Push "place3" +Trace +loc12bd:Push "after switch" +Trace +} +DefineFunction2 "test45", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc131e +Push register0, 2 +StrictEquals +If loc131e +Push register0, 3 +StrictEquals +If loc131e +Jump loc1324 +loc131e:Push "place3" +Trace +loc1324:Push "after switch" +Trace +} +DefineFunction2 "test46", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1375 +Push register0, 2 +StrictEquals +If loc1381 +Jump loc137b +loc1375:Push "place1" +Trace +loc137b:Push "place2" +Trace +loc1381:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test47", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc13e8 +Push register0, 2 +StrictEquals +If loc13ee +Push register0, 3 +StrictEquals +If loc13f4 +Jump loc13fa +loc13e8:Push "place1" +Trace +loc13ee:Push "place2" +Trace +loc13f4:Push "place3" +Trace +loc13fa:Push "after switch" +Trace +} +DefineFunction2 "test48", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc144b +Push register0, 2 +StrictEquals +If loc145c +Jump loc1456 +loc144b:Push "place1" +Trace +Jump loc1462 +loc1456:Push "place2" +Trace +loc145c:Push "place3" +Trace +loc1462:Push "after switch" +Trace +} +DefineFunction2 "test49", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc14b3 +Push register0, 2 +StrictEquals +If loc14c4 +Jump loc14b9 +loc14b3:Push "place1" +Trace +loc14b9:Push "place2" +Trace +Jump loc14ca +loc14c4:Push "place3" +Trace +loc14ca:Push "after switch" +Trace +} +DefineFunction2 "test50", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc152b +Push register0, 2 +StrictEquals +If loc1536 +Push register0, 3 +StrictEquals +If loc153c +Jump loc1542 +loc152b:Push "place1" +Trace +Jump loc1542 +loc1536:Push "place2" +Trace +loc153c:Push "place3" +Trace +loc1542:Push "after switch" +Trace +} +DefineFunction2 "test51", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1593 +Push register0, 2 +StrictEquals +If loc1599 +Jump loc1593 +loc1593:Push "place2" +Trace +loc1599:Push "place3" +Trace +Push "after switch" +Trace +} +DefineFunction2 "test52", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1600 +Push register0, 2 +StrictEquals +If loc1606 +Push register0, 3 +StrictEquals +If loc1611 +Jump loc1617 +loc1600:Push "place1" +Trace +loc1606:Push "place2" +Trace +Jump loc1617 +loc1611:Push "place3" +Trace +loc1617:Push "after switch" +Trace +} +DefineFunction2 "test53", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1678 +Push register0, 2 +StrictEquals +If loc167e +Push register0, 3 +StrictEquals +If loc167e +Jump loc1684 +loc1678:Push "place1" +Trace +loc167e:Push "place3" +Trace +loc1684:Push "after switch" +Trace +} +DefineFunction2 "test54", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc16e0 +Push register0, 2 +StrictEquals +If loc16e0 +Jump loc16d5 +loc16d5:Push "place1" +Trace +Jump loc16e6 +loc16e0:Push "place3" +Trace +loc16e6:Push "after switch" +Trace +} +DefineFunction2 "test55", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1747 +Push register0, 2 +StrictEquals +If loc1747 +Push register0, 3 +StrictEquals +If loc174d +Jump loc1753 +loc1747:Push "place2" +Trace +loc174d:Push "place3" +Trace +loc1753:Push "after switch" +Trace +} +DefineFunction2 "test56", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc17af +Push register0, 2 +StrictEquals +If loc17ba +Jump loc17a4 +loc17a4:Push "place1" +Trace +Jump loc17c0 +loc17af:Push "place2" +Trace +Jump loc17c0 +loc17ba:Push "place3" +Trace +loc17c0:Push "after switch" +Trace +} +DefineFunction2 "test57", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1821 +Push register0, 2 +StrictEquals +If loc182c +Push register0, 3 +StrictEquals +If loc1837 +Jump loc183d +loc1821:Push "place1" +Trace +Jump loc183d +loc182c:Push "place2" +Trace +Jump loc183d +loc1837:Push "place3" +Trace +loc183d:Push "after switch" +Trace +} +DefineFunction2 "test58", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc189e +Push register0, 2 +StrictEquals +If loc18a9 +Push register0, 3 +StrictEquals +If loc18a9 +Jump loc18af +loc189e:Push "place1" +Trace +Jump loc18af +loc18a9:Push "place3" +Trace +loc18af:Push "after switch" +Trace +} +DefineFunction2 "test59", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1910 +Push register0, 2 +StrictEquals +If loc1910 +Push register0, 3 +StrictEquals +If loc191b +Jump loc1921 +loc1910:Push "place2" +Trace +Jump loc1921 +loc191b:Push "place3" +Trace +loc1921:Push "after switch" +Trace +} +DefineFunction2 "test60", 0, 2, false, false, true, false, true, false, true, false, false { +Push 100 +RandomNumber +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push 1 +StrictEquals +If loc1982 +Push register0, 2 +StrictEquals +If loc1982 +Push register0, 3 +StrictEquals +If loc1982 +Jump loc1988 +loc1982:Push "place3" +Trace +loc1988:Push "after switch" +Trace +} +Push "switchVariantsTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_68/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_68/DoAction.as new file mode 100644 index 000000000..ac0b4bb28 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_68/DoAction.as @@ -0,0 +1,153 @@ +ConstantPool "tryTypeTest", "a", "err:", "e", "MyError", "e1", "e2", "Error" +Push "tryTypeTest" +Trace +Push "a", 5 +DefineLocal +Try "e" { +Push "a", "a" +GetVariable +Push 0.0 +Divide +SetVariable +Jump loc0070 +} +Catch { +Push "err:", "e" +GetVariable +Add2 +Trace +} +loc0070:Try "e" { +Push "a", "a" +GetVariable +Push 0.0 +Divide +SetVariable +Jump loc00c1 +} +Catch { +Push "a" +GetVariable +Push 0.0 +Equals2 +Not +If loc00b7 +Push "e" +GetVariable +Throw +loc00b7:Push "err:", "e" +GetVariable +Add2 +Trace +} +loc00c1:Try register0 { +Push "a", "a" +GetVariable +Push 0.0 +Divide +SetVariable +Jump loc011b +} +Catch { +Push "MyError" +GetVariable +Push register0 +CastOp +PushDuplicate +Push null +Equals2 +If loc0114 +Push "e" +StackSwap +DefineLocal +Push "err:", "e" +GetVariable +Add2 +Trace +Jump loc011b +loc0114:Pop +Push register0 +Throw +} +loc011b:Try register0 { +Push "a", "a" +GetVariable +Push 0.0 +Divide +SetVariable +Jump loc0187 +} +Catch { +Push "MyError" +GetVariable +Push register0 +CastOp +PushDuplicate +Push null +Equals2 +If loc016e +Push "e1" +StackSwap +DefineLocal +Push "err:", "e1" +GetVariable +Add2 +Trace +Jump loc0187 +loc016e:Pop +Push register0, "e2" +StackSwap +DefineLocal +Push "err:", "e2" +GetVariable +Add2 +Trace +Jump loc0187 +} +loc0187:Try register0 { +Push "a", "a" +GetVariable +Push 0.0 +Divide +SetVariable +Jump loc020f +} +Catch { +Push "MyError" +GetVariable +Push register0 +CastOp +PushDuplicate +Push null +Equals2 +If loc01da +Push "e" +StackSwap +DefineLocal +Push "err:", "e" +GetVariable +Add2 +Trace +Jump loc020f +loc01da:Pop +Push "Error" +GetVariable +Push register0 +CastOp +PushDuplicate +Push null +Equals2 +If loc0208 +Push "e2" +StackSwap +DefineLocal +Push "err:", "e2" +GetVariable +Add2 +Trace +Jump loc020f +loc0208:Pop +Push register0 +Throw +} +loc020f: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_69/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_69/DoAction.as new file mode 100644 index 000000000..627196046 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_69/DoAction.as @@ -0,0 +1,25 @@ +ConstantPool "forInBreakTest", "obj", "a", "b", "c", "k", "after" +Push "forInBreakTest" +Trace +Push "obj", "a", 5, "b", 6, "c", 7, 3 +InitObject +DefineLocal +Push "obj" +GetVariable +Enumerate2 +StoreRegister 0 +Push null +Equals2 +If loc0081 +Push "k", register0 +DefineLocal +Push "k" +GetVariable +Trace +Jump loc0076 +loc0076:Push null +Equals2 +Not +If loc0076 +loc0081:Push "after" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_70/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_70/DoAction.as new file mode 100644 index 000000000..78b9b3657 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_70/DoAction.as @@ -0,0 +1,49 @@ +ConstantPool "forWithContinue2Test", "s", "A", "i", "B", "C", "D", "j", "E" +Push "forWithContinue2Test" +Trace +Push "s", "A" +DefineLocal +Push "i", 0.0 +DefineLocal +loc0047:Push "i" +GetVariable +Push 10 +Less2 +Not +If loc00d3 +Push "s" +GetVariable +Push "B" +Equals2 +Not +If loc0085 +Push "s" +GetVariable +Push "C" +Equals2 +Not +If loc0085 +Jump loc00c4 +loc0085:Push "D" +Trace +Push "j", 0.0 +DefineLocal +loc009a:Push "j" +GetVariable +Push 29 +Less2 +Not +If loc00c4 +Push "E" +Trace +Push "j", "j" +GetVariable +Increment +SetVariable +Jump loc009a +loc00c4:Push "i", "i" +GetVariable +Increment +SetVariable +Jump loc0047 +loc00d3: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_71/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_71/DoAction.as new file mode 100644 index 000000000..13f9d7869 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_71/DoAction.as @@ -0,0 +1,50 @@ +ConstantPool "bagr", "_locy_", "r1", ". ", "r2", "v1", "unk", "chainedAfterForInTest" +DefineFunction2 "f", 0, 5, false, false, true, false, true, false, true, false, false { +Push 5 +StoreRegister 4 +Pop +Push 0.0 +InitObject +StoreRegister 3 +Pop +Push "bagr" +StoreRegister 2 +Pop +Push "_locy_" +GetVariable +Enumerate2 +loc0073:StoreRegister 0 +Push null +Equals2 +If loc0096 +Push register0 +StoreRegister 1 +Pop +Push register1 +Trace +Jump loc0073 +loc0096:Push register3, "r1", register2, 1 +Add2 +Push ". " +Add2 +Push register4 +If loc00e1 +Push register3, "r2", "v1" +GetVariable +Push register2 +GetMember +Push 0.0 +GetMember +StoreRegister 0 +SetMember +Push register0 +Jump loc00e6 +loc00e1:Push "unk" +loc00e6:Add2 +SetMember +} +Push "chainedAfterForInTest" +Trace +Push "v1", 0.0 +InitObject +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_72/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_72/DoAction.as new file mode 100644 index 000000000..046a1d55c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_72/DoAction.as @@ -0,0 +1,50 @@ +DefineFunction2 "f", 0, 5, false, false, true, false, true, false, true, false, false { +Push 0.0 +InitObject +StoreRegister 3 +Pop +Push 0.0 +InitObject +StoreRegister 2 +Pop +Push register3 +Enumerate2 +loc0036:StoreRegister 0 +Push null +Equals2 +If loc00b5 +Push register0 +StoreRegister 4 +Pop +Push register2, register4 +GetMember +StoreRegister 1 +Pop +Push register1 +StoreRegister 0 +Push "A" +StrictEquals +If loc0091 +Push register0, "B" +StrictEquals +If loc0091 +Push register0, "C" +StrictEquals +If loc0091 +Jump loc00b0 +loc0091:Push "Ret 5" +Trace +loc009c:Push null +Equals2 +Not +If loc009c +Push 5 +Return +loc00b0:Jump loc0036 +loc00b5:Push "Final" +Trace +Push 10 +Return +} +Push "forInSwitchTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_73/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_73/DoAction.as new file mode 100644 index 000000000..f58f5bbb0 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_73/DoAction.as @@ -0,0 +1,23 @@ +ConstantPool "deleteTest", "obj", "a", "b", "salam likum", "bagr aa" +Push "deleteTest" +Trace +Push "obj", "a", 1, "b", 2, 2 +InitObject +DefineLocal +Push "obj" +GetVariable +Push "salam likum", 58 +SetMember +Push "obj" +GetVariable +Push "a" +Delete +Pop +Push "obj" +GetVariable +Push "salam likum" +Delete +Pop +Push "bagr aa" +Delete2 +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_74/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_74/DoAction.as new file mode 100644 index 000000000..1abc25704 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_74/DoAction.as @@ -0,0 +1,16 @@ +ConstantPool "setPropertyTest", "_root", "_rotation", "_root._rotation" +Push "setPropertyTest" +Trace +Push "_root", 10f, 45 +SetProperty +Push "_root" +GetVariable +Push "_rotation", 60 +SetMember +Push "_root", 10 +GetProperty +Trace +Push "_root._rotation", 60 +SetVariable +Push undefined +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_75/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_75/DoAction.as new file mode 100644 index 000000000..4f23d3a83 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_75/DoAction.as @@ -0,0 +1,740 @@ +ConstantPool "castOpTest", "a", "b", "flash", "display", "BitmapData", "external", "ExternalInterface", "filters", "BevelFilter", "BitmapFilter", "BlurFilter", "ColorMatrixFilter", "ConvolutionFilter", "DisplacementMapFilter", "DropShadowFilter", "GlowFilter", "GradientBevelFilter", "GradientGlowFilter", "geom", "ColorTransform", "Matrix", "Point", "Rectangle", "Transform", "net", "FileReference", "FileReferenceList", "text", "TextRenderer", "Accordion", "Alert", "Array", "Binding", "Boolean", "Button", "Camera", "Color", "ComboBox", "ComponentMixins", "ContextMenu", "ContextMenuItem", "CustomActions", "CheckBox", "DataGrid", "DataHolder", "DataSet", "DataType", "Date", "DateChooser", "DateField", "Delta", "DeltaItem", "DeltaPacket", "EndPoint", "Error", "FLVPlayback", "Form", "Function", "System", "IME", "Label", "List", "Loader", "LoadVars", "LocalConnection", "Log", "MediaController", "MediaDisplay", "MediaPlayback", "Menu", "MenuBar", "Microphone", "MovieClip", "MovieClipLoader", "NetConnection", "NetStream", "NumericStepper", "Object", "PendingCall", "PopUpManager", "PrintJob", "ProgressBar", "RadioButton", "RadioButtonGroup", "RDBMSResolver", "ScrollPane", "security", "SharedObject", "Slide", "SOAPCall", "Sound", "TextArea", "TextField", "TextFormat", "TextInput", "TextSnapshot", "Tree", "TypedValue", "UIScrollBar", "Void", "WebService", "WebServiceConnector", "Window", "XML", "XMLConnector", "XMLNode", "XMLSocket", "XMLUI", "XUpdateResolver" +Push "castOpTest" +Trace +Push "a", 5 +DefineLocal +Push "b", null +DefineLocal +Push "b", "flash" +GetVariable +Push "display" +GetMember +Push "BitmapData" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "external" +GetMember +Push "ExternalInterface" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "BevelFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "BitmapFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "BlurFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "ColorMatrixFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "ConvolutionFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "DisplacementMapFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "DropShadowFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "GlowFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "GradientBevelFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "filters" +GetMember +Push "GradientGlowFilter" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "geom" +GetMember +Push "ColorTransform" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "geom" +GetMember +Push "Matrix" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "geom" +GetMember +Push "Point" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "geom" +GetMember +Push "Rectangle" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "geom" +GetMember +Push "Transform" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "net" +GetMember +Push "FileReference" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "net" +GetMember +Push "FileReferenceList" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "flash" +GetVariable +Push "text" +GetMember +Push "TextRenderer" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "Accordion" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Alert" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Array" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "BevelFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Binding" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "BitmapData" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "BitmapFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "BlurFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Boolean" +CallFunction +SetVariable +Push "b", "Button" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "Camera" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "Color" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "ColorMatrixFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "ColorTransform" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "ComboBox" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "ComponentMixins" +CallFunction +SetVariable +Push "b", "ContextMenu" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "ContextMenuItem" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "ConvolutionFilter" +CallFunction +SetVariable +Push "b", "CustomActions" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "CheckBox" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DataGrid" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DataHolder" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DataSet" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DataType" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Date" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DateChooser" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DateField" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Delta" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DeltaItem" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DeltaPacket" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DisplacementMapFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "DropShadowFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "EndPoint" +CallFunction +SetVariable +Push "b", "Error" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "ExternalInterface" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "FileReference" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "FileReferenceList" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "FLVPlayback" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Form" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Function" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "GlowFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "GradientBevelFilter" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "GradientGlowFilter" +CallFunction +SetVariable +Push "b", "System" +GetVariable +Push "IME" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "Label" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "List" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Loader" +CallFunction +SetVariable +Push "b", "LoadVars" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "LocalConnection" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "Log" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Matrix" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "MediaController" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "MediaDisplay" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "MediaPlayback" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Menu" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "MenuBar" +CallFunction +SetVariable +Push "b", "Microphone" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "MovieClip" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "MovieClipLoader" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "NetConnection" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "NetStream" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +ToNumber +SetVariable +Push "b", "a" +GetVariable +Push 1, "NumericStepper" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Object" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "PendingCall" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Point" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "PopUpManager" +CallFunction +SetVariable +Push "b", "PrintJob" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "ProgressBar" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "RadioButton" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "RadioButtonGroup" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "RDBMSResolver" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Rectangle" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "ScrollPane" +CallFunction +SetVariable +Push "b", "System" +GetVariable +Push "security" +GetMember +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "SharedObject" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "Slide" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "SOAPCall" +CallFunction +SetVariable +Push "b", "Sound" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +ToString +SetVariable +Push "b", "a" +GetVariable +Push 1, "TextArea" +CallFunction +SetVariable +Push "b", "TextField" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "TextFormat" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "TextInput" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "TextRenderer" +CallFunction +SetVariable +Push "b", "TextSnapshot" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "Transform" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Tree" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "TypedValue" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "UIScrollBar" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Void" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "WebService" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "WebServiceConnector" +CallFunction +SetVariable +Push "b", "a" +GetVariable +Push 1, "Window" +CallFunction +SetVariable +Push "b", "XML" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "XMLConnector" +CallFunction +SetVariable +Push "b", "XMLNode" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "XMLSocket" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "XMLUI" +GetVariable +Push "a" +GetVariable +CastOp +SetVariable +Push "b", "a" +GetVariable +Push 1, "XUpdateResolver" +CallFunction +SetVariable diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_76/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_76/DoAction.as new file mode 100644 index 000000000..c517998d6 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_76/DoAction.as @@ -0,0 +1,83 @@ +ConstantPool "compoundAssignmentsTest", "a", "x", "b", "c", "f" +DefineFunction2 "f", 0, 4, false, false, true, false, false, true, true, false, false { +Push register1, 0.0 +GetMember +Trace +Push 0.0 +StoreRegister 2 +Pop +Push register2, 20 +Add2 +StoreRegister 2 +Pop +Push register2, 20 +Add2 +StoreRegister 2 +StoreRegister 3 +Pop +} +Push "compoundAssignmentsTest" +Trace +Push "a", 0.0 +DefineLocal +Push "a", "a" +GetVariable +Push 5 +Add2 +SetVariable +Push "x", "a", "a" +GetVariable +Push 5 +Add2 +StoreRegister 0 +SetVariable +Push register0 +DefineLocal +Push "a" +GetVariable +Push "b" +GetMember +Push "c", "a" +GetVariable +Push "b" +GetMember +Push "c" +GetMember +Push 10 +Add2 +SetMember +Push "x", "a" +GetVariable +Push "b" +GetMember +Push "c", "a" +GetVariable +Push "b" +GetMember +Push "c" +GetMember +Push 10 +Add2 +StoreRegister 0 +SetMember +Push register0 +SetVariable +Push 5, 1, "f" +CallFunction +Pop +Push "a" +GetVariable +Push "b" +GetMember +Push "c", "a" +GetVariable +Push "b" +GetMember +Push "c" +GetMember +Push 30 +Add2 +StoreRegister 0 +SetMember +Push register0 +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_77/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_77/DoAction.as new file mode 100644 index 000000000..1e2feb30a --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_77/DoAction.as @@ -0,0 +1,73 @@ +ConstantPool "as", "abstract", "Boolean", "bytes", "char", "const", "debugger", "double", "enum", "export", "final", "float", "goto", "is", "long", "namespace", "native", "package", "protected", "short", "synchronized", "throws", "transient", "use", "volatile", "false", "get", "null", "set", "undefined", "true", "NaN", "newline", "Infinity", "each" +Push "as", 5 +DefineLocal +Push "abstract", 6 +DefineLocal +Push "Boolean", 7 +DefineLocal +Push "bytes", 8 +DefineLocal +Push "char", 9 +DefineLocal +Push "const", 10 +DefineLocal +Push "debugger", 11 +DefineLocal +Push "double", 12 +DefineLocal +Push "enum", 13 +DefineLocal +Push "export", 14 +DefineLocal +Push "final", 15 +DefineLocal +Push "float", 16 +DefineLocal +Push "goto", 17 +DefineLocal +Push "is", 18 +DefineLocal +Push "long", 19 +DefineLocal +Push "namespace", 20 +DefineLocal +Push "native", 21 +DefineLocal +Push "package", 22 +DefineLocal +Push "protected", 23 +DefineLocal +Push "short", 24 +DefineLocal +Push "synchronized", 25 +DefineLocal +Push "throws", 26 +DefineLocal +Push "transient", 27 +DefineLocal +Push "use", 28 +DefineLocal +Push "volatile", 29 +DefineLocal +Push "false", 43 +DefineLocal +Push "get", 48 +DefineLocal +Push "null", 62 +DefineLocal +Push "set", 69 +DefineLocal +Push "undefined", 76 +DefineLocal +Push "true", 81 +DefineLocal +Push "false", 82 +DefineLocal +Push "NaN", 83 +DefineLocal +Push "newline", 84 +DefineLocal +Push "Infinity", 85 +DefineLocal +Push "each", 86 +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_78/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_78/DoAction.as new file mode 100644 index 000000000..8c476e3ab --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_78/DoAction.as @@ -0,0 +1,101 @@ +ConstantPool "tellTargetTest", "root", "something", "A", "event1", "B", "", "bagr", "C", "D", "E", "somethingA", "F", "somethingB", "G", "H", "I", "somethingC", "J", "K", "somethingD", "L", "somethingE", "M", "somethingF", "N", "O", "P", "Q" +Push "tellTargetTest" +Trace +Push "root" +GetVariable +Push "something" +GetMember +SetTarget2 +Push "A" +Trace +Push "event1" +DefineFunction "", 0 { +Push "B" +Trace +Push "", 11 +GetProperty +Push "root" +GetVariable +Push "bagr" +GetMember +SetTarget2 +Push "C" +Trace +SetTarget "" +SetTarget2 +Push "D" +Trace +} +DefineLocal +SetTarget "" +Push "E" +Trace +Push "root" +GetVariable +Push "somethingA" +GetMember +SetTarget2 +Push "F" +Trace +Push "", 11 +GetProperty +Push "root" +GetVariable +Push "somethingB" +GetMember +SetTarget2 +Push "G" +Trace +SetTarget "" +SetTarget2 +Push "H" +Trace +SetTarget "" +Push "I" +Trace +Push "root" +GetVariable +Push "somethingC" +GetMember +SetTarget2 +Push "J" +Trace +SetTarget "" +Push "K" +Trace +Push "root" +GetVariable +Push "somethingD" +GetMember +SetTarget2 +Push "L" +Trace +Push "", 11 +GetProperty +Push "root" +GetVariable +Push "somethingE" +GetMember +SetTarget2 +Push "M" +Trace +Push "", 11 +GetProperty +Push "root" +GetVariable +Push "somethingF" +GetMember +SetTarget2 +Push "N" +Trace +SetTarget "" +SetTarget2 +Push "O" +Trace +SetTarget "" +SetTarget2 +Push "P" +Trace +SetTarget "" +Push "Q" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_79/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_79/DoAction.as new file mode 100644 index 000000000..724d59a39 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_79/DoAction.as @@ -0,0 +1,82 @@ +ConstantPool "a0", "a1", "r", "Math", "random", "floor", "a", "b", "c", "registersVsDefineLocalTest", "x1", "x2", "x3" +DefineFunction2 "x1", 1, 4, false, false, true, false, true, false, true, false, false, 3, "c" { +Push 1 +StoreRegister 2 +Pop +Push 2 +StoreRegister 1 +Pop +Push register2, register1, register3 +Multiply +Add2 +Return +} +DefineFunction "x2", 1, "c" { +Push "a0", 1 +DefineLocal +Push "a1", 2 +DefineLocal +Push "r", 0.0, "Math" +GetVariable +Push "random" +CallMethod +Push 2 +Multiply +Push 1, "Math" +GetVariable +Push "floor" +CallMethod +DefineLocal +Push "a", "r" +GetVariable +Add2 +GetVariable +Push "b" +GetVariable +Push "c" +GetVariable +Multiply +Add2 +Return +} +DefineFunction2 "x3", 1, 5, false, false, true, false, true, false, true, false, false, 4, "c" { +Push 1 +StoreRegister 2 +Pop +Push 2 +StoreRegister 3 +Pop +Push 0.0, "Math" +GetVariable +Push "random" +CallMethod +Push 2 +Multiply +Push 1, "Math" +GetVariable +Push "floor" +CallMethod +StoreRegister 1 +Pop +Push "a", register1 +Add2 +Push 12 +SetVariable +Push register2, "b" +GetVariable +Push register4 +Multiply +Add2 +Return +} +Push "registersVsDefineLocalTest" +Trace +Push 2, 1, "x1" +CallFunction +Push 3, 1, "x2" +CallFunction +Add2 +Push 4, 1, "x3" +CallFunction +Add2 +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_80/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_80/DoAction.as new file mode 100644 index 000000000..9a70f2d02 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_80/DoAction.as @@ -0,0 +1,33 @@ +ConstantPool "deleteEvalTest", "k0", "k1", "r", "Math", "random", "floor", "k" +Push "deleteEvalTest" +Trace +Push "k0", 1 +DefineLocal +Push "k1", 2 +DefineLocal +Push "r", 0.0, "Math" +GetVariable +Push "random" +CallMethod +Push 2 +Multiply +Push 1, "Math" +GetVariable +Push "floor" +CallMethod +DefineLocal +Push "k", "r" +GetVariable +Add2 +GetVariable +Trace +Push "k", "r" +GetVariable +Add2 +Delete2 +Pop +Push "k", "r" +GetVariable +Add2 +GetVariable +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_81/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_81/DoAction.as new file mode 100644 index 000000000..b4502e9b5 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_81/DoAction.as @@ -0,0 +1,12 @@ +ConstantPool "globalFuncAsVarTest", "trace", "t" +DefineFunction2 "t", 1, 2, false, false, true, false, true, false, true, false, false, 1, "x" { +Push register1 +Trace +} +Push "globalFuncAsVarTest" +Trace +Push "trace", 5 +DefineLocal +Push "trace", "t" +GetVariable +SetVariable diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_82/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_82/DoAction.as new file mode 100644 index 000000000..837b23b39 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_82/DoAction.as @@ -0,0 +1,105 @@ +ConstantPool "switchAndTest", "a", "b", "a 0-3", "a 4-6", "a 7-10", "a 11-20", "a 0, b xx" +Push "switchAndTest" +Trace +Push "a", 5 +DefineLocal +Push "b", 3 +DefineLocal +Push true +StoreRegister 0 +Push "a" +GetVariable +Push 0.0 +Less2 +Not +PushDuplicate +Not +If loc008d +Pop +Push "a" +GetVariable +Push 3 +Greater +Not +loc008d:StrictEquals +If loc016b +Push register0, "a" +GetVariable +Push 4 +Less2 +Not +PushDuplicate +Not +If loc00bd +Pop +Push "a" +GetVariable +Push 6 +Greater +Not +loc00bd:StrictEquals +If loc0176 +Push register0, "a" +GetVariable +Push 7 +Less2 +Not +PushDuplicate +Not +If loc00ed +Pop +Push "a" +GetVariable +Push 10 +Greater +Not +loc00ed:StrictEquals +If loc017c +Push register0, "a" +GetVariable +Push 11 +Less2 +Not +PushDuplicate +Not +If loc011d +Pop +Push "a" +GetVariable +Push 20 +Greater +Not +loc011d:StrictEquals +If loc0187 +Push register0, "a" +GetVariable +Push 0.0 +Equals2 +If loc0151 +Push "b" +GetVariable +Push 5 +Less2 +Jump loc0160 +loc0151:Push "b" +GetVariable +Push 5 +Greater +loc0160:StrictEquals +If loc0192 +Jump loc019d +loc016b:Push "a 0-3" +Trace +Jump loc019d +loc0176:Push "a 4-6" +Trace +loc017c:Push "a 7-10" +Trace +Jump loc019d +loc0187:Push "a 11-20" +Trace +Jump loc019d +loc0192:Push "a 0, b xx" +Trace +Jump loc019d +loc019d: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_83/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_83/DoAction.as new file mode 100644 index 000000000..d76aae6d3 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_83/DoAction.as @@ -0,0 +1,23 @@ +ConstantPool "ifframeLoaded2Test", "A", "d", "B", "C", "D", "E" +Push "ifframeLoaded2Test" +Trace +Push "A" +Trace +WaitForFrame 9, 15 +Push "d", 5 +DefineLocal +Push "d" +GetVariable +Push 4 +Equals2 +Not +If loc0061 +Push "B" +Trace +Jump loc0067 +loc0061:Push "C" +Trace +loc0067:Push "D" +Trace +Push "E" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_84/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_84/DoAction.as new file mode 100644 index 000000000..b71c6c0d9 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_84/DoAction.as @@ -0,0 +1,22 @@ +Push "withTest" +Trace +Push "before" +Trace +Push "_root" +GetVariable +Push "something" +GetMember +With { +Push "somesub", 5 +SetVariable +Push "subvar" +GetVariable +With { +Push "somesub2", 4 +SetVariable +} +Push "after1" +Trace +} +Push "after" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_85/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_85/DoAction.as new file mode 100644 index 000000000..78161cf6f --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_85/DoAction.as @@ -0,0 +1,9 @@ +ConstantPool "numbersCallTest", "a", "toString", "b" +Push "numbersCallTest" +Trace +Push "a", 0.0, 5, "toString" +CallMethod +DefineLocal +Push "b", 0.0, 5.2, "toString" +CallMethod +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_86/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_86/DoAction.as new file mode 100644 index 000000000..480919fcd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_86/DoAction.as @@ -0,0 +1,39 @@ +ConstantPool "tryInsideForInTest", "obj", "thing", "a", "Object", "error" +Push "tryInsideForInTest" +Trace +Push "obj", 0.0 +InitObject +DefineLocal +Push "obj" +GetVariable +Enumerate2 +loc004e:StoreRegister 0 +Push null +Equals2 +If loc00a9 +Push "thing", register0 +DefineLocal +Try register0 { +Push "a" +Trace +Jump loc00a4 +} +Catch { +Push "Object" +GetVariable +Push register0 +CastOp +PushDuplicate +Push null +Equals2 +If loc009d +Push "error" +StackSwap +DefineLocal +Jump loc00a4 +loc009d:Pop +Push register0 +Throw +} +loc00a4:Jump loc004e +loc00a9: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_87/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_87/DoAction.as new file mode 100644 index 000000000..3b1ef1ccb --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_87/DoAction.as @@ -0,0 +1,35 @@ +ConstantPool "a", "callRegisterTest", "f", "A", "g", "B", "obj", "b", "tst" +DefineFunction2 "tst", 1, 3, false, false, true, false, true, false, true, false, false, 2, "o" { +Push "a" +StoreRegister 1 +Pop +Push 0.0, register2, register1 +CallMethod +Pop +} +Push "callRegisterTest" +Trace +Push "f" +DefineFunction "", 0 { +Push "A" +Trace +} +DefineLocal +Push "g" +DefineFunction "", 0 { +Push "B" +Trace +} +DefineLocal +Push "obj", "a", "f" +GetVariable +Push "b", "g" +GetVariable +Push 2 +InitObject +DefineLocal +Push "obj" +GetVariable +Push 1, "tst" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_88/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_88/DoAction.as new file mode 100644 index 000000000..151dcb806 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_88/DoAction.as @@ -0,0 +1,42 @@ +ConstantPool "switchForInTest", "t", "a", "z", "y", "x", "A", "B", "k", "finish" +Push "switchForInTest" +Trace +Push "t", 5 +DefineLocal +Push "a", "z", "y", "x", 3 +InitArray +DefineLocal +Push "t" +GetVariable +StoreRegister 0 +Push 0.0 +StrictEquals +If loc0090 +Push register0, 1 +StrictEquals +If loc009b +Push register0, 2 +StrictEquals +If loc00a6 +Jump loc00cf +loc0090:Push "A" +Trace +Jump loc00cf +loc009b:Push "B" +Trace +Jump loc00cf +loc00a6:Push "a" +GetVariable +Enumerate2 +loc00ad:StoreRegister 0 +Push null +Equals2 +If loc00cf +Push "k", register0 +DefineLocal +Push "k" +GetVariable +Trace +Jump loc00ad +loc00cf:Push "finish" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_89/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_89/DoAction.as new file mode 100644 index 000000000..1466fd753 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_89/DoAction.as @@ -0,0 +1,25 @@ +DefineFunction2 "myFunc", 0, 5, false, false, true, false, true, false, true, false, false { +Push 0.0 +StoreRegister 2 +Pop +Push 0.0 +InitObject +StoreRegister 1 +Pop +Push register1, register2, register2 +Increment +StoreRegister 2 +Pop +GetMember +StoreRegister 4 +Pop +Push register1, register2, register2 +Decrement +StoreRegister 2 +Pop +GetMember +StoreRegister 3 +Pop +} +Push "functionPostIncrementTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_90/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_90/DoAction.as new file mode 100644 index 000000000..234c2fe95 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_90/DoAction.as @@ -0,0 +1,32 @@ +ConstantPool "bitwiseOperandsTest", "a", "b", "c", "d", "e", "f", "g" +Push "bitwiseOperandsTest" +Trace +Push "a", 100 +DefineLocal +Push "b", "a" +GetVariable +Push 2303 +BitAnd +DefineLocal +Push "c", 2303, "a" +GetVariable +BitAnd +DefineLocal +Push "d", "a" +GetVariable +Push 1152 +BitOr +DefineLocal +Push "e", 1152, "a" +GetVariable +BitOr +DefineLocal +Push "f", "a" +GetVariable +Push 1601 +BitXor +DefineLocal +Push "g", 1601, "a" +GetVariable +BitXor +DefineLocal diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_91/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_91/DoAction.as new file mode 100644 index 000000000..645b9c46c --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_91/DoAction.as @@ -0,0 +1,47 @@ +ConstantPool "dynamicGetUrlTest", "n", "", "_level", "print:#bmax", "printasbitmap:#bmax", "something.swf", "v", "_root", "something", "r", "file", ".swf", "_blank", "FSCommand:", "test", "xx" +Push "dynamicGetUrlTest" +Trace +Push "n", 5 +DefineLocal +Push "", "_level", "n" +GetVariable +StringAdd +GetURL2 false, false, 0 +Push "print:#bmax", "_level", "n" +GetVariable +StringAdd +GetURL2 false, false, 0 +Push "printasbitmap:#bmax", "_level", "n" +GetVariable +StringAdd +GetURL2 false, false, 0 +Push "something.swf", "_level", "n" +GetVariable +StringAdd +GetURL2 false, false, 2 +Push "v", "_root" +GetVariable +Push "something" +GetMember +DefineLocal +Push "print:#bmax", "v" +GetVariable +GetURL2 false, false, 0 +Push "printasbitmap:#bmax", "v" +GetVariable +GetURL2 false, false, 0 +Push "r", 5 +DefineLocal +Push "file", "r" +GetVariable +Add2 +Push ".swf" +Add2 +Push "_blank" +GetURL2 false, false, 2 +Push "FSCommand:", "test", "r" +GetVariable +Add2 +StringAdd +Push "xx" +GetURL2 false, false, 0 diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_92/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_92/DoAction.as new file mode 100644 index 000000000..ed98ecad1 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_92/DoAction.as @@ -0,0 +1,19 @@ +DefineFunction2 "f", 1, 3, false, false, true, false, true, false, true, false, false, 2, "tst" { +Push register2 +Not +If loc002e +Push 1 +StoreRegister 1 +Pop +Jump loc003b +loc002e:Push 2 +StoreRegister 1 +Pop +} +loc003b:Push "testVarDefineInFunc" +Trace +Push "tst" +GetVariable +Push 1, "f" +CallFunction +Pop diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_93/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_93/DoAction.as new file mode 100644 index 000000000..cf56bda30 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_93/DoAction.as @@ -0,0 +1,41 @@ +ConstantPool "testInnerSwitchNoLabel", "a", "b", "4", "7", "1", "2", "end" +Push "testInnerSwitchNoLabel" +Trace +Push "a" +DefineLocal2 +Push "b" +DefineLocal2 +Push "a" +GetVariable +StoreRegister 0 +Push 4 +StrictEquals +If loc006b +Push register0, 7 +StrictEquals +If loc0076 +Jump loc0081 +loc006b:Push "4" +Trace +Jump loc00c4 +loc0076:Push "7" +Trace +Jump loc00c4 +loc0081:Push "b" +GetVariable +StoreRegister 0 +Push 1 +StrictEquals +If loc00ae +Push register0, 2 +StrictEquals +If loc00b9 +Jump loc00c4 +loc00ae:Push "1" +Trace +Jump loc00c4 +loc00b9:Push "2" +Trace +Jump loc00c4 +loc00c4:Push "end" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_94/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_94/DoAction.as new file mode 100644 index 000000000..35b65ae88 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_94/DoAction.as @@ -0,0 +1,24 @@ +DefineFunction "reset", 0 { +} +Push "functionSwitchTest" +Trace +Stop +Push "test" +GetVariable +StoreRegister 0 +Push 1 +StrictEquals +If loc0067 +Push register0, 2 +StrictEquals +If loc0073 +Push register0, 3 +StrictEquals +If loc0073 +Jump loc007a +loc0067:Push "A" +Trace +Jump loc007a +loc0073:Push "B" +Trace +loc007a: \ No newline at end of file diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_95/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_95/DoAction.as new file mode 100644 index 000000000..a8aa547cd --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_95/DoAction.as @@ -0,0 +1,89 @@ +DefineFunction2 "myFunction", 1, 5, false, false, true, false, true, false, true, false, false, 1, "item" { +Push undefined +StoreRegister 2 +Pop +Push undefined +StoreRegister 4 +Pop +Push register1, 1, "isNaN" +CallFunction +Not +Not +If loc014f +Push 3, 2, 1, 3 +InitArray +StoreRegister 2 +Pop +Push register2 +Enumerate2 +loc0069:StoreRegister 0 +Push null +Equals2 +If loc014a +Push register0 +StoreRegister 3 +Pop +Push register3 +StoreRegister 0 +Push "A" +StrictEquals +If loc00c5 +Push register0, "B" +StrictEquals +If loc00e5 +Push register0, "C" +StrictEquals +If loc0105 +Push register0, "D" +StrictEquals +If loc0125 +Jump loc0145 +loc00c5:Push register1, "a" +Equals2 +Not +If loc00e5 +loc00d4:Push null +Equals2 +Not +If loc00d4 +Push true +Return +loc00e5:Push register1, "b" +Equals2 +Not +If loc0105 +loc00f4:Push null +Equals2 +Not +If loc00f4 +Push true +Return +loc0105:Push register1, "c" +Equals2 +Not +If loc0125 +loc0114:Push null +Equals2 +Not +If loc0114 +Push true +Return +loc0125:Push register1, "d" +Equals2 +Not +If loc0145 +loc0134:Push null +Equals2 +Not +If loc0134 +Push true +Return +loc0145:Jump loc0069 +loc014a:Jump loc0160 +loc014f:Push "item is nan" +Trace +loc0160:Push false +Return +} +Push "breakDetectionTest" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_96/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_96/DoAction.as new file mode 100644 index 000000000..df5c2f693 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_96/DoAction.as @@ -0,0 +1,37 @@ +ConstantPool "doWhileTwiceTest", "a", "b", "x", "y", "z", "g", "h", "finish" +Push "doWhileTwiceTest" +Trace +Push "a", 1 +DefineLocal +Push "b", 2 +DefineLocal +loc0047:Push "a" +GetVariable +Not +If loc0070 +Push "x" +Trace +Push "b" +GetVariable +Not +If loc006a +Jump loc0080 +loc006a:Push "y" +Trace +loc0070:Push "z" +Trace +Push true +If loc0047 +loc0080:Push "g" +Trace +Push "b" +GetVariable +Not +If loc0097 +Jump loc00a7 +loc0097:Push "h" +Trace +Push true +If loc0047 +loc00a7:Push "finish" +Trace diff --git a/libsrc/ffdec_lib/testexpected/as2/frame_97/DoAction.as b/libsrc/ffdec_lib/testexpected/as2/frame_97/DoAction.as new file mode 100644 index 000000000..1550650a4 --- /dev/null +++ b/libsrc/ffdec_lib/testexpected/as2/frame_97/DoAction.as @@ -0,0 +1,53 @@ +ConstantPool "twoInTest", "o", "a", "n", "c", "i", "xx" +Push "twoInTest" +Trace +Push "o", "a", 0.0 +InitObject +Push 1 +InitObject +DefineLocal +Push "o" +GetVariable +Enumerate2 +loc0044:StoreRegister 0 +Push null +Equals2 +If loc00d4 +Push "n", register0 +DefineLocal +Push "c", 5 +DefineLocal +Push "o" +GetVariable +Push "a" +GetMember +Enumerate2 +loc0072:StoreRegister 0 +Push null +Equals2 +If loc00cf +Push "i", register0 +DefineLocal +Push "i" +GetVariable +Push "c" +GetVariable +Equals2 +Not +If loc00bf +Push "i" +GetVariable +Push 0.0 +Equals2 +Not +If loc00bf +Push "xx" +Trace +Jump loc00c4 +loc00bf:Jump loc0072 +loc00c4:Push null +Equals2 +Not +If loc00c4 +loc00cf:Jump loc0044 +loc00d4: \ No newline at end of file