mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 17:20:46 +00:00
AS1/2: Displaying script path on invalid jump error log
This commit is contained in:
@@ -65,8 +65,8 @@ public class ActionGraph extends Graph {
|
||||
|
||||
private boolean insideDoInitAction;
|
||||
|
||||
public ActionGraph(boolean insideDoInitAction, List<Action> code, HashMap<Integer, String> registerNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int version) {
|
||||
super(new ActionGraphSource(insideDoInitAction, code, version, registerNames, variables, functions), new ArrayList<>());
|
||||
public ActionGraph(String path, boolean insideDoInitAction, List<Action> code, HashMap<Integer, String> registerNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int version) {
|
||||
super(new ActionGraphSource(path, insideDoInitAction, code, version, registerNames, variables, functions), new ArrayList<>());
|
||||
this.insideDoInitAction = insideDoInitAction;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ActionGraph extends Graph {
|
||||
|
||||
public static List<GraphTargetItem> translateViaGraph(boolean insideDoInitAction, HashMap<Integer, String> registerNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, List<Action> code, int version, int staticOperation, String path) throws InterruptedException {
|
||||
|
||||
ActionGraph g = new ActionGraph(insideDoInitAction, code, registerNames, variables, functions, version);
|
||||
ActionGraph g = new ActionGraph(path, insideDoInitAction, code, registerNames, variables, functions, version);
|
||||
ActionLocalData localData = new ActionLocalData(insideDoInitAction, registerNames);
|
||||
g.init(localData);
|
||||
return g.translate(localData, staticOperation, path);
|
||||
|
||||
@@ -48,17 +48,20 @@ public class ActionGraphSource extends GraphSource {
|
||||
|
||||
private final boolean insideDoInitAction;
|
||||
|
||||
private final String path;
|
||||
|
||||
public List<Action> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public ActionGraphSource(boolean insideDoInitAction, List<Action> actions, int version, HashMap<Integer, String> registerNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions) {
|
||||
public ActionGraphSource(String path, boolean insideDoInitAction, List<Action> actions, int version, HashMap<Integer, String> registerNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions) {
|
||||
this.actions = actions;
|
||||
this.version = version;
|
||||
this.registerNames = registerNames;
|
||||
this.variables = variables;
|
||||
this.functions = functions;
|
||||
this.insideDoInitAction = insideDoInitAction;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,7 +142,7 @@ public class ActionGraphSource extends GraphSource {
|
||||
}
|
||||
//ret = adr2posInside(adr);
|
||||
if (ret == -1) {
|
||||
Logger.getLogger(ActionGraphSource.class.getName()).log(Level.SEVERE, "Address loc" + Helper.formatAddress(adr) + " not found");
|
||||
Logger.getLogger(ActionGraphSource.class.getName()).log(Level.SEVERE, "{0} - address loc{1} not found", new Object[]{path, Helper.formatAddress(adr)});
|
||||
/*System.err.println("Addr loc"+Helper.formatAddress(adr)+" not found");
|
||||
int pos=0;
|
||||
for(long l:posCache){
|
||||
|
||||
Reference in New Issue
Block a user