diff --git a/src/com/jpexs/decompiler/flash/abc/ABC.java b/src/com/jpexs/decompiler/flash/abc/ABC.java index 7f9958f14..0cca2173e 100644 --- a/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -567,7 +567,7 @@ public class ABC { MethodBody bod=bodies.get(bodyIdxFromMethodIdx.get(script_info.get(i).init_index)); GraphTextWriter t=new HilightedTextWriter(Configuration.getCodeFormatting(),false); try { - bod.toString("script", ScriptExportMode.PCODE, false,i, 0, this, null, constants, method_info, new Stack(), false, t ,new ArrayList(), null); + bod.toString("script", ScriptExportMode.PCODE, false,i, 0, this, null, constants, method_info, new TranslateStack(), false, t ,new ArrayList(), null); } catch (InterruptedException ex) { Logger.getLogger(ABC.class.getName()).log(Level.SEVERE, null, ex); } diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index 1ab7b56ff..a218014aa 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -2883,7 +2883,7 @@ public class AVM2Code implements Serializable { } } } - //int cnt = removeTraps(refs, true, false, localData, new Stack(), new ArrayList(), code, code.adr2pos(addr), new HashMap(), new HashMap>(), decisions, path); + //int cnt = removeTraps(refs, true, false, localData, new TranslateStack(), new ArrayList(), code, code.adr2pos(addr), new HashMap(), new HashMap>(), decisions, path); code.getCode().removeIgnored(constants, trait, info, body); return cnt; } diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java index bb5ac1899..944e81a0b 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/IfTypeIns.java @@ -17,10 +17,10 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions; import com.jpexs.decompiler.graph.GraphTargetItem; +import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; -import java.util.Stack; public interface IfTypeIns { - public abstract void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins); + public abstract void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins); } diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java index 073fc88f5..c416f1cda 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfEqIns.java @@ -31,7 +31,6 @@ import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; -import java.util.Stack; public class IfEqIns extends InstructionDefinition implements IfTypeIns { @@ -47,7 +46,7 @@ public class IfEqIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new NeqAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java index b111a11d0..17ed6f964 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfFalseIns.java @@ -30,7 +30,6 @@ import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.NotItem; import java.util.HashMap; import java.util.List; -import java.util.Stack; public class IfFalseIns extends InstructionDefinition implements IfTypeIns { @@ -45,7 +44,7 @@ public class IfFalseIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { //String v1 = stack.pop().toString(); //stack.push("(" + v1 + ")"); } diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java index 2caf5b6fe..b8f18d336 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGeIns.java @@ -31,7 +31,6 @@ import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; -import java.util.Stack; public class IfGeIns extends InstructionDefinition implements IfTypeIns { @@ -47,7 +46,7 @@ public class IfGeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new LtAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java index 9afe2fc8b..d3082a0b1 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfGtIns.java @@ -47,7 +47,7 @@ public class IfGtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new LeAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java index b11c24263..afb7fb2f6 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLeIns.java @@ -47,7 +47,7 @@ public class IfLeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new GtAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java index 5c4e29a37..178942c08 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfLtIns.java @@ -31,7 +31,6 @@ import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; -import java.util.Stack; public class IfLtIns extends InstructionDefinition implements IfTypeIns { @@ -47,7 +46,7 @@ public class IfLtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new GeAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java index 8af869642..2d774b0fa 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGeIns.java @@ -47,7 +47,7 @@ public class IfNGeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new GeAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java index 87169db35..87c949f26 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNGtIns.java @@ -47,7 +47,7 @@ public class IfNGtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new GtAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java index 11680303c..fa66a64a2 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLeIns.java @@ -47,7 +47,7 @@ public class IfNLeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new LeAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java index 9463182dd..5cff6b57a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNLtIns.java @@ -47,7 +47,7 @@ public class IfNLtIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new LtAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java index 7a9432e63..44fc9d31a 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfNeIns.java @@ -47,7 +47,7 @@ public class IfNeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new EqAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java index 4bc7728bb..3fc1bcbf9 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictEqIns.java @@ -47,7 +47,7 @@ public class IfStrictEqIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new StrictNeqAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java index 40f1e5249..437ae6b1e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfStrictNeIns.java @@ -47,7 +47,7 @@ public class IfStrictNeIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v2 = stack.pop(); GraphTargetItem v1 = stack.pop(); stack.push(new StrictEqAVM2Item(ins, v1, v2)); diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java index 12df56876..bbd7b634e 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/IfTrueIns.java @@ -45,7 +45,7 @@ public class IfTrueIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { GraphTargetItem v1 = stack.pop(); stack.push(new NotItem(ins, v1)); } diff --git a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java index 70f730095..2272cbf76 100644 --- a/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java +++ b/src/com/jpexs/decompiler/flash/abc/avm2/instructions/jumps/JumpIns.java @@ -43,6 +43,6 @@ public class JumpIns extends InstructionDefinition implements IfTypeIns { } @Override - public void translateInverted(HashMap localRegs, Stack stack, AVM2Instruction ins) { + public void translateInverted(HashMap localRegs, TranslateStack stack, AVM2Instruction ins) { } } diff --git a/src/com/jpexs/decompiler/flash/action/Action.java b/src/com/jpexs/decompiler/flash/action/Action.java index 33f9ed198..7d1b2a9b5 100644 --- a/src/com/jpexs/decompiler/flash/action/Action.java +++ b/src/com/jpexs/decompiler/flash/action/Action.java @@ -826,7 +826,7 @@ public class Action implements GraphSourceItem { } if (action instanceof GraphSourceItemContainer) { GraphSourceItemContainer cnt = (GraphSourceItemContainer) action; - //List out=actionsPartToTree(new HashMap(), new HashMap(),new HashMap(), new Stack(), src, ip+1,endip-1 , version); + //List out=actionsPartToTree(new HashMap(), new HashMap(),new HashMap(), new TranslateStack(), src, ip+1,endip-1 , version); long endAddr = action.getAddress() + cnt.getHeaderSize(); String cntName = cnt.getName(); List> outs = new ArrayList<>(); diff --git a/src/com/jpexs/decompiler/graph/Graph.java b/src/com/jpexs/decompiler/graph/Graph.java index 13fc84470..657ba2ea7 100644 --- a/src/com/jpexs/decompiler/graph/Graph.java +++ b/src/com/jpexs/decompiler/graph/Graph.java @@ -381,7 +381,7 @@ public class Graph { part = part.getSubParts().get(0).nextParts.get(0); } /*localData = prepareBranchLocalData(localData); - Stack st = new Stack<>(); + TranslateStack st = new TranslateStack(); List output=new ArrayList<>(); GraphPart startPart = part; for (int i = part.start; i <= part.end; i++) {