mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-30 09:06:23 +00:00
Fixed: #2270 AS3 decompilation - unnnecessary local registers assignments as part of expressions when using optimization like dup, setlocal N instead of setlocal N, getlocal N
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
package com.jpexs.decompiler.graph;
|
||||
|
||||
import com.jpexs.decompiler.graph.model.PopItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Stack;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -38,6 +42,27 @@ public class TranslateStack extends Stack<GraphTargetItem> {
|
||||
*/
|
||||
private final String path;
|
||||
|
||||
private Map<String, GraphTargetItem> marks = new HashMap<>();
|
||||
|
||||
|
||||
/**
|
||||
* Sets mark.
|
||||
* @param name Name
|
||||
* @param value Value
|
||||
*/
|
||||
public void setMark(String name, GraphTargetItem value) {
|
||||
marks.put(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets mark.
|
||||
* @param name Name
|
||||
* @return Value
|
||||
*/
|
||||
public GraphTargetItem getMark(String name) {
|
||||
return marks.get(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simplifies all items in the stack.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user