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
@@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash.action.flashlite;
import com.jpexs.decompiler.flash.action.Action;
import com.jpexs.decompiler.flash.action.treemodel.FSCommand2TreeItem;
import com.jpexs.decompiler.flash.action.treemodel.TreeItem;
import com.jpexs.decompiler.flash.graph.GraphTargetItem;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
@@ -35,10 +35,10 @@ public class ActionFSCommand2 extends Action {
}
@Override
public void translate(Stack<TreeItem> stack, List<TreeItem> output, java.util.HashMap<Integer, String> regNames) {
public void translate(Stack<GraphTargetItem> stack, List<GraphTargetItem> output, java.util.HashMap<Integer, String> regNames) {
long numArgs = popLong(stack);
TreeItem command = stack.pop();
List<TreeItem> args = new ArrayList<TreeItem>();
GraphTargetItem command = stack.pop();
List<GraphTargetItem> args = new ArrayList<GraphTargetItem>();
for (long l = 0; l < numArgs; l++) {
args.add(stack.pop());
}
@@ -22,7 +22,7 @@ import com.jpexs.decompiler.flash.action.Action;
import com.jpexs.decompiler.flash.action.parser.FlasmLexer;
import com.jpexs.decompiler.flash.action.parser.ParseException;
import com.jpexs.decompiler.flash.action.treemodel.StrictModeTreeItem;
import com.jpexs.decompiler.flash.action.treemodel.TreeItem;
import com.jpexs.decompiler.flash.graph.GraphTargetItem;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.List;
@@ -60,7 +60,7 @@ public class ActionStrictMode extends Action {
}
@Override
public void translate(Stack<TreeItem> stack, List<TreeItem> output, java.util.HashMap<Integer, String> regNames) {
public void translate(Stack<GraphTargetItem> stack, List<GraphTargetItem> output, java.util.HashMap<Integer, String> regNames) {
output.add(new StrictModeTreeItem(this, mode));
}
}