diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bb6b64bd..9e511a287 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ All notable changes to this project will be documented in this file. - [#2320] AS3 direct editation - modified flag of scripts vanishes after editing other script with and having error - [#2272] Filters strength attribute caps at 100% - [#2322] AS3 Construct property name formatting -- [#2322] AS3 Assigment position when using dup +- [#2322] AS3 Assignment position when using dup - [#2323] AS3 direct editation - Number class traits are duplicated in constructor - [#2324] AS3 direct editation - nested loop continue/break (with labels) - [#2325] AS3 direct editation - allow single quoted attributes in XML diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index ddf4bdcfd..466d93502 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -1849,13 +1849,13 @@ public class AVM2Code implements Cloneable { * @param localRegTypes Local register types * @param fullyQualifiedNames Fully qualified names * @param visited Visited - * @param localRegAssigmentIps Local register assignment IPs + * @param localRegAssignmentIps Local register assignment IPs * @param bottomStackSetLocals Set locals on bottom of the stack * @return Convert output * @throws ConvertException On convert error * @throws InterruptedException On interrupt */ - public ConvertOutput toSourceOutput(Set switchParts, List callStack, AbcIndexing abcIndex, Map> setLocalPosToGetLocalPos, boolean thisHasDefaultToPrimitive, Reference lineStartItem, String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, ScopeStack localScopeStack, ABC abc, MethodBody body, int start, int end, HashMap localRegNames, HashMap localRegTypes, List fullyQualifiedNames, boolean[] visited, HashMap localRegAssigmentIps, LinkedIdentityHashSet bottomStackSetLocals) throws ConvertException, InterruptedException { + public ConvertOutput toSourceOutput(Set switchParts, List callStack, AbcIndexing abcIndex, Map> setLocalPosToGetLocalPos, boolean thisHasDefaultToPrimitive, Reference lineStartItem, String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, ScopeStack localScopeStack, ABC abc, MethodBody body, int start, int end, HashMap localRegNames, HashMap localRegTypes, List fullyQualifiedNames, boolean[] visited, HashMap localRegAssignmentIps, LinkedIdentityHashSet bottomStackSetLocals) throws ConvertException, InterruptedException { boolean debugMode = DEBUG_MODE; if (debugMode) { System.err.println("OPEN SubSource:" + start + "-" + end + " " + code.get(start).toString() + " to " + code.get(end).toString()); @@ -1944,7 +1944,7 @@ public class AVM2Code implements Cloneable { do { AVM2Instruction insAfter = ip + 1 < code.size() ? code.get(ip + 1) : null; if (insAfter == null) { - ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssigmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); + ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssignmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); ip++; break; } @@ -1966,7 +1966,7 @@ public class AVM2Code implements Cloneable { //stack.add("(" + stack.pop() + ")||"); isAnd = false; } else { - ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssigmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); + ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssignmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); ip++; break; //throw new ConvertException("Unknown pattern after DUP:" + insComparsion.toString()); @@ -1975,7 +1975,7 @@ public class AVM2Code implements Cloneable { } else */ if ((ins.definition instanceof ReturnValueIns) || (ins.definition instanceof ReturnVoidIns) || (ins.definition instanceof ThrowIns)) { - ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssigmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); + ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssignmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); //ip = end + 1; break; } else if (ins.definition instanceof NewFunctionIns) { @@ -2011,13 +2011,13 @@ public class AVM2Code implements Cloneable { } } // What to do when hasDup is false? - ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssigmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); + ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssignmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); NewFunctionAVM2Item nft = (NewFunctionAVM2Item) stack.peek(); nft.functionName = functionName; ip++; } else { try { - ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssigmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); + ins.definition.translate(switchParts, callStack, abcIndex, setLocalPosToGetLocalPos, lineStartItem, isStatic, scriptIndex, classIndex, localRegs, stack, scopeStack, localScopeStack, ins, output, body, abc, localRegNames, localRegTypes, fullyQualifiedNames, path, localRegAssignmentIps, ip, this, thisHasDefaultToPrimitive, bottomStackSetLocals); if (stack.size() == 1 && (stack.peek() instanceof SetLocalAVM2Item)) { @@ -2538,11 +2538,11 @@ public class AVM2Code implements Cloneable { * @param fullyQualifiedNames Fully qualified names * @param initTraits Initialized traits * @param staticOperation Static operation - * @param localRegAssigmentIps Local register assignment IPs + * @param localRegAssignmentIps Local register assignment IPs * @return List of GraphTargetItems * @throws InterruptedException On interrupt */ - public List toGraphTargetItems(List callStack, AbcIndexing abcIndex, boolean thisHasDefaultToPrimitive, ConvertData convertData, String path, int methodIndex, boolean isStatic, int scriptIndex, int classIndex, ABC abc, MethodBody body, HashMap localRegNames, ScopeStack scopeStack, int initializerType, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssigmentIps) throws InterruptedException { + public List toGraphTargetItems(List callStack, AbcIndexing abcIndex, boolean thisHasDefaultToPrimitive, ConvertData convertData, String path, int methodIndex, boolean isStatic, int scriptIndex, int classIndex, ABC abc, MethodBody body, HashMap localRegNames, ScopeStack scopeStack, int initializerType, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssignmentIps) throws InterruptedException { initToSource(); List list; HashMap localRegs = new HashMap<>(); @@ -2557,9 +2557,9 @@ public class AVM2Code implements Cloneable { } try { - list = AVM2Graph.translateViaGraph(null, callStack, abcIndex, path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, localRegTypes, fullyQualifiedNames, staticOperation, localRegAssigmentIps, thisHasDefaultToPrimitive); + list = AVM2Graph.translateViaGraph(null, callStack, abcIndex, path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, localRegTypes, fullyQualifiedNames, staticOperation, localRegAssignmentIps, thisHasDefaultToPrimitive); } catch (SecondPassException spe) { - list = AVM2Graph.translateViaGraph(spe.getData(), callStack, abcIndex, path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, localRegTypes, fullyQualifiedNames, staticOperation, localRegAssigmentIps, thisHasDefaultToPrimitive); + list = AVM2Graph.translateViaGraph(spe.getData(), callStack, abcIndex, path, this, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localRegNames, localRegTypes, fullyQualifiedNames, staticOperation, localRegAssignmentIps, thisHasDefaultToPrimitive); } if (initTraits != null) { loopi: diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index cd0c0e80f..170edc704 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -212,10 +212,10 @@ public class AVM2Graph extends Graph { * @param localScopeStack Local scope stack * @param localRegNames Local register names * @param fullyQualifiedNames Fully qualified names - * @param localRegAssigmentIps Local register assignment IPs + * @param localRegAssignmentIps Local register assignment IPs */ - public AVM2Graph(AbcIndexing abcIndex, AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, ScopeStack scopeStack, ScopeStack localScopeStack, HashMap localRegNames, List fullyQualifiedNames, HashMap localRegAssigmentIps) { - super(new AVM2GraphSource(code, isStatic, scriptIndex, classIndex, localRegs, abc, body, localRegNames, fullyQualifiedNames, localRegAssigmentIps), getExceptionEntries(body)); + public AVM2Graph(AbcIndexing abcIndex, AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, ScopeStack scopeStack, ScopeStack localScopeStack, HashMap localRegNames, List fullyQualifiedNames, HashMap localRegAssignmentIps) { + super(new AVM2GraphSource(code, isStatic, scriptIndex, classIndex, localRegs, abc, body, localRegNames, fullyQualifiedNames, localRegAssignmentIps), getExceptionEntries(body)); this.avm2code = code; this.abc = abc; this.body = body; @@ -741,14 +741,14 @@ public class AVM2Graph extends Graph { * @param localRegTypes Local register types * @param fullyQualifiedNames Fully qualified names * @param staticOperation Unused - * @param localRegAssigmentIps Local register assignment IPs + * @param localRegAssignmentIps Local register assignment IPs * @param thisHasDefaultToPrimitive This has default to primitive * @return List of graph target items * @throws InterruptedException On interrupt */ - public static List translateViaGraph(SecondPassData secondPassData, List callStack, AbcIndexing abcIndex, String path, AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, ScopeStack scopeStack, HashMap localRegNames, HashMap localRegTypes, List fullyQualifiedNames, int staticOperation, HashMap localRegAssigmentIps, boolean thisHasDefaultToPrimitive) throws InterruptedException { + public static List translateViaGraph(SecondPassData secondPassData, List callStack, AbcIndexing abcIndex, String path, AVM2Code code, ABC abc, MethodBody body, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, ScopeStack scopeStack, HashMap localRegNames, HashMap localRegTypes, List fullyQualifiedNames, int staticOperation, HashMap localRegAssignmentIps, boolean thisHasDefaultToPrimitive) throws InterruptedException { ScopeStack localScopeStack = new ScopeStack(); - AVM2Graph g = new AVM2Graph(abcIndex, code, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localScopeStack, localRegNames, fullyQualifiedNames, localRegAssigmentIps); + AVM2Graph g = new AVM2Graph(abcIndex, code, abc, body, isStatic, scriptIndex, classIndex, localRegs, scopeStack, localScopeStack, localRegNames, fullyQualifiedNames, localRegAssignmentIps); AVM2LocalData localData = new AVM2LocalData(); localData.secondPassData = secondPassData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java index 9a3963bed..5577166a8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java @@ -91,7 +91,7 @@ public class AVM2GraphSource extends GraphSource { /** * Local register assignment IPs - map of register index to IP */ - HashMap localRegAssigmentIps; + HashMap localRegAssignmentIps; /** * Get AVM2 code @@ -114,9 +114,9 @@ public class AVM2GraphSource extends GraphSource { * @param body Method body * @param localRegNames Local register names * @param fullyQualifiedNames Fully qualified names - * @param localRegAssigmentIp Local register assignment IPs + * @param localRegAssignmentIp Local register assignment IPs */ - public AVM2GraphSource(AVM2Code code, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, ABC abc, MethodBody body, HashMap localRegNames, List fullyQualifiedNames, HashMap localRegAssigmentIp) { + public AVM2GraphSource(AVM2Code code, boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, ABC abc, MethodBody body, HashMap localRegNames, List fullyQualifiedNames, HashMap localRegAssignmentIp) { this.code = code; this.isStatic = isStatic; this.classIndex = classIndex; @@ -126,7 +126,7 @@ public class AVM2GraphSource extends GraphSource { this.localRegNames = localRegNames; this.fullyQualifiedNames = fullyQualifiedNames; this.scriptIndex = scriptIndex; - this.localRegAssigmentIps = localRegAssigmentIp; + this.localRegAssignmentIps = localRegAssignmentIp; code.calculateDebugFileLine(abc); } @@ -203,7 +203,7 @@ public class AVM2GraphSource extends GraphSource { public List translatePart(Graph graph, GraphPart part, BaseLocalData localData, TranslateStack stack, int start, int end, int staticOperation, String path) throws InterruptedException { List ret = new ArrayList<>(); Reference lineStartItem = new Reference<>(localData.lineStartInstruction); - ConvertOutput co = code.toSourceOutput(localData.allSwitchParts, ((AVM2LocalData) localData).callStack, ((AVM2LocalData) localData).abcIndex, ((AVM2LocalData) localData).setLocalPosToGetLocalPos, ((AVM2LocalData) localData).thisHasDefaultToPrimitive, lineStartItem, path, part, false, isStatic, scriptIndex, classIndex, localRegs, stack, ((AVM2LocalData) localData).scopeStack, ((AVM2LocalData) localData).localScopeStack, abc, body, start, end, localRegNames, ((AVM2LocalData) localData).localRegTypes, fullyQualifiedNames, new boolean[size()], localRegAssigmentIps, ((AVM2LocalData) localData).bottomSetLocals); + ConvertOutput co = code.toSourceOutput(localData.allSwitchParts, ((AVM2LocalData) localData).callStack, ((AVM2LocalData) localData).abcIndex, ((AVM2LocalData) localData).setLocalPosToGetLocalPos, ((AVM2LocalData) localData).thisHasDefaultToPrimitive, lineStartItem, path, part, false, isStatic, scriptIndex, classIndex, localRegs, stack, ((AVM2LocalData) localData).scopeStack, ((AVM2LocalData) localData).localScopeStack, abc, body, start, end, localRegNames, ((AVM2LocalData) localData).localRegTypes, fullyQualifiedNames, new boolean[size()], localRegAssignmentIps, ((AVM2LocalData) localData).bottomSetLocals); localData.lineStartInstruction = lineStartItem.getVal(); ret.addAll(co.output); return ret; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java index 648b88599..ae281c8fc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java @@ -103,7 +103,7 @@ public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, A * @param isStatic Is static */ public InitPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem value, GraphTargetItem type, GraphTargetItem callType, boolean isStatic) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.object = object; this.propertyName = propertyName; this.type = type; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java index 9662f179e..4b486d3a9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java @@ -97,7 +97,7 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig * @param type Type */ public SetLocalAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int regIndex, GraphTargetItem value, GraphTargetItem type) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.regIndex = regIndex; this.type = type; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java index 014a03cbf..f7ba3f908 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java @@ -116,7 +116,7 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As * @param isStatic Is static */ public SetPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value, GraphTargetItem type, GraphTargetItem callType, boolean isStatic) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT); this.object = object; this.propertyName = propertyName; this.value = value; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java index 385346c03..0842e9cf8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java @@ -107,7 +107,7 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign * @param type Type */ public SetSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, GraphTargetItem slotObject, int slotIndex, Multiname slotName, GraphTargetItem value, GraphTargetItem type) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.slotName = slotName; this.scope = scope; this.slotObject = slotObject; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java index 24897b4d7..a623c048d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java @@ -110,7 +110,7 @@ public class SetSuperAVM2Item extends AVM2Item implements SetTypeAVM2Item { * @param isStatic Is static */ public SetSuperAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem type, GraphTargetItem callType, boolean isStatic) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.object = object; this.propertyName = propertyName; this.type = type; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java index 6394da33a..84eb89c5c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java @@ -250,7 +250,7 @@ public enum SymbolType { /** * Operator: = */ - ASSIGN(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: > */ @@ -362,55 +362,55 @@ public enum SymbolType { /** * Operator: += */ - ASSIGN_PLUS(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_PLUS(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: -= */ - ASSIGN_MINUS(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_MINUS(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: *= */ - ASSIGN_MULTIPLY(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_MULTIPLY(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: /= */ - ASSIGN_DIVIDE(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_DIVIDE(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: &= */ - ASSIGN_BITAND(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_BITAND(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: |= */ - ASSIGN_BITOR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_BITOR(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: ^= */ - ASSIGN_XOR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_XOR(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: %= */ - ASSIGN_MODULO(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_MODULO(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: <<= */ - ASSIGN_SHIFT_LEFT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_SHIFT_LEFT(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: >>= */ - ASSIGN_SHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_SHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: >>>= */ - ASSIGN_USHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_USHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: &&= */ - ASSIGN_AND(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_AND(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: ||= */ - ASSIGN_OR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_OR(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), /** * Operator: as */ diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java index abb16b3d2..11bf02320 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java @@ -104,7 +104,7 @@ public class CallMethodActionItem extends ActionItem { } else if (methodNameStr.startsWith("__set__") && arguments.size() == 1) { special = SPECIAL_SETTER; setterGetterVarName = methodNameStr.substring(7); - precedence = PRECEDENCE_ASSIGMENT; + precedence = PRECEDENCE_ASSIGNMENT; } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java index 240707a86..f95cb848e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java @@ -109,7 +109,7 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem * @param value Value */ public SetMemberActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem objectName, GraphTargetItem value) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.object = object; this.objectName = objectName; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java index 8c1193777..afb0d40b4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java @@ -91,7 +91,7 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt * @param value Value */ public SetPropertyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem target, int propertyIndex, GraphTargetItem value) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.target = target; this.propertyIndex = propertyIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java index 05d939424..027ac0dc4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java @@ -104,7 +104,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt * @param value Value */ public SetVariableActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem name, GraphTargetItem value) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.name = name; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java index e59d69326..fbb9dd803 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java @@ -106,7 +106,7 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction * @param define Define */ public StoreRegisterActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, RegisterNumber register, GraphTargetItem value, boolean define) { - super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT, value); + super(instruction, lineStartIns, PRECEDENCE_ASSIGNMENT, value); this.register = register; this.define = define; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java index 672541c1e..b3f467053 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/SymbolType.java @@ -73,7 +73,7 @@ public enum SymbolType { COMMA(GraphTargetItem.PRECEDENCE_COMMA, false), REST, DOT(GraphTargetItem.PRECEDENCE_PRIMARY, false), - ASSIGN(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), GREATER_THAN(GraphTargetItem.PRECEDENCE_RELATIONAL, true), LOWER_THAN(GraphTargetItem.PRECEDENCE_RELATIONAL, true), NOT(GraphTargetItem.PRECEDENCE_UNARY, false), @@ -103,17 +103,17 @@ public enum SymbolType { SHIFT_LEFT(GraphTargetItem.PRECEDENCE_BITWISESHIFT, true), SHIFT_RIGHT(GraphTargetItem.PRECEDENCE_BITWISESHIFT, true), USHIFT_RIGHT(GraphTargetItem.PRECEDENCE_BITWISESHIFT, true), - ASSIGN_PLUS(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_MINUS(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_MULTIPLY(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_DIVIDE(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_BITAND(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_BITOR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_XOR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_MODULO(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_SHIFT_LEFT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_SHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_USHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_PLUS(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_MINUS(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_MULTIPLY(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_DIVIDE(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_BITAND(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_BITOR(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_XOR(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_MODULO(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_SHIFT_LEFT(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_SHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), + ASSIGN_USHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGNMENT, true, true), DELETE(GraphTargetItem.PRECEDENCE_UNARY, false), INSTANCEOF(GraphTargetItem.PRECEDENCE_RELATIONAL, true), NEW(GraphTargetItem.PRECEDENCE_PRIMARY, false), diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java index 10eaf75fa..9a8afd9f8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -89,7 +89,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { public static final int PRECEDENCE_CONDITIONAL = 13; - public static final int PRECEDENCE_ASSIGMENT = 14; + public static final int PRECEDENCE_ASSIGNMENT = 14; public static final int PRECEDENCE_COMMA = 15; diff --git a/resources/com.jpexs.decompiler.flash.metainfo.xml b/resources/com.jpexs.decompiler.flash.metainfo.xml index 1dabc3a34..329d3a083 100644 --- a/resources/com.jpexs.decompiler.flash.metainfo.xml +++ b/resources/com.jpexs.decompiler.flash.metainfo.xml @@ -85,7 +85,7 @@
  • #2320 AS3 direct editation - modified flag of scripts vanishes after editing other script with and having error
  • #2272 Filters strength attribute caps at 100%
  • #2322 AS3 Construct property name formatting
  • -
  • #2322 AS3 Assigment position when using dup
  • +
  • #2322 AS3 Assignment position when using dup
  • #2323 AS3 direct editation - Number class traits are duplicated in constructor
  • #2324 AS3 direct editation - nested loop continue/break (with labels)
  • #2325 AS3 direct editation - allow single quoted attributes in XML