mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 06:50:51 +00:00
AS1/2 and AS3 now share common decompiling method
This commit is contained in:
@@ -16,17 +16,18 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.action.treemodel;
|
||||
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.swf4.Undefined;
|
||||
import com.jpexs.decompiler.flash.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.flash.graph.GraphTargetItem;
|
||||
import java.util.List;
|
||||
|
||||
public class NewMethodTreeItem extends TreeItem {
|
||||
|
||||
public TreeItem methodName;
|
||||
public TreeItem scriptObject;
|
||||
public List<TreeItem> arguments;
|
||||
public GraphTargetItem methodName;
|
||||
public GraphTargetItem scriptObject;
|
||||
public List<GraphTargetItem> arguments;
|
||||
|
||||
public NewMethodTreeItem(Action instruction, TreeItem scriptObject, TreeItem methodName, List<TreeItem> arguments) {
|
||||
public NewMethodTreeItem(GraphSourceItem instruction, GraphTargetItem scriptObject, GraphTargetItem methodName, List<GraphTargetItem> arguments) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.methodName = methodName;
|
||||
this.arguments = arguments;
|
||||
@@ -65,12 +66,12 @@ public class NewMethodTreeItem extends TreeItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<com.jpexs.decompiler.flash.action.IgnoredPair> getNeededActions() {
|
||||
List<com.jpexs.decompiler.flash.action.IgnoredPair> ret = super.getNeededActions();
|
||||
ret.addAll(methodName.getNeededActions());
|
||||
ret.addAll(scriptObject.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(methodName.getNeededSources());
|
||||
ret.addAll(scriptObject.getNeededSources());
|
||||
for (GraphTargetItem ti : arguments) {
|
||||
ret.addAll(ti.getNeededSources());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user