mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-22 01:17:03 +00:00
fix: actionscript and/or operators with simple value operands (#2680)
Fixes #2680
This commit is contained in:
@@ -25,7 +25,6 @@ import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.model.AndItem;
|
||||
import com.jpexs.decompiler.graph.model.BinaryOpItem;
|
||||
import com.jpexs.decompiler.graph.model.BlockItem;
|
||||
import com.jpexs.decompiler.graph.model.BranchStackResistant;
|
||||
import com.jpexs.decompiler.graph.model.BreakItem;
|
||||
import com.jpexs.decompiler.graph.model.CommaExpressionItem;
|
||||
@@ -33,7 +32,6 @@ import com.jpexs.decompiler.graph.model.ContinueItem;
|
||||
import com.jpexs.decompiler.graph.model.DefaultItem;
|
||||
import com.jpexs.decompiler.graph.model.DoWhileItem;
|
||||
import com.jpexs.decompiler.graph.model.DuplicateItem;
|
||||
import com.jpexs.decompiler.graph.model.DuplicateSourceItem;
|
||||
import com.jpexs.decompiler.graph.model.ExitItem;
|
||||
import com.jpexs.decompiler.graph.model.FalseItem;
|
||||
import com.jpexs.decompiler.graph.model.ForItem;
|
||||
@@ -56,16 +54,13 @@ import com.jpexs.decompiler.graph.model.TernarOpItem;
|
||||
import com.jpexs.decompiler.graph.model.TrueItem;
|
||||
import com.jpexs.decompiler.graph.model.UniversalLoopItem;
|
||||
import com.jpexs.decompiler.graph.model.WhileItem;
|
||||
import com.jpexs.decompiler.graph.precontinues.GraphPrecontinueDetector;
|
||||
import com.jpexs.helpers.CancellableWorker;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import com.jpexs.helpers.Reference;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Deque;
|
||||
import java.util.HashMap;
|
||||
@@ -4087,16 +4082,25 @@ public class Graph {
|
||||
}
|
||||
if (!stack.isEmpty() && ((filteredOnTrue.size() == 1 && (filteredOnTrue.get(0) instanceof PopItem)) || ((filteredOnTrue.size() >= 2) && (filteredOnTrue.get(0) instanceof PopItem) && (filteredOnTrue.get(filteredOnTrue.size() - 1) instanceof PushItem)))) {
|
||||
if (filteredOnTrue.size() > 1) {
|
||||
PushItem pi = (PushItem) filteredOnTrue.get(filteredOnTrue.size() - 1);
|
||||
GraphTargetItem pushedValue = pi.value;
|
||||
GraphTargetItem rightSide = ((PushItem) filteredOnTrue.get(filteredOnTrue.size() - 1)).value;
|
||||
GraphTargetItem prevExpr = stack.pop();
|
||||
GraphTargetItem leftSide = expr.getNotCoercedNoDup();
|
||||
GraphTargetItem leftSide = expr.getNotCoercedNoDup();
|
||||
GraphTargetItem invertedLeftSide = leftSide;
|
||||
if (invertedLeftSide instanceof NotItem) {
|
||||
invertedLeftSide = ((NotItem) invertedLeftSide).value;
|
||||
} else {
|
||||
invertedLeftSide = invertedLeftSide.invert(null);
|
||||
}
|
||||
|
||||
prevExpr = prevExpr.getThroughDuplicate();
|
||||
|
||||
boolean hideEmptyTrueFalse = true;
|
||||
boolean hideEmptyTrueFalse = true;
|
||||
|
||||
if (leftSide instanceof DuplicateItem) {
|
||||
if (!currentRet.isEmpty() && currentRet.get(currentRet.size() - 1) instanceof SetTemporaryItem) {
|
||||
if (leftSide instanceof DuplicateItem
|
||||
|| leftSide.getNotCoerced() == prevExpr) {
|
||||
if (leftSide instanceof DuplicateItem && !currentRet.isEmpty() && currentRet.get(currentRet.size() - 1) instanceof SetTemporaryItem) {
|
||||
DuplicateItem d = (DuplicateItem) leftSide;
|
||||
SetTemporaryItem st = (SetTemporaryItem) currentRet.get(currentRet.size() - 1);
|
||||
if (st.tempIndex == d.tempIndex) {
|
||||
@@ -4112,8 +4116,9 @@ public class Graph {
|
||||
} else {
|
||||
stack.push(new OrItem(dialect, null, localData.lineStartInstruction, prevExpr, rightSide));
|
||||
}
|
||||
} else if (leftSide.invert(null).getNotCoercedNoDup() instanceof DuplicateItem) {
|
||||
if (!currentRet.isEmpty() && currentRet.get(currentRet.size() - 1) instanceof SetTemporaryItem) {
|
||||
} else if (invertedLeftSide.getNotCoercedNoDup() instanceof DuplicateItem
|
||||
|| invertedLeftSide.getNotCoerced() == prevExpr) { //.getNotCoercedNoDup() instanceof DuplicateItem) {
|
||||
if (leftSide.invert(null).getNotCoercedNoDup() instanceof DuplicateItem && !currentRet.isEmpty() && currentRet.get(currentRet.size() - 1) instanceof SetTemporaryItem) {
|
||||
DuplicateItem d = (DuplicateItem) leftSide.invert(null).getNotCoercedNoDup();
|
||||
SetTemporaryItem st = (SetTemporaryItem) currentRet.get(currentRet.size() - 1);
|
||||
if (st.tempIndex == d.tempIndex) {
|
||||
|
||||
@@ -52,6 +52,7 @@ public class ActionScript2DirectEditingPCodeTest {
|
||||
Configuration.simplifyExpressions.set(false);
|
||||
Configuration._debugCopy.set(false);
|
||||
Configuration.useFlexAs3Compiler.set(false);
|
||||
Configuration.skipDetectionOfUninitializedClassFields.set(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -85,17 +86,7 @@ public class ActionScript2DirectEditingPCodeTest {
|
||||
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);
|
||||
|
||||
@@ -48,6 +48,7 @@ public class ActionScript2Test extends ActionScript2TestBase {
|
||||
Configuration.decompile.set(true);
|
||||
Configuration.registerNameFormat.set("_loc%d_");
|
||||
Configuration.autoRenameIdentifiers.set(false);
|
||||
Configuration.skipDetectionOfUninitializedClassFields.set(false);
|
||||
swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false);
|
||||
}
|
||||
|
||||
@@ -2669,5 +2670,17 @@ public class ActionScript2Test extends ActionScript2TestBase {
|
||||
+ "}\r\n"
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void frame98_andIntTest() {
|
||||
compareSrc(98, "trace(\"andIntTest\");\r\n"
|
||||
+ "var a = 1;\r\n"
|
||||
+ "var b = 5;\r\n"
|
||||
+ "if(0 && (1 || a < b))\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"okay\");\r\n"
|
||||
+ "}\r\n"
|
||||
);
|
||||
}
|
||||
//--FRAMES-END--
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ActionScript3ClassTest extends ActionScript3DecompileTestBase {
|
||||
addSwf("haxe", "testdata/haxe/output.swf");
|
||||
addSwf("long", "testdata/as3_long/bin/as3_long.flex.swf");
|
||||
}
|
||||
|
||||
|
||||
@BeforeMethod
|
||||
public void beforeMethod() {
|
||||
Configuration.decompilationTimeoutFile.set(5 * 60);
|
||||
@@ -800,12 +800,12 @@ public class ActionScript3ClassTest extends ActionScript3DecompileTestBase {
|
||||
+ "}\n"
|
||||
+ "}");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testLongScript() {
|
||||
Configuration.decompilationTimeoutFile.set(10 * 60);
|
||||
Configuration.decompilationTimeoutSingleMethod.set(10 * 60);
|
||||
|
||||
|
||||
DoABC2Tag tag = null;
|
||||
ABC abc = null;
|
||||
ScriptPack scriptPack = null;
|
||||
@@ -830,7 +830,7 @@ public class ActionScript3ClassTest extends ActionScript3DecompileTestBase {
|
||||
} catch (InterruptedException ex) {
|
||||
fail();
|
||||
}
|
||||
|
||||
|
||||
String result = sb.toString();
|
||||
if (result.contains("/*")) {
|
||||
fail();
|
||||
|
||||
@@ -69,6 +69,17 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAndInt() {
|
||||
decompileMethod("classic_air", "testAndInt", "var a:int = 1;\r\n"
|
||||
+ "var b:int = 5;\r\n"
|
||||
+ "if(0 && (1 || a < b))\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"okay\");\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAndOrCoercion() {
|
||||
decompileMethod("classic_air", "testAndOrCoercion", "var x:TestInterface = ti || (ti = new TestClass()) && (ti = new TestClass());\r\n"
|
||||
|
||||
@@ -69,6 +69,17 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAndInt() {
|
||||
decompileMethod("classic", "testAndInt", "var a:int = 1;\r\n"
|
||||
+ "var b:int = 5;\r\n"
|
||||
+ "if(Boolean(0) && (Boolean(1) || Boolean(a < b)))\r\n"
|
||||
+ "{\r\n"
|
||||
+ "trace(\"okay\");\r\n"
|
||||
+ "}\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAndOrCoercion() {
|
||||
decompileMethod("classic", "testAndOrCoercion", "var x:TestInterface = this.ti || (this.ti = new TestClass()) && (this.ti = new TestClass());\r\n"
|
||||
|
||||
@@ -25,7 +25,6 @@ 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;
|
||||
@@ -49,6 +48,7 @@ public class AS2DirectEditingPCodeGenerator {
|
||||
Configuration.simplifyExpressions.set(false);
|
||||
Configuration._debugCopy.set(false);
|
||||
Configuration.useFlexAs3Compiler.set(false);
|
||||
Configuration.skipDetectionOfUninitializedClassFields.set(false);
|
||||
|
||||
if (!outDir.exists()) {
|
||||
outDir.mkdirs();
|
||||
@@ -71,17 +71,7 @@ public class AS2DirectEditingPCodeGenerator {
|
||||
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);
|
||||
|
||||
BIN
libsrc/ffdec_lib/testdata/as2/as2.swf
vendored
BIN
libsrc/ffdec_lib/testdata/as2/as2.swf
vendored
Binary file not shown.
@@ -771,9 +771,9 @@
|
||||
</fills>
|
||||
<edges>
|
||||
<Edge fillStyle0="1" fillStyle1="2" edges="
|
||||
!3156 7501[3091 7490 3054 7490!3054 7490[3050 7494 3050 7457!3050 7457[3050 7441 3159 7239!3159 7239[3270 7033 3327 6947!3327 6947[3353 6908 3412 6794!3412 6794[3470 6682 3500 6639!3500 6639[3602 6491 3649 6692!3649 6692|3713 6670!3713
|
||||
6670[3760 6655 3782 6655!3782 6655[3942 6655 3985 6781!3985 6781[4007 6844 3996 6914!3996 6914[3996 6948 3999 6995!3999 6995[4000 7031 3993 7054!3993 7054[3976 7106 3860 7224!3860 7224[3847 7237 3741 7292!3741 7292[3638 7346 3616 7372
|
||||
!3616 7372[3594 7396 3511 7442!3511 7442[3435 7483 3427 7483!3427 7483[3409 7483 3407 7468!3407 7468[3405 7453 3386 7453!3386 7453[3361 7468 3330 7483!3330 7483[3270 7512 3235 7512!3235 7512[3220 7512 3156 7501"/>
|
||||
!3054 7490[3050 7494 3050 7457!3050 7457[3050 7441 3159 7239!3159 7239[3270 7033 3327 6947!3327 6947[3353 6908 3412 6794!3412 6794[3470 6682 3500 6639!3500 6639[3602 6491 3649 6692!3649 6692|3713 6670!3713 6670[3760 6655 3782 6655!3782
|
||||
6655[3942 6655 3985 6781!3985 6781[4007 6844 3996 6914!3996 6914[3996 6948 3999 6995!3999 6995[4000 7031 3993 7054!3993 7054[3976 7106 3860 7224!3860 7224[3847 7237 3741 7292!3741 7292[3638 7346 3616 7372!3616 7372[3594 7396 3511 7442
|
||||
!3511 7442[3435 7483 3427 7483!3427 7483[3409 7483 3407 7468!3407 7468[3405 7453 3386 7453!3386 7453[3361 7468 3330 7483!3330 7483[3270 7512 3235 7512!3235 7512[3220 7512 3156 7501!3156 7501[3091 7490 3054 7490"/>
|
||||
<Edge fillStyle1="1" edges="
|
||||
!2675 7305[2675 6953 2924 6704!2924 6704[3174 6454 3525 6454!3525 6454[3622 6454 3711 6474!3711 6474[3733 6454 3765 6434!3765 6434[3806 6409 3930 6340!3930 6340[4062 6261 4196 6152!4196 6152[4256 6104 4311 6071!4311 6071[4428 5999 4520
|
||||
6000!4520 6000[4595 5999 4654 6049!4654 6049[4666 6059 4677 6071!4677 6071[4717 6116 4741 6186!4741 6186[4765 6256 4765 6315!4765 6315[4765 6361 4719 6443!4719 6443[4667 6534 4584 6614!4584 6614[4420 6774 4222 6815!4222 6815[4376 7028
|
||||
@@ -3580,6 +3580,18 @@ var o = {a:{}};
|
||||
</Actionscript>
|
||||
<elements/>
|
||||
</DOMFrame>
|
||||
<DOMFrame index="97" name="andIntTest" labelType="name" keyMode="9728">
|
||||
<Actionscript>
|
||||
<script><![CDATA[trace("andIntTest");
|
||||
var a = 1;
|
||||
var b = 5;
|
||||
if (0 && (1 || a < b))
|
||||
{
|
||||
trace("okay");
|
||||
}]]></script>
|
||||
</Actionscript>
|
||||
<elements/>
|
||||
</DOMFrame>
|
||||
</frames>
|
||||
</DOMLayer>
|
||||
</layers>
|
||||
@@ -3587,6 +3599,7 @@ var o = {a:{}};
|
||||
</timelines>
|
||||
<PrinterSettings/>
|
||||
<publishHistory>
|
||||
<PublishItem publishSize="110529" publishTime="1774548880"/>
|
||||
<PublishItem publishSize="110002" publishTime="1772608573"/>
|
||||
<PublishItem publishSize="109906" publishTime="1769340743"/>
|
||||
<PublishItem publishSize="109817" publishTime="1768962510"/>
|
||||
@@ -3606,6 +3619,5 @@ var o = {a:{}};
|
||||
<PublishItem publishSize="108785" publishTime="1729981275"/>
|
||||
<PublishItem publishSize="108954" publishTime="1729979068"/>
|
||||
<PublishItem publishSize="108927" publishTime="1729978944"/>
|
||||
<PublishItem publishSize="108786" publishTime="1722543124"/>
|
||||
</publishHistory>
|
||||
</DOMDocument>
|
||||
@@ -37,30 +37,23 @@
|
||||
</StrokeStyle>
|
||||
</strokes>
|
||||
<edges>
|
||||
<Edge fillStyle0="1" edges="!8000 0|7000 0"/>
|
||||
<Edge fillStyle0="1" fillStyle1="2" strokeStyle="1" edges="!7000 0|7000 1000!7000 1000|8000 1000"/>
|
||||
<Edge fillStyle1="2" strokeStyle="1" edges="!8000 1000|8000 3000"/>
|
||||
<Edge fillStyle0="3" fillStyle1="2" strokeStyle="1" edges="!8000 3000|7000 3000!7000 3000|7000 4000"/>
|
||||
<Edge fillStyle0="3" strokeStyle="1" edges="!7000 4000|8000 4000!8000 4000|8000 3000"/>
|
||||
<Edge fillStyle0="1" strokeStyle="1" edges="!8000 1000|8000 0"/>
|
||||
<Edge fillStyle0="1" edges="!8000 0|7000 0"/>
|
||||
<Edge fillStyle0="2" strokeStyle="1" edges="!7000 0|1000 0"/>
|
||||
<Edge fillStyle0="2" fillStyle1="4" strokeStyle="1" edges="!1000 0|1000 1000!1000 1000|0 1000"/>
|
||||
<Edge fillStyle0="2" strokeStyle="1" edges="!0 1000|0 3000"/>
|
||||
<Edge fillStyle0="2" fillStyle1="5" strokeStyle="1" edges="!0 3000|1000 3000!1000 3000|1000 4000"/>
|
||||
<Edge fillStyle1="5" strokeStyle="1" edges="!1000 4000|0 4000!0 4000|0 3000"/>
|
||||
<Edge fillStyle0="1" fillStyle1="2" strokeStyle="1" edges="!7000 0|7000 1000!7000 1000|8000 1000"/>
|
||||
<Edge fillStyle0="3" fillStyle1="2" strokeStyle="1" edges="!8000 3000|7000 3000!7000 3000|7000 4000"/>
|
||||
<Edge fillStyle1="2" strokeStyle="1" edges="!7000 4000|1000 4000!8000 1000|8000 3000"/>
|
||||
<Edge fillStyle1="3" strokeStyle="1" edges="!8000 3000|8000 4000!8000 4000|7000 4000"/>
|
||||
<Edge fillStyle0="2" fillStyle1="6" strokeStyle="1" edges="!4000 3000[2757 3000 1878 2707!1878 2707[1000 2414 1000 2000!1000 2000[1000 1586 1878 1293!1878 1293[2757 1000 4000 1000!4000 1000[5243 1000 6121 1293!6121 1293[7000 1586 7000 2000!7000 2000[7000 2414 6121 2707!6121 2707[5243 3000 4000
|
||||
3000"/>
|
||||
<Edge fillStyle0="4" edges="
|
||||
!1000 0|0 0"/>
|
||||
<Edge fillStyle0="4" strokeStyle="1" edges="
|
||||
!0 0|0 1000"/>
|
||||
<Edge fillStyle0="2" strokeStyle="1" edges="
|
||||
!0 1000|0 3000"/>
|
||||
<Edge fillStyle0="5" strokeStyle="1" edges="
|
||||
!0 3000|0 4000!0 4000|1000 4000"/>
|
||||
<Edge fillStyle0="5" fillStyle1="2" strokeStyle="1" edges="
|
||||
!1000 4000|1000 3000!1000 3000|0 3000"/>
|
||||
<Edge fillStyle0="2" fillStyle1="4" strokeStyle="1" edges="
|
||||
!1000 0|1000 1000!1000 1000|0 1000"/>
|
||||
<Edge fillStyle0="2" strokeStyle="1" edges="
|
||||
!7000 0|1000 0"/>
|
||||
<Edge fillStyle1="2" strokeStyle="1" edges="
|
||||
!7000 4000|1000 4000"/>
|
||||
<Edge fillStyle0="4" edges="
|
||||
!1000 0|0 0"/>
|
||||
</edges>
|
||||
</DOMShape>
|
||||
</elements>
|
||||
|
||||
@@ -36,8 +36,8 @@ trace("init_blue");
|
||||
</StrokeStyle>
|
||||
</strokes>
|
||||
<edges>
|
||||
<Edge fillStyle1="1" strokeStyle="1" edges="!1523 825[1642 976 1647 1087!1647 1087[1654 1238 1475 1397!1475 1397[1351 1509 1091 1776!1091 1776[861 2014 767 2089!767 2089[619 2208 569 2155!569 2155[511 2092 568 1787!568 1787|724 930!724 930[464 939 243 859!243 859[50 787 -57 669
|
||||
!-57 669[-160 555 -134 455!-134 455[-106 348 59 314!59 314[178 288 456 198!456 198[750 102 875 73!875 73[1331 -36 1262 253!1262 253[1226 402 1321 562!1321 562[1336 582 1523 825"/>
|
||||
<Edge fillStyle1="1" strokeStyle="1" edges="!1262 253[1226 402 1321 562!1321 562[1336 582 1523 825!1523 825[1642 976 1647 1087!1647 1087[1654 1238 1475 1397!1475 1397[1351 1509 1091 1776!1091 1776[861 2014 767 2089!767 2089[619 2208 569 2155!569 2155[511 2092 568 1787!568 1787
|
||||
|724 930!724 930[464 939 243 859!243 859[50 787 -57 669!-57 669[-160 555 -134 455!-134 455[-106 348 59 314!59 314[178 288 456 198!456 198[750 102 875 73!875 73[1331 -36 1262 253"/>
|
||||
<Edge cubics="!724 930(;-16,957 -399,411 59,314q724 930Q464 939q243 859Q50 787q-57 669Q-160 555q-134 455Q-106 348q59 314);"/>
|
||||
<Edge cubics="!59 314(;518,215 1372,-211 1262,253q59 314Q178 288q456 198Q750 102q875 73Q1331 -36q1262 253);"/>
|
||||
<Edge cubics="!1262 253(;1152,717 1996,929 1475,1397q1262 253Q1226 402q1321 562Q1336 582q1523 825Q1642 976q1647 1087Q1654 1238q1475 1397);"/>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
|
||||
<xmp:CreatorTool>Adobe Flash CS4 Professional</xmp:CreatorTool>
|
||||
<xmp:CreateDate>2010-08-03T10:48:58+02:00</xmp:CreateDate>
|
||||
<xmp:MetadataDate>2026-03-03T23:15:56-08:00</xmp:MetadataDate>
|
||||
<xmp:ModifyDate>2026-03-03T23:15:56-08:00</xmp:ModifyDate>
|
||||
<xmp:MetadataDate>2026-03-26T11:12:44-07:00</xmp:MetadataDate>
|
||||
<xmp:ModifyDate>2026-03-26T11:12:44-07:00</xmp:ModifyDate>
|
||||
</rdf:Description>
|
||||
<rdf:Description rdf:about=""
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
@@ -22,7 +22,7 @@
|
||||
<stRef:originalDocumentID>xmp.did:8DD71700DC9EDF1194ADAC9B23608190</stRef:originalDocumentID>
|
||||
</xmpMM:DerivedFrom>
|
||||
<xmpMM:DocumentID>xmp.did:F0EB4FF7CAC3ED11AC9DC078F41E1AA7</xmpMM:DocumentID>
|
||||
<xmpMM:InstanceID>xmp.iid:B144D2FC9917F111A74DE617D61B86A4</xmpMM:InstanceID>
|
||||
<xmpMM:InstanceID>xmp.iid:E767CC623F29F111BD07C6CC5BFA23F4</xmpMM:InstanceID>
|
||||
<xmpMM:OriginalDocumentID>xmp.did:8DD71700DC9EDF1194ADAC9B23608190</xmpMM:OriginalDocumentID>
|
||||
<xmpMM:History>
|
||||
<rdf:Seq>
|
||||
@@ -524,6 +524,12 @@
|
||||
<stEvt:when>2010-08-03T10:48:58+02:00</stEvt:when>
|
||||
<stEvt:softwareAgent>Adobe Flash Professional CS6 - build 481</stEvt:softwareAgent>
|
||||
</rdf:li>
|
||||
<rdf:li rdf:parseType="Resource">
|
||||
<stEvt:action>created</stEvt:action>
|
||||
<stEvt:instanceID>xmp.iid:E767CC623F29F111BD07C6CC5BFA23F4</stEvt:instanceID>
|
||||
<stEvt:when>2010-08-03T10:48:58+02:00</stEvt:when>
|
||||
<stEvt:softwareAgent>Adobe Flash Professional CS6 - build 481</stEvt:softwareAgent>
|
||||
</rdf:li>
|
||||
</rdf:Seq>
|
||||
</xmpMM:History>
|
||||
</rdf:Description>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -18,6 +18,7 @@ package
|
||||
{
|
||||
TestActivationArguments;
|
||||
TestAlwaysBreak;
|
||||
TestAndInt;
|
||||
TestAndOrCoercion;
|
||||
TestArguments;
|
||||
TestBitwiseOperands;
|
||||
|
||||
16
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestAndInt.as
vendored
Normal file
16
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestAndInt.as
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestAndInt
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
var a:int = 1;
|
||||
var b:int = 5;
|
||||
if (0 && (1 || a < b))
|
||||
{
|
||||
trace("okay");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
26
libsrc/ffdec_lib/testexpected/as2/frame_98/DoAction.as
Normal file
26
libsrc/ffdec_lib/testexpected/as2/frame_98/DoAction.as
Normal file
@@ -0,0 +1,26 @@
|
||||
ConstantPool "andIntTest", "a", "b", "okay"
|
||||
Push "andIntTest"
|
||||
Trace
|
||||
Push "a", 1
|
||||
DefineLocal
|
||||
Push "b", 5
|
||||
DefineLocal
|
||||
Push 0.0
|
||||
PushDuplicate
|
||||
Not
|
||||
If loc0065
|
||||
Pop
|
||||
Push 1
|
||||
PushDuplicate
|
||||
If loc0065
|
||||
Pop
|
||||
Push "a"
|
||||
GetVariable
|
||||
Push "b"
|
||||
GetVariable
|
||||
Less2
|
||||
loc0065:Not
|
||||
If loc0071
|
||||
Push "okay"
|
||||
Trace
|
||||
loc0071:
|
||||
126
libsrc/ffdec_lib/testexpected/as3_new/tests/TestAndInt.as
Normal file
126
libsrc/ffdec_lib/testexpected/as3_new/tests/TestAndInt.as
Normal file
@@ -0,0 +1,126 @@
|
||||
package tests
|
||||
{
|
||||
public class TestAndInt
|
||||
{
|
||||
|
||||
method
|
||||
name ""
|
||||
returns null
|
||||
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 3
|
||||
maxscopedepth 4
|
||||
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
|
||||
public function TestAndInt()
|
||||
{
|
||||
method
|
||||
name "tests:TestAndInt/TestAndInt"
|
||||
returns null
|
||||
|
||||
body
|
||||
maxstack 1
|
||||
localcount 1
|
||||
initscopedepth 4
|
||||
maxscopedepth 5
|
||||
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
getlocal0
|
||||
constructsuper 0
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
}
|
||||
|
||||
public function run() : *
|
||||
{
|
||||
trait method QName(PackageNamespace(""),"run")
|
||||
dispid 0
|
||||
method
|
||||
name "tests:TestAndInt/run"
|
||||
returns null
|
||||
|
||||
body
|
||||
maxstack 2
|
||||
localcount 3
|
||||
initscopedepth 4
|
||||
maxscopedepth 5
|
||||
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
debug 1, "a", 0, 13
|
||||
debug 1, "b", 1, 14
|
||||
pushbyte 1
|
||||
convert_i
|
||||
setlocal1
|
||||
pushbyte 5
|
||||
convert_i
|
||||
setlocal2
|
||||
pushbyte 0
|
||||
convert_b
|
||||
dup
|
||||
convert_b
|
||||
iffalse ofs002c
|
||||
pop
|
||||
pushbyte 1
|
||||
convert_b
|
||||
dup
|
||||
convert_b
|
||||
iftrue ofs002c
|
||||
pop
|
||||
getlocal1
|
||||
getlocal2
|
||||
lessthan
|
||||
convert_b
|
||||
ofs002c:
|
||||
iffalse ofs0037
|
||||
findpropstrict Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAndInt"),ProtectedNamespace("tests:TestAndInt"),StaticProtectedNs("tests:TestAndInt"),PrivateNamespace("TestAndInt.as$0")])
|
||||
pushstring "okay"
|
||||
callpropvoid Multiname("trace",[PackageNamespace(""),Namespace("http://adobe.com/AS3/2006/builtin"),PackageNamespace("tests"),PackageInternalNs("tests"),PrivateNamespace("tests:TestAndInt"),ProtectedNamespace("tests:TestAndInt"),StaticProtectedNs("tests:TestAndInt"),PrivateNamespace("TestAndInt.as$0")]), 1
|
||||
ofs0037:
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
method
|
||||
name ""
|
||||
returns null
|
||||
|
||||
body
|
||||
maxstack 2
|
||||
localcount 1
|
||||
initscopedepth 1
|
||||
maxscopedepth 3
|
||||
|
||||
code
|
||||
getlocal0
|
||||
pushscope
|
||||
findpropstrict Multiname("TestAndInt",[PackageNamespace("tests")])
|
||||
getlex QName(PackageNamespace(""),"Object")
|
||||
pushscope
|
||||
getlex QName(PackageNamespace(""),"Object")
|
||||
newclass 0
|
||||
popscope
|
||||
initproperty QName(PackageNamespace("tests"),"TestAndInt")
|
||||
returnvoid
|
||||
end ; code
|
||||
end ; body
|
||||
end ; method
|
||||
|
||||
Reference in New Issue
Block a user