diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c38861a6..ec25a8e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] ### Fixed - [#2643] APNG export - images containing multiple IDAT chunks +- AS3 direct editation - proper use conver/coerce instruction +- AS3 direct editation - use coerce_f for float values ## [25.1.2] - 2026-02-23 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index 52571986b..2af8206d9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -195,9 +195,11 @@ public class AVM2SourceGenerator implements SourceGenerator { typeItem = item; } else if (item instanceof ApplyTypeAVM2Item) { typeItem = ((ApplyTypeAVM2Item) item).object; - } else if (item instanceof ImportedSlotConstItem) { - typeItem = ((ImportedSlotConstItem) item).type; } else { + /*else if (item instanceof ScriptPropertyAVM2Item) { + typeItem = ((ScriptPropertyAVM2Item) item).type; + } */ + throw new CompilationException("Invalid type:" + item + " (" + item.getClass().getName() + ")", 0/*??*/); } if (typeItem instanceof UnresolvedAVM2Item) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java index 65c675a60..0add52d18 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java @@ -2452,12 +2452,19 @@ public class ActionScript3Parser { break; } } - if (lhs instanceof ParenthesisItem) { + /*if (lhs instanceof ParenthesisItem) { GraphTargetItem coerced = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables, false, abc); + if (coerced != null) { + GraphTargetItem coercedType = ((ParenthesisItem) lhs).value; + if (coercedType instanceof UnresolvedAVM2Item) { + UnresolvedAVM2Item unresolved = (UnresolvedAVM2Item) coercedType; + unresolved.resolve(localData, AS3_NAMESPACE, mhs, paramTypes, constantPool, abcIndex, callStack, variables) + } + } if (coerced != null && isType(((ParenthesisItem) lhs).value)) { lhs = new CoerceAVM2Item(null, null, ((ParenthesisItem) lhs).value, coerced); } - } + }*/ if (debugMode) { System.out.println("/expression1"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java index 9160b9a6d..38a730748 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/CallAVM2Item.java @@ -109,9 +109,6 @@ public class CallAVM2Item extends AVM2Item { if (callable instanceof UnresolvedAVM2Item) { callable = ((UnresolvedAVM2Item) callable).resolved; } - if (callable instanceof ImportedSlotConstItem) { - callable = ((ImportedSlotConstItem) callable).type; - } if (callable instanceof NameAVM2Item) { NameAVM2Item n = (NameAVM2Item) callable; if (!localData.registerVars.containsKey(n.getVariableName())) { @@ -150,6 +147,13 @@ public class CallAVM2Item extends AVM2Item { TypeItem t = (TypeItem) callable; propIndex = AVM2SourceGenerator.resolveType(localData, t, ((AVM2SourceGenerator) generator).abcIndex); } + + if (callable instanceof ScriptPropertyAVM2Item) { + TypeItem t = ((ScriptPropertyAVM2Item) callable).type; + propIndex = AVM2SourceGenerator.resolveType(localData, t, ((AVM2SourceGenerator) generator).abcIndex);; + } + + Object obj = null; if (callable instanceof PropertyAVM2Item) { @@ -216,6 +220,13 @@ public class CallAVM2Item extends AVM2Item { propIndex = prop.resolveProperty(localData); } + if (callable instanceof TypeItem && propIndex != -1 && arguments.size() == 1) { + AVM2Instruction ins = NameAVM2Item.generateCoerce(localData, generator, callable); + if (ins != null) { + return toSourceMerge(localData, generator, arguments, ins); + } + } + if (propIndex != -1) { if (obj == null) { obj = new AVM2Instruction(0, AVM2Instructions.FindPropertyStrict, new int[]{propIndex}); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java index df78dcddc..98feb7286 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java @@ -80,6 +80,17 @@ public class ConstructSomethingAVM2Item extends CallAVM2Item { needsReturn ? null : ins(AVM2Instructions.Pop) ); } + + if (resname instanceof ScriptPropertyAVM2Item) { + TypeItem t = ((ScriptPropertyAVM2Item) resname).type; + int type_index = AVM2SourceGenerator.resolveType(localData, t, ((AVM2SourceGenerator) generator).abcIndex); + return toSourceMerge(localData, generator, + new AVM2Instruction(0, AVM2Instructions.FindPropertyStrict, new int[]{type_index, arguments.size()}), arguments, + new AVM2Instruction(0, AVM2Instructions.ConstructProp, new int[]{type_index, arguments.size()}), + needsReturn ? null : ins(AVM2Instructions.Pop) + ); + } + if (resname instanceof PropertyAVM2Item) { PropertyAVM2Item prop = (PropertyAVM2Item) resname; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java index 65ac737cc..c339c63cc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java @@ -339,6 +339,12 @@ public class NameAVM2Item extends AssignableAVM2Item { case "Number": ins = ins(AVM2Instructions.ConvertD); break; + case "float": + ins = ins(AVM2Instructions.ConvertF); + break; + case "float4": + ins = ins(AVM2Instructions.ConvertF4); + break; default: int type_index = AVM2SourceGenerator.resolveType(localData, ttype, ((AVM2SourceGenerator) generator).abcIndex); ins = ins(AVM2Instructions.Coerce, type_index); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ScriptPropertyAVM2Item.java similarity index 97% rename from libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ScriptPropertyAVM2Item.java index 74d75df42..b60e58fed 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ScriptPropertyAVM2Item.java @@ -37,7 +37,7 @@ import java.util.List; * * @author JPEXS */ -public class ImportedSlotConstItem extends AssignableAVM2Item { +public class ScriptPropertyAVM2Item extends AssignableAVM2Item { /** * Type @@ -48,7 +48,7 @@ public class ImportedSlotConstItem extends AssignableAVM2Item { * Constructor. * @param type Type */ - public ImportedSlotConstItem(TypeItem type) { + public ScriptPropertyAVM2Item(TypeItem type) { this.type = type; } @@ -69,7 +69,7 @@ public class ImportedSlotConstItem extends AssignableAVM2Item { @Override public AssignableAVM2Item copy() { - return new ImportedSlotConstItem(type); + return new ScriptPropertyAVM2Item(type); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java index 3c5c9d048..92a34e8bd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java @@ -533,6 +533,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { if (impName.equals(name.get(0))) { TypeItem ret = new TypeItem(imp); + resolved = ret; for (int i = 1; i < name.size(); i++) { resolved = new PropertyAVM2Item(resolved, name.isAttribute(i), name.get(i), name.getNamespaceSuffix(i), abc, openedNamespaces, new ArrayList<>(), false, null); @@ -541,14 +542,18 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { } } - if (name.size() == 1) { - AbcIndexing.TraitIndex ti = abc.findScriptProperty(imp); - if (ti != null && (ti.trait instanceof TraitSlotConst)) { - resolved = new ImportedSlotConstItem(ret); - if (assignedValue != null) { - ((ImportedSlotConstItem) resolved).assignedValue = assignedValue; + if (name.size() == 1) { + AbcIndexing.ClassIndex ci = abc.findClass(ret, abc.getSelectedAbc(), localData == null ? null : localData.scriptIndex); + if (ci == null) { + AbcIndexing.TraitIndex ti = abc.findScriptProperty(imp); + if (ti != null) { + resolved = new ScriptPropertyAVM2Item(ret); + if (assignedValue != null) { + ((ScriptPropertyAVM2Item) resolved).assignedValue = assignedValue; + } + return resolvedRoot = resolved; } - } + } } return resolvedRoot = ret; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java index 232fb6f74..9a7842d17 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/ActionScript3DirectEditingPCodeTest.java @@ -70,6 +70,7 @@ public class ActionScript3DirectEditingPCodeTest { if (playerSWC == null) { throw new IOException("Player SWC library not found, please place it to " + Configuration.getFlashLibPath()); } + List paths = new ArrayList<>(); try { SWF swf = new SWF(new BufferedInputStream(new FileInputStream(filePath)), false); if (swf.isAS3()) { @@ -104,8 +105,10 @@ public class ActionScript3DirectEditingPCodeTest { FileOutputStream fos = new FileOutputStream(actualFile); fos.write(modifiedPcode.getBytes("UTF-8")); fos.close(); + + paths.add(classDirPath); - if (!expectedFile.exists()) { + /*if (!expectedFile.exists()) { fail("Expected file " + expectedFile.getAbsolutePath() + " does not exists!"); } @@ -117,7 +120,7 @@ public class ActionScript3DirectEditingPCodeTest { if (!Objects.equals(actualText, expectedText)) { fail("Files are not same - " + actualDir.getPath() + "/" + classDirPath + ".as"); - } + }*/ } catch (As3ScriptReplaceException ex) { fail("Exception during decompilation - file: " + filePath + " class: " + classPathString + " msg:" + ex.getMessage(), ex); } catch (Exception ex) { @@ -130,5 +133,25 @@ public class ActionScript3DirectEditingPCodeTest { } 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("/").append(path).append(".as\r\n"); + // + } + } + if (notSameBuilder.length() > 0) { + fail("File(s) are not same: " +notSameBuilder.toString()); + } } } diff --git a/libsrc/ffdec_lib/testexpected/as3_new/Main.as b/libsrc/ffdec_lib/testexpected/as3_new/Main.as index b13c25942..a1eef0997 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/Main.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/Main.as @@ -42,21 +42,20 @@ package pushscope getlocal0 constructsuper 0 - findpropstrict QName(PackageNamespace(""),"Boolean") getlex QName(PackageNamespace(""),"stage") - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0018 + convert_b + iffalse ofs0014 getlocal0 callpropvoid QName(PrivateNamespace("Main"),"init"), 0 - jump ofs0024 - ofs0018: + jump ofs0020 + ofs0014: findpropstrict QName(PackageNamespace(""),"addEventListener") getlex QName(PackageNamespace("flash.events"),"Event") getproperty QName(PackageNamespace(""),"ADDED_TO_STAGE") getlocal0 getproperty QName(PrivateNamespace("Main"),"init") callpropvoid QName(PackageNamespace(""),"addEventListener"), 2 - ofs0024: + ofs0020: returnvoid end ; code end ; body diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as index d6ee33229..2b6ef0657 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestConvert.as @@ -109,46 +109,42 @@ package tests pushstring "a" coerce_s setlocal1 - findpropstrict QName(PackageNamespace(""),"int") getlocal1 - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setlocal2 getlocal0 getproperty QName(PrivateNamespace("tests:TestConvert"),"n") convert_i setlocal 5 - findpropstrict QName(PackageNamespace(""),"String") getlocal 5 - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal1 getlocal0 getproperty QName(PrivateNamespace("tests:TestConvert"),"ns") coerce_s setlocal1 - findpropstrict QName(PackageNamespace(""),"String") getlocal2 pushbyte 4 - ifne ofs008f + ifne ofs0085 pushstring "" - jump ofs0090 - ofs008f: + jump ofs0086 + ofs0085: getlocal2 - ofs0090: - callproperty QName(PackageNamespace(""),"String"), 1 + ofs0086: + coerce_s coerce_s setlocal1 getlocal2 pushbyte 4 - ifne ofs00a2 + ifne ofs0096 pushstring "" - jump ofs00a8 - ofs00a2: - findpropstrict QName(PackageNamespace(""),"String") + jump ofs0098 + ofs0096: getlocal2 - callproperty QName(PackageNamespace(""),"String"), 1 - ofs00a8: + coerce_s + ofs0098: coerce_s setlocal1 getlex QName(PackageNamespace("tests"),"TestConvert") @@ -159,9 +155,8 @@ package tests getproperty QName(PackageNamespace(""),"TEST") convert_i setlocal2 - findpropstrict QName(PackageNamespace(""),"Number") pushstring "4" - callproperty QName(PackageNamespace(""),"Number"), 1 + convert_d pushbyte 5 multiply convert_i @@ -183,11 +178,10 @@ package tests newobject 3 coerce QName(PackageNamespace(""),"Object") setlocal 6 - findpropstrict QName(PackageNamespace(""),"int") getlocal1 pushbyte 10 callproperty QName(Namespace("http://adobe.com/AS3/2006/builtin"),"charAt"), 1 - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setlocal2 getlex QName(PackageNamespace("__AS3__.vec"),"Vector") @@ -202,11 +196,10 @@ package tests getlocal 7 pushstring "B" callpropvoid Multiname("push",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - findpropstrict QName(PackageNamespace(""),"int") getlocal 7 pushbyte 0 getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setlocal2 getlocal 7 @@ -219,33 +212,29 @@ package tests callproperty Multiname("join",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 coerce_s setlocal1 - findpropstrict QName(PackageNamespace(""),"int") getlocal 7 pushstring "x" callproperty Multiname("join",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setlocal2 getlex QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") convert_i setlocal2 - findpropstrict QName(PackageNamespace(""),"String") getlex QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal1 getlex QName(StaticProtectedNs("tests_classes:TestConvertParent"),"sprot") convert_i setlocal2 - findpropstrict QName(PackageNamespace(""),"String") getlex QName(StaticProtectedNs("tests_classes:TestConvertParent"),"sprot") - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal1 - findpropstrict QName(PackageNamespace(""),"String") findpropstrict QName(PackageNamespace("flash.utils"),"getTimer") callproperty QName(PackageNamespace("flash.utils"),"getTimer"), 0 - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal1 getlex QName(PackageNamespace(""),"XML") @@ -266,34 +255,31 @@ package tests findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) pushstring "b" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - findpropstrict QName(PackageNamespace(""),"int") getlocal 9 getlocal2 getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setlocal2 findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) pushstring "c" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - findpropstrict QName(PackageNamespace(""),"int") getlocal 8 getproperty Multiname("item",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getlocal2 getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setlocal2 getlocal 4 - findpropstrict QName(PackageNamespace(""),"String") getlocal 8 getproperty Multiname("item",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getlocal2 getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getproperty MultinameA("id",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s pushstring "Hello" setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) findpropstrict QName(PrivateNamespace("TestConvert.as$0"),"LocalClass") @@ -304,48 +290,43 @@ package tests getproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) convert_i setlocal2 - findpropstrict QName(PackageNamespace(""),"String") getlocal 10 getproperty Multiname("attr",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal1 getlocal0 getproperty QName(PrivateNamespace("tests:TestConvert"),"f") coerce QName(PackageNamespace(""),"Function") setlocal 11 - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal 11 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs01e5 + convert_b + iffalse ofs01a5 findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) pushstring "OK" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - ofs01e5: - findpropstrict QName(PackageNamespace(""),"Boolean") + ofs01a5: getlocal2 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs01f5 + convert_b + iffalse ofs01b1 findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getlocal2 callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - ofs01f5: - findpropstrict QName(PackageNamespace(""),"Boolean") + ofs01b1: getlocal1 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0205 + convert_b + iffalse ofs01bd findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getlocal1 callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - ofs0205: - findpropstrict QName(PackageNamespace(""),"Boolean") + ofs01bd: getlocal 6 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0217 + convert_b + iffalse ofs01cb findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) pushstring "obj" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]), 1 - ofs0217: + ofs01cb: getlocal 9 coerce_s setlocal1 @@ -365,11 +346,10 @@ package tests convert_i setlocal2 getlocal 6 - findpropstrict QName(PackageNamespace(""),"int") getlocal 12 pushbyte 5 multiply - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i pushbyte 1 setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),StaticProtectedNs("tests_classes:TestConvertParent"),PrivateNamespace("tests:TestConvert"),ProtectedNamespace("tests:TestConvert"),StaticProtectedNs("tests:TestConvert"),PrivateNamespace("TestConvert.as$0")]) getlocal0 @@ -379,9 +359,8 @@ package tests findproperty QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") swap setsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") - findpropstrict QName(PackageNamespace(""),"int") getlocal1 - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i findproperty QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") swap setsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") @@ -389,10 +368,9 @@ package tests getsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") convert_i setlocal2 - findpropstrict QName(PackageNamespace(""),"String") findpropstrict QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") getsuper QName(ProtectedNamespace("tests_classes:TestConvertParent"),"prot") - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal1 pushstring "5" @@ -404,9 +382,8 @@ package tests getlocal 13 convert_i setlocal 15 - findpropstrict QName(PackageNamespace(""),"Number") getlocal 13 - callproperty QName(PackageNamespace(""),"Number"), 1 + convert_d coerce_a setlocal 13 returnvoid diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as index ab88e5df9..d705c8207 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestDoWhileTwice.as @@ -77,44 +77,41 @@ package tests ofs001d: label ofs001e: - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal1 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0044 + convert_b + iffalse ofs003c findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) pushstring "x" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal2 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs003d - jump ofs0050 - ofs003d: + convert_b + iffalse ofs0035 + jump ofs0048 + ofs0035: findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) pushstring "y" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 - ofs0044: + ofs003c: findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) pushstring "z" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 pushtrue iftrue ofs001d - ofs0050: + ofs0048: findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) pushstring "g" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal2 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0065 - jump ofs0071 - ofs0065: + convert_b + iffalse ofs0059 + jump ofs0065 + ofs0059: findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) pushstring "h" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 pushtrue iftrue ofs0018 - ofs0071: + ofs0065: findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]) pushstring "finish" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestDoWhileTwice"),ProtectedNamespace("tests:TestDoWhileTwice"),StaticProtectedNs("tests:TestDoWhileTwice"),PrivateNamespace("TestDoWhileTwice.as$0")]), 1 diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as index 5bacc75ed..0734788a4 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestImplicitCoerce.as @@ -53,7 +53,7 @@ package tests returns QName(PackageNamespace(""),"void") body - maxstack 5 + maxstack 3 localcount 5 initscopedepth 4 maxscopedepth 5 @@ -75,41 +75,37 @@ package tests callproperty QName(PackageNamespace(""),"random"), 0 coerce_a setlocal3 - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal1 - findpropstrict QName(PackageNamespace(""),"Number") getlocal3 pushbyte 1 equals - callproperty QName(PackageNamespace(""),"Number"), 1 + convert_d bitand - callproperty QName(PackageNamespace(""),"Boolean"), 1 + convert_b dup convert_b - iffalse ofs0043 + iffalse ofs0037 pop - findpropstrict QName(PackageNamespace(""),"Boolean") pushbyte 5 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - ofs0043: - iffalse ofs004e + convert_b + ofs0037: + iffalse ofs0042 findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]) pushstring "OK" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]), 1 - ofs004e: + ofs0042: pushstring "hello: " getlocal3 add coerce_s setlocal 4 - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal 4 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0067 + convert_b + iffalse ofs0057 findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]) pushstring "F" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestImplicitCoerce"),ProtectedNamespace("tests:TestImplicitCoerce"),StaticProtectedNs("tests:TestImplicitCoerce"),PrivateNamespace("TestImplicitCoerce.as$0")]), 1 - ofs0067: + ofs0057: returnvoid end ; code end ; body diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as index 292f7bdc6..18b355810 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestManualConvert.as @@ -53,7 +53,7 @@ package tests returns null body - maxstack 3 + maxstack 2 localcount 1 initscopedepth 4 maxscopedepth 5 @@ -65,9 +65,8 @@ package tests pushstring "String(this).length" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]), 1 findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]) - findpropstrict QName(PackageNamespace(""),"String") getlocal0 - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s getproperty Multiname("length",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]) callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestManualConvert"),ProtectedNamespace("tests:TestManualConvert"),StaticProtectedNs("tests:TestManualConvert"),PrivateNamespace("TestManualConvert.as$0")]), 1 returnvoid diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as index 1e1a29811..3c5cc0f47 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestNames.as @@ -65,7 +65,7 @@ package tests returns null body - maxstack 4 + maxstack 3 localcount 8 initscopedepth 4 maxscopedepth 5 @@ -102,16 +102,14 @@ package tests setlocal3 getlocal1 coerce QName(PackageNamespace(""),"Namespace") - findpropstrict QName(PackageNamespace(""),"String") getlocal2 - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s convert_s findpropstrict RTQNameL() getlocal1 coerce QName(PackageNamespace(""),"Namespace") - findpropstrict QName(PackageNamespace(""),"String") getlocal2 - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s convert_s getproperty RTQNameL() coerce_a diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as index ef7c30e9e..d2069f3c2 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestStringCoerce.as @@ -55,7 +55,7 @@ package tests returns null body - maxstack 3 + maxstack 2 localcount 3 initscopedepth 4 maxscopedepth 5 @@ -71,12 +71,11 @@ package tests getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStringCoerce"),ProtectedNamespace("tests:TestStringCoerce"),StaticProtectedNs("tests:TestStringCoerce"),PrivateNamespace("TestStringCoerce.as$0")]) coerce_s setlocal1 - findpropstrict QName(PackageNamespace(""),"String") getlocal0 getproperty QName(PrivateNamespace("tests:TestStringCoerce"),"a") pushstring "test" getproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestStringCoerce"),ProtectedNamespace("tests:TestStringCoerce"),StaticProtectedNs("tests:TestStringCoerce"),PrivateNamespace("TestStringCoerce.as$0")]) - callproperty QName(PackageNamespace(""),"String"), 1 + coerce_s coerce_s setlocal2 returnvoid diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as index 3bec1bec5..44883c4b6 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestSwitchIf.as @@ -79,31 +79,30 @@ package tests callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]), 1 ofs0024: label - jump ofs005c + jump ofs0058 ofs0029: - findpropstrict QName(PackageNamespace(""),"int") getlocal1 - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i pushbyte 2 subtract setlocal3 pushbyte 0 getlocal3 - ifstrictne ofs0040 + ifstrictne ofs003c pushbyte 0 - jump ofs004f - ofs0040: + jump ofs004b + ofs003c: pushbyte 1 getlocal3 - ifstrictne ofs004d + ifstrictne ofs0049 pushbyte 1 - jump ofs004f - ofs004d: + jump ofs004b + ofs0049: pushbyte -1 - ofs004f: + ofs004b: kill 3 lookupswitch ofs0024, [ofs0017, ofs0017] - ofs005c: + ofs0058: findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]) pushstring "B" callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestSwitchIf"),ProtectedNamespace("tests:TestSwitchIf"),StaticProtectedNs("tests:TestSwitchIf"),PrivateNamespace("TestSwitchIf.as$0")]), 1 diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as index a46d372b9..371d8c08c 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestTernarOperator2.as @@ -53,7 +53,7 @@ package tests returns null body - maxstack 3 + maxstack 2 localcount 5 initscopedepth 4 maxscopedepth 5 @@ -74,29 +74,26 @@ package tests getlocal1 iffalse ofs0027 getlocal2 - jump ofs0030 + jump ofs002c ofs0027: - findpropstrict QName(PackageNamespace(""),"int") getlocal2 pushbyte 1 add - callproperty QName(PackageNamespace(""),"int"), 1 - ofs0030: + convert_i + ofs002c: convert_i setlocal3 - findpropstrict QName(PackageNamespace(""),"Boolean") getlocal2 - callproperty QName(PackageNamespace(""),"Boolean"), 1 - iffalse ofs0041 + convert_b + iffalse ofs0039 getlocal3 - jump ofs004a - ofs0041: - findpropstrict QName(PackageNamespace(""),"int") + jump ofs003e + ofs0039: getlocal3 pushbyte 1 add - callproperty QName(PackageNamespace(""),"int"), 1 - ofs004a: + convert_i + ofs003e: convert_i setlocal 4 returnvoid diff --git a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as index 3c5fbf1fb..fbc1e4d75 100644 --- a/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as +++ b/libsrc/ffdec_lib/testexpected/as3_new/tests/TestXml.as @@ -266,10 +266,9 @@ package tests coerce TypeName(QName(PackageNamespace("__AS3__.vec"),"Vector")) setslot 1 getscopeobject 1 - findpropstrict QName(PackageNamespace(""),"int") getlex QName(PackageNamespace(""),"Math") callproperty QName(PackageNamespace(""),"random"), 0 - callproperty QName(PackageNamespace(""),"int"), 1 + convert_i convert_i setslot 2 getscopeobject 1 @@ -288,8 +287,8 @@ package tests pushstring "" construct 1 setlocal2 - jump ofs0146 - ofs0121: + jump ofs0142 + ofs011d: label getlocal 4 getlocal3 @@ -305,18 +304,18 @@ package tests pushbyte 1 add equals - iffalse ofs0141 + iffalse ofs013d getlocal2 getlocal3 getlocal 5 setproperty MultinameL([PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestXml"),ProtectedNamespace("tests:TestXml"),StaticProtectedNs("tests:TestXml"),PrivateNamespace("TestXml.as$0")]) - ofs0141: + ofs013d: popscope kill 6 kill 5 - ofs0146: + ofs0142: hasnext2 4, 3 - iftrue ofs0121 + iftrue ofs011d kill 4 kill 3 getlocal2