mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-02 20:14:48 +00:00
Fixed ASC2 §§push of function calls before returning from a method
This commit is contained in:
@@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS3 docs not correctly displayed under p-code when metadata present
|
||||
- Improper initialization of ActiveX component when Flash not available causing FFDec not start
|
||||
- #1206 Switch with multiple default clauses
|
||||
- ASC2 §§push of function calls before returning from a method
|
||||
|
||||
### Changed
|
||||
- AS3 test methods separated to classes
|
||||
|
||||
@@ -2362,13 +2362,16 @@ public class Graph {
|
||||
|
||||
protected static void makeAllCommands(List<GraphTargetItem> commands, TranslateStack stack) {
|
||||
int clen = commands.size();
|
||||
boolean isExit = false;
|
||||
if (clen > 0) {
|
||||
if (commands.get(clen - 1) instanceof ScriptEndItem) {
|
||||
clen--;
|
||||
isExit = true;
|
||||
}
|
||||
}
|
||||
if (clen > 0) {
|
||||
if (commands.get(clen - 1) instanceof ExitItem) {
|
||||
isExit = true;
|
||||
clen--;
|
||||
}
|
||||
}
|
||||
@@ -2391,7 +2394,12 @@ public class Graph {
|
||||
if (p instanceof FunctionActionItem) {
|
||||
commands.add(clen, p);
|
||||
} else {
|
||||
commands.add(clen, new PushItem(p));
|
||||
if (isExit) {
|
||||
//ASC2 leaves some function calls unpopped on stack before returning from a method
|
||||
commands.add(clen, p);
|
||||
} else {
|
||||
commands.add(clen, new PushItem(p));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<option inline="False" />
|
||||
<option locale="" />
|
||||
<option loadConfig="" />
|
||||
<option optimize="False" />
|
||||
<option optimize="True" />
|
||||
<option omitTraces="False" />
|
||||
<option showActionScriptWarnings="True" />
|
||||
<option showBindingWarnings="True" />
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
<!--Any modifications you make may be lost.-->
|
||||
<flex-config>
|
||||
<target-player>25.0</target-player>
|
||||
<benchmark>false</benchmark>
|
||||
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
|
||||
<compiler>
|
||||
<define append="true">
|
||||
<name>CONFIG::debug</name>
|
||||
|
||||
Reference in New Issue
Block a user