Issue #258 AS1/2 chained assignments

AS1/2 Detecting temporary registers
assignment spaces
This commit is contained in:
Jindra Petk
2013-07-31 22:21:50 +02:00
parent 25efe3793f
commit c63fd4ebd9
21 changed files with 193 additions and 30 deletions

View File

@@ -48,7 +48,9 @@ import com.jpexs.decompiler.graph.model.SwitchItem;
import com.jpexs.decompiler.graph.model.WhileItem;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Stack;
/**
@@ -92,7 +94,13 @@ public class ActionGraph extends Graph {
}
@Override
protected void finalProcess(List<GraphTargetItem> list, int level) {
protected void finalProcess(List<GraphTargetItem> list, int level, List<Object> localData) {
if (localData.isEmpty()) {
localData.add(new HashSet<Integer>()); //List of temporaryRegisters
}
@SuppressWarnings("unchecked")
Set<Integer> temporaryRegisters = (HashSet<Integer>) localData.get(0);
List<GraphTargetItem> ret = Action.checkClass(list);
if (ret != list) {
list.clear();
@@ -184,6 +192,7 @@ public class ActionGraph extends Graph {
}
}
//detectChained(list, temporaryRegisters);
}
@Override