AS1/2 and AS3 now share common decompiling method

This commit is contained in:
Jindra Pet��k
2013-02-24 22:46:42 +01:00
parent 6d644179ca
commit 8baa5691e9
423 changed files with 5610 additions and 4709 deletions
@@ -16,15 +16,16 @@
*/
package com.jpexs.decompiler.flash.action.treemodel;
import com.jpexs.decompiler.flash.action.Action;
import com.jpexs.decompiler.flash.graph.GraphSourceItem;
import com.jpexs.decompiler.flash.graph.GraphTargetItem;
import java.util.List;
public class CallFunctionTreeItem extends TreeItem {
public TreeItem functionName;
public List<TreeItem> arguments;
public GraphTargetItem functionName;
public List<GraphTargetItem> arguments;
public CallFunctionTreeItem(Action instruction, TreeItem functionName, List<TreeItem> arguments) {
public CallFunctionTreeItem(GraphSourceItem instruction, GraphTargetItem functionName, List<GraphTargetItem> arguments) {
super(instruction, PRECEDENCE_PRIMARY);
this.functionName = functionName;
this.arguments = arguments;
@@ -43,11 +44,11 @@ public class CallFunctionTreeItem extends TreeItem {
}
@Override
public List<com.jpexs.decompiler.flash.action.IgnoredPair> getNeededActions() {
List<com.jpexs.decompiler.flash.action.IgnoredPair> ret = super.getNeededActions();
ret.addAll(functionName.getNeededActions());
for (TreeItem ti : arguments) {
ret.addAll(ti.getNeededActions());
public List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> getNeededSources() {
List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> ret = super.getNeededSources();
ret.addAll(functionName.getNeededSources());
for (GraphTargetItem ti : arguments) {
ret.addAll(ti.getNeededSources());
}
return ret;
}