diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java index 7ad9ccff1..ebd677e24 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java @@ -37,16 +37,20 @@ import com.jpexs.decompiler.flash.abc.avm2.model.PostDecrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.PostIncrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.SetLocalAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.SetPropertyAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.operations.AddAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.operations.PreDecrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.operations.PreIncrementAVM2Item; import com.jpexs.decompiler.flash.abc.types.MethodBody; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; +import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.DuplicateItem; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Objects; import java.util.Stack; /** @@ -332,7 +336,40 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns } } - GraphTargetItem result = new SetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, value); + + SetPropertyAVM2Item result = new SetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, value); + + /*if (value instanceof LocalRegAVM2Item) { + LocalRegAVM2Item locVal = (LocalRegAVM2Item) value; + if (multiname.name instanceof LocalRegAVM2Item) { + LocalRegAVM2Item locName = (LocalRegAVM2Item) multiname.name; + if (output.size() > 2) { + if (output.get(output.size() - 1) instanceof SetLocalAVM2Item) { + SetLocalAVM2Item setLocVal = (SetLocalAVM2Item) output.get(output.size() - 1); + if (setLocVal.regIndex == locVal.regIndex) { + if (output.get(output.size() - 2) instanceof SetLocalAVM2Item) { + SetLocalAVM2Item setLocName = (SetLocalAVM2Item) output.get(output.size() - 2); + if (setLocName.regIndex == locName.regIndex) { + if (setLocVal.value instanceof CompoundableBinaryOp) { + CompoundableBinaryOp binaryOp = (CompoundableBinaryOp) setLocVal.value; + if (binaryOp.getLeftSide() instanceof GetPropertyAVM2Item) { + GetPropertyAVM2Item getProp = (GetPropertyAVM2Item) binaryOp.getLeftSide(); + if (((FullMultinameAVM2Item) getProp.propertyName).compareSame(multiname) && Objects.equals(getProp.object, obj)) { + multiname.name = setLocName.value; + result.compoundValue = binaryOp.getRightSide(); + result.compoundOperator = binaryOp.getOperator(); + output.remove(output.size() - 2); + output.remove(output.size() - 1); + } + } + } + } + } + } + } + } + } + }*/ SetTypeIns.handleResult(value, stack, output, localData, result, -1); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java index 9df8837bc..069a7968d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyLoadAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -107,4 +109,38 @@ public class AlchemyLoadAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 79 * hash + Objects.hashCode(this.type); + hash = 79 * hash + this.size; + hash = 79 * hash + Objects.hashCode(this.ofs); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final AlchemyLoadAVM2Item other = (AlchemyLoadAVM2Item) obj; + if (this.size != other.size) { + return false; + } + if (!Objects.equals(this.type, other.type)) { + return false; + } + if (!Objects.equals(this.ofs, other.ofs)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java index 5ff77281b..1074af3d8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemySignExtendAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -73,4 +75,33 @@ public class AlchemySignExtendAVM2Item extends AVM2Item { } return toSourceMerge(localData, generator, value, ins(code)); } + + @Override + public int hashCode() { + int hash = 7; + hash = 31 * hash + this.size; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final AlchemySignExtendAVM2Item other = (AlchemySignExtendAVM2Item) obj; + if (this.size != other.size) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java index 913519c0c..defbecdff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AlchemyStoreAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -102,4 +104,41 @@ public class AlchemyStoreAVM2Item extends AVM2Item { } return toSourceMerge(localData, generator, ofs, ins(code)); } + + @Override + public int hashCode() { + int hash = 5; + hash = 97 * hash + Objects.hashCode(this.type); + hash = 97 * hash + this.size; + hash = 97 * hash + Objects.hashCode(this.ofs); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final AlchemyStoreAVM2Item other = (AlchemyStoreAVM2Item) obj; + if (this.size != other.size) { + return false; + } + if (!Objects.equals(this.type, other.type)) { + return false; + } + if (!Objects.equals(this.ofs, other.ofs)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java index 880a5dc7f..33a21c4c9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -121,4 +122,5 @@ public class ApplyTypeAVM2Item extends AVM2Item { ins(AVM2Instructions.ApplyType, params.size()) ); } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java index 670d1e29d..f40d59df7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/BooleanAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -72,4 +74,30 @@ public class BooleanAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 79 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final BooleanAVM2Item other = (BooleanAVM2Item) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java index 51e2d10dc..aa5f1b0f1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -27,6 +28,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; /** @@ -231,4 +233,38 @@ public class CallAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 97 * hash + Objects.hashCode(this.receiver); + hash = 97 * hash + Objects.hashCode(this.function); + hash = 97 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallAVM2Item other = (CallAVM2Item) obj; + if (!Objects.equals(this.receiver, other.receiver)) { + return false; + } + if (!Objects.equals(this.function, other.function)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java index 43401336d..cd6f19d00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallMethodAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -73,4 +75,38 @@ public class CallMethodAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 61 * hash + Objects.hashCode(this.receiver); + hash = 61 * hash + Objects.hashCode(this.methodName); + hash = 61 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallMethodAVM2Item other = (CallMethodAVM2Item) obj; + if (!Objects.equals(this.methodName, other.methodName)) { + return false; + } + if (!Objects.equals(this.receiver, other.receiver)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java index 424142834..edd494c92 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -88,4 +90,42 @@ public class CallPropertyAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 17 * hash + Objects.hashCode(this.receiver); + hash = 17 * hash + Objects.hashCode(this.propertyName); + hash = 17 * hash + Objects.hashCode(this.arguments); + hash = 17 * hash + (this.isVoid ? 1 : 0); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallPropertyAVM2Item other = (CallPropertyAVM2Item) obj; + if (this.isVoid != other.isVoid) { + return false; + } + if (!Objects.equals(this.receiver, other.receiver)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java index 2a88c1917..9479f7001 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallStaticAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -73,4 +75,38 @@ public class CallStaticAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 29 * hash + Objects.hashCode(this.receiver); + hash = 29 * hash + Objects.hashCode(this.methodName); + hash = 29 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallStaticAVM2Item other = (CallStaticAVM2Item) obj; + if (!Objects.equals(this.methodName, other.methodName)) { + return false; + } + if (!Objects.equals(this.receiver, other.receiver)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java index e3c06f598..1383db090 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallSuperAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -80,4 +82,42 @@ public class CallSuperAVM2Item extends AVM2Item { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 53 * hash + Objects.hashCode(this.receiver); + hash = 53 * hash + Objects.hashCode(this.multiname); + hash = 53 * hash + Objects.hashCode(this.arguments); + hash = 53 * hash + (this.isVoid ? 1 : 0); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallSuperAVM2Item other = (CallSuperAVM2Item) obj; + if (this.isVoid != other.isVoid) { + return false; + } + if (!Objects.equals(this.receiver, other.receiver)) { + return false; + } + if (!Objects.equals(this.multiname, other.multiname)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java index fa87f73d8..2f202af82 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.types.Multiname; @@ -48,4 +49,5 @@ public class ClassAVM2Item extends AVM2Item { public boolean hasReturnValue() { return false; } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java index 846895f63..1c38f879a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -30,6 +31,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -140,4 +142,33 @@ public class CoerceAVM2Item extends AVM2Item { } return toSourceMerge(localData, generator, value, ins); } + + @Override + public int hashCode() { + int hash = 5; + hash = 67 * hash + Objects.hashCode(this.typeObj); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CoerceAVM2Item other = (CoerceAVM2Item) obj; + if (!Objects.equals(this.typeObj, other.typeObj)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java index 167d5692d..1012a9b6d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -81,4 +83,37 @@ public class ConstructAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 59 * hash + Objects.hashCode(this.object); + hash = 59 * hash + Objects.hashCode(this.args); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ConstructAVM2Item other = (ConstructAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.args, other.args)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java index 824bb6d63..e7bee26b8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -77,4 +79,38 @@ public class ConstructPropAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 67 * hash + Objects.hashCode(this.object); + hash = 67 * hash + Objects.hashCode(this.propertyName); + hash = 67 * hash + Objects.hashCode(this.args); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ConstructPropAVM2Item other = (ConstructPropAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + if (!Objects.equals(this.args, other.args)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java index 95da6bdda..365a71680 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructSuperAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -83,4 +85,34 @@ public class ConstructSuperAVM2Item extends AVM2Item { new AVM2Instruction(0, AVM2Instructions.ConstructSuper, new int[]{args.size()}) ); } + + @Override + public int hashCode() { + int hash = 5; + hash = 71 * hash + Objects.hashCode(this.object); + hash = 71 * hash + Objects.hashCode(this.args); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ConstructSuperAVM2Item other = (ConstructSuperAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.args, other.args)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java index c39da02d0..c544d9044 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConvertAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.ecma.EcmaScript; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; import java.util.Set; /** @@ -100,4 +102,33 @@ public class ConvertAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 23 * hash + Objects.hashCode(this.type); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ConvertAVM2Item other = (ConvertAVM2Item) obj; + if (!Objects.equals(this.type, other.type)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java index ed07a2972..d1c7d4c8a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecLocalAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -49,4 +50,30 @@ public class DecLocalAVM2Item extends AVM2Item { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 73 * hash + this.regIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DecLocalAVM2Item other = (DecLocalAVM2Item) obj; + if (this.regIndex != other.regIndex) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java index d68f322e7..896e92d64 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; import java.util.Set; /** @@ -68,4 +69,29 @@ public class DecrementAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java index 2f94a1c93..72bc1480d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DefaultXMLNamespace.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -65,4 +67,33 @@ public class DefaultXMLNamespace extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSourceMerge(localData, generator, ns, ins(AVM2Instructions.DXNSLate)); } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.ns); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DefaultXMLNamespace other = (DefaultXMLNamespace) obj; + if (!Objects.equals(this.ns, other.ns)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java index c6ce015ff..28dffa9ff 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXAttrAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -57,4 +59,28 @@ public class EscapeXAttrAVM2Item extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSourceMerge(localData, generator, value, ins(AVM2Instructions.EscXAttr)); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java index 49cfd403d..901bd3280 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/EscapeXElemAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -57,4 +59,28 @@ public class EscapeXElemAVM2Item extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSourceMerge(localData, generator, value, ins(AVM2Instructions.EscXElem)); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java index 83504c230..d66523f38 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FilteredCheckAVM2Item.java @@ -22,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -58,4 +59,30 @@ public class FilteredCheckAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 47 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FilteredCheckAVM2Item other = (FilteredCheckAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java index 9d531ca92..9b92ba422 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindDefAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.types.Multiname; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -49,4 +51,30 @@ public class FindDefAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 83 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FindDefAVM2Item other = (FindDefAVM2Item) obj; + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java index 1dd929aa4..e7d2c9cad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FindPropertyAVM2Item.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -71,4 +72,29 @@ public class FindPropertyAVM2Item extends AVM2Item { return toSourceMerge(localData, generator, ins(AVM2Instructions.FindProperty, ((AVM2SourceGenerator) generator).typeName(localData, propertyName))); } + @Override + public int hashCode() { + int hash = 3; + hash = 47 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FindPropertyAVM2Item other = (FindPropertyAVM2Item) obj; + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java index da8002d35..1a3c0f794 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FloatValueAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -74,4 +76,30 @@ public class FloatValueAVM2Item extends NumberValueAVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 53 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FloatValueAVM2Item other = (FloatValueAVM2Item) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java index 9134bbea3..96241e6cd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -204,4 +205,42 @@ public class FullMultinameAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 29 * hash + this.multinameIndex; + hash = 29 * hash + Objects.hashCode(this.name); + hash = 29 * hash + Objects.hashCode(this.namespace); + hash = 29 * hash + (this.property ? 1 : 0); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FullMultinameAVM2Item other = (FullMultinameAVM2Item) obj; + if (this.multinameIndex != other.multinameIndex) { + return false; + } + if (this.property != other.property) { + return false; + } + if (!Objects.equals(this.name, other.name)) { + return false; + } + if (!Objects.equals(this.namespace, other.namespace)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java index 867ee4fb0..7a61d201d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -82,4 +84,34 @@ public class GetDescendantsAVM2Item extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return ((AVM2SourceGenerator) generator).generate(localData, this); } + + @Override + public int hashCode() { + int hash = 7; + hash = 67 * hash + Objects.hashCode(this.object); + hash = 67 * hash + Objects.hashCode(this.multiname); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetDescendantsAVM2Item other = (GetDescendantsAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.multiname, other.multiname)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java index 7ec9f48b2..12f4d5217 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java @@ -25,6 +25,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SimpleValue; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -67,4 +68,30 @@ public class GetLexAVM2Item extends AVM2Item implements SimpleValue { public boolean isSimpleValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 29 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetLexAVM2Item other = (GetLexAVM2Item) obj; + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java index 801eed788..9be0a0339 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,6 +34,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -152,4 +154,33 @@ public class GetPropertyAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 97 * hash + Objects.hashCode(this.object); + hash = 97 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetPropertyAVM2Item other = (GetPropertyAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java index 67a4f6f4a..cacdba818 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.types.Multiname; @@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -78,4 +80,34 @@ public class GetSlotAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 67 * hash + Objects.hashCode(this.scope); + hash = 67 * hash + this.slotIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetSlotAVM2Item other = (GetSlotAVM2Item) obj; + if (this.slotIndex != other.slotIndex) { + return false; + } + if (!Objects.equals(this.scope, other.scope)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java index 2081f89b7..9c4465d9e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -65,4 +67,34 @@ public class GetSuperAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 29 * hash + Objects.hashCode(this.object); + hash = 29 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetSuperAVM2Item other = (GetSuperAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GlobalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GlobalAVM2Item.java index a4ef69cb5..855b691f0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GlobalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GlobalAVM2Item.java @@ -23,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; +import java.util.Objects; /** * @@ -59,4 +60,23 @@ public class GlobalAVM2Item extends AVM2Item { return new TypeItem("global"); } + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java index e90ccffce..818c9d372 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/HasNextAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -87,4 +89,34 @@ public class HasNextAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 29 * hash + Objects.hashCode(this.index); + hash = 29 * hash + Objects.hashCode(this.obj); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final HasNextAVM2Item other = (HasNextAVM2Item) obj; + if (!Objects.equals(this.index, other.index)) { + return false; + } + if (!Objects.equals(this.obj, other.obj)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java index afba794c1..e0b5ff7ad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -70,4 +72,34 @@ public class InAVM2Item extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSourceMerge(localData, generator, object, collection, ins(AVM2Instructions.In)); } + + @Override + public int hashCode() { + int hash = 3; + hash = 89 * hash + Objects.hashCode(this.object); + hash = 89 * hash + Objects.hashCode(this.collection); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final InAVM2Item other = (InAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.collection, other.collection)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java index 310307aee..bcff9c703 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncLocalAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -49,4 +50,30 @@ public class IncLocalAVM2Item extends AVM2Item { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 59 * hash + this.regIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final IncLocalAVM2Item other = (IncLocalAVM2Item) obj; + if (this.regIndex != other.regIndex) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java index 28d410027..d76da2947 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java @@ -21,6 +21,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; import java.util.Set; /** @@ -68,4 +69,28 @@ public class IncrementAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } 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 f4fd65838..dfbaa87e4 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -85,4 +87,34 @@ public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, A public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 17 * hash + Objects.hashCode(this.object); + hash = 17 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final InitPropertyAVM2Item other = (InitPropertyAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java index c50aeeff9..1fa4e7094 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -35,6 +36,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -134,4 +136,34 @@ public class InitVectorAVM2Item extends AVM2Item { } return ret; } + + @Override + public int hashCode() { + int hash = 5; + hash = 31 * hash + Objects.hashCode(this.subtype); + hash = 31 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final InitVectorAVM2Item other = (InitVectorAVM2Item) obj; + if (!Objects.equals(this.subtype, other.subtype)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java index 0dd866161..d36a1838e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -32,6 +33,7 @@ import com.jpexs.decompiler.graph.model.IntegerValueTypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -158,4 +160,30 @@ public class IntegerValueAVM2Item extends NumberValueAVM2Item implements Integer public int intValue() { return (int) (long) value; } + + @Override + public int hashCode() { + int hash = 3; + hash = 79 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final IntegerValueAVM2Item other = (IntegerValueAVM2Item) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java index 3bc375f60..9541f9338 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java index 5b2aa5ebb..dfb39810c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameSpaceAVM2Item.java @@ -73,4 +73,30 @@ public class NameSpaceAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 31 * hash + this.namespaceIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NameSpaceAVM2Item other = (NameSpaceAVM2Item) obj; + if (this.namespaceIndex != other.namespaceIndex) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java index 358538a5c..b54e9ba46 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.TernarOpItem; +import java.util.Objects; /** * @@ -66,4 +68,33 @@ public class NameValuePair extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 73 * hash + Objects.hashCode(this.name); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NameValuePair other = (NameValuePair) obj; + if (!Objects.equals(this.name, other.name)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java index d23e9697f..205351cde 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NanAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -65,4 +67,25 @@ public class NanAVM2Item extends AVM2Item implements SimpleValue { public boolean isSimpleValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java index f0a2c6a13..78b6e96fd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; import java.util.List; +import java.util.Objects; /** * @@ -58,4 +60,30 @@ public class NewActivationAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 29 * hash + Objects.hashCode(this.slots); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NewActivationAVM2Item other = (NewActivationAVM2Item) obj; + if (!Objects.equals(this.slots, other.slots)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java index 27da78481..67d0da2b1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewArrayAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -108,4 +110,30 @@ public class NewArrayAVM2Item extends AVM2Item { new AVM2Instruction(0, AVM2Instructions.NewArray, new int[]{values.size()}) ); } + + @Override + public int hashCode() { + int hash = 5; + hash = 73 * hash + Objects.hashCode(this.values); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NewArrayAVM2Item other = (NewArrayAVM2Item) obj; + if (!Objects.equals(this.values, other.values)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java index b2d1b8780..38d5503d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java @@ -31,6 +31,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashSet; import java.util.List; +import java.util.Objects; /** * @@ -109,4 +110,34 @@ public class NewFunctionAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 37 * hash + Objects.hashCode(this.functionName); + hash = 37 * hash + this.methodIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NewFunctionAVM2Item other = (NewFunctionAVM2Item) obj; + if (this.methodIndex != other.methodIndex) { + return false; + } + if (!Objects.equals(this.functionName, other.functionName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java index 0dc32c74c..11cde00a6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewObjectAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,6 +34,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; /** @@ -127,4 +129,30 @@ public class NewObjectAVM2Item extends AVM2Item { } return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 67 * hash + Objects.hashCode(this.pairs); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NewObjectAVM2Item other = (NewObjectAVM2Item) obj; + if (!Objects.equals(this.pairs, other.pairs)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java index 5b74a0c9d..b896cdbcd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -74,4 +76,34 @@ public class NextNameAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 89 * hash + Objects.hashCode(this.index); + hash = 89 * hash + Objects.hashCode(this.obj); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NextNameAVM2Item other = (NextNameAVM2Item) obj; + if (!Objects.equals(this.index, other.index)) { + return false; + } + if (!Objects.equals(this.obj, other.obj)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java index 39f47bbf3..963aebb09 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -74,4 +76,34 @@ public class NextValueAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 53 * hash + Objects.hashCode(this.index); + hash = 53 * hash + Objects.hashCode(this.obj); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NextValueAVM2Item other = (NextValueAVM2Item) obj; + if (!Objects.equals(this.index, other.index)) { + return false; + } + if (!Objects.equals(this.obj, other.obj)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java index 4823312ab..f56d29980 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NullAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -71,4 +72,24 @@ public class NullAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java index c1e989933..ae1c33b5e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NumberValueAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.graph.GraphSourceItem; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java index 0495f170c..b25e2d94b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostDecrementAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -82,4 +84,30 @@ public class PostDecrementAVM2Item extends AVM2Item implements AssignmentAVM2Ite } return new ArrayList<>(); //? } + + @Override + public int hashCode() { + int hash = 3; + hash = 67 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PostDecrementAVM2Item other = (PostDecrementAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java index af5bc4053..0e4f76e5f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/PostIncrementAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -82,4 +84,30 @@ public class PostIncrementAVM2Item extends AVM2Item implements AssignmentAVM2Ite } return new ArrayList<>(); //? } + + @Override + public int hashCode() { + int hash = 3; + hash = 89 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PostIncrementAVM2Item other = (PostIncrementAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/RegExpAvm2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/RegExpAvm2Item.java index 3f7ec7e32..0bc35607a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/RegExpAvm2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/RegExpAvm2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -37,6 +38,7 @@ import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.helpers.Helper; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -181,4 +183,34 @@ public class RegExpAvm2Item extends AVM2Item implements Callable { public Object call(List args) { return call("exec", args); } + + @Override + public int hashCode() { + int hash = 7; + hash = 89 * hash + Objects.hashCode(this.pattern); + hash = 89 * hash + Objects.hashCode(this.modifier); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final RegExpAvm2Item other = (RegExpAvm2Item) obj; + if (!Objects.equals(this.pattern, other.pattern)) { + return false; + } + if (!Objects.equals(this.modifier, other.modifier)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java index 60dc3df28..2ec0d01c8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnValueAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ExitItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -57,4 +59,28 @@ public class ReturnValueAVM2Item extends AVM2Item implements ExitItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java index c9647445c..1906bac42 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ReturnVoidAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ExitItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -56,4 +58,24 @@ public class ReturnVoidAVM2Item extends AVM2Item implements ExitItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } 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 471ba906c..9a102c53a 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -136,4 +138,33 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 67 * hash + this.regIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetLocalAVM2Item other = (SetLocalAVM2Item) obj; + if (this.regIndex != other.regIndex) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } 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 86f1cfcb6..08fb04ce1 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -44,6 +45,10 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As public DeclarationAVM2Item declaration; + public GraphTargetItem compoundValue; + + public String compoundOperator; + @Override public DeclarationAVM2Item getDeclaration() { return declaration; @@ -76,6 +81,14 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { formatProperty(writer, object, propertyName, localData); + + if (compoundOperator != null) { + writer.append(" "); + writer.append(compoundOperator); + writer.append("= "); + return compoundValue.toString(writer, localData); + } + writer.append(" = "); if (declaration != null && !declaration.type.equals(TypeItem.UNBOUNDED) && (value instanceof ConvertAVM2Item)) { return value.value.toString(writer, localData); 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 643e0c462..f993e819a 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -121,4 +123,38 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 29 * hash + Objects.hashCode(this.scope); + hash = 29 * hash + this.slotIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetSlotAVM2Item other = (SetSlotAVM2Item) obj; + if (this.slotIndex != other.slotIndex) { + return false; + } + if (!Objects.equals(this.scope, other.scope)) { + return false; + } + + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } 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 5757a323b..82695fc60 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.model.clauses.DeclarationAVM2Item; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -104,4 +106,37 @@ public class SetSuperAVM2Item extends AVM2Item implements SetTypeAVM2Item { public GraphTargetItem getValue() { return value; } + + @Override + public int hashCode() { + int hash = 5; + hash = 67 * hash + Objects.hashCode(this.object); + hash = 67 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetSuperAVM2Item other = (SetSuperAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java index 20c16396a..9512cd565 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/StringAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.helpers.Helper; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -100,4 +102,30 @@ public class StringAVM2Item extends AVM2Item implements SimpleValue { this.value = value; numberValue = null; } + + @Override + public int hashCode() { + int hash = 7; + hash = 67 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final StringAVM2Item other = (StringAVM2Item) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java index a1341e07c..ac1329d2b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java @@ -31,6 +31,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -103,4 +104,24 @@ public class ThisAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java index 405d98613..76e5b565b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThrowAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.ExitItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -57,4 +59,28 @@ public class ThrowAVM2Item extends AVM2Item implements ExitItem { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return ((AVM2SourceGenerator) generator).generate(localData, this); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java index 1e5cf793b..c68cdef3f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UndefinedAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -76,4 +77,24 @@ public class UndefinedAVM2Item extends AVM2Item implements SimpleValue { public boolean isSimpleValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java index 2e95f5586..250db6d2f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/UnparsedAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -20,6 +21,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -48,4 +50,30 @@ public class UnparsedAVM2Item extends AVM2Item { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 89 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UnparsedAVM2Item other = (UnparsedAVM2Item) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java index 22be7686e..28dad0550 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithAVM2Item.java @@ -29,6 +29,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -102,4 +103,34 @@ public class WithAVM2Item extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return ((AVM2SourceGenerator) generator).generate(localData, this); } + + @Override + public int hashCode() { + int hash = 5; + hash = 73 * hash + Objects.hashCode(this.scope); + hash = 73 * hash + Objects.hashCode(this.items); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final WithAVM2Item other = (WithAVM2Item) obj; + if (!Objects.equals(this.scope, other.scope)) { + return false; + } + if (!Objects.equals(this.items, other.items)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java index 1632d20f3..aa81ca3d5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithEndAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -59,4 +61,30 @@ public class WithEndAVM2Item extends AVM2Item { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 53 * hash + Objects.hashCode(this.scope); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final WithEndAVM2Item other = (WithEndAVM2Item) obj; + if (!Objects.equals(this.scope, other.scope)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java index ddb5b3336..1416cf923 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/WithObjectAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -63,4 +65,30 @@ public class WithObjectAVM2Item extends AVM2Item { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return scope.toSource(localData, generator); } + + @Override + public int hashCode() { + int hash = 7; + hash = 79 * hash + Objects.hashCode(this.scope); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final WithObjectAVM2Item other = (WithObjectAVM2Item) obj; + if (!Objects.equals(this.scope, other.scope)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java index 788174899..8ccecf5c0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -63,4 +65,30 @@ public class XMLAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 59 * hash + Objects.hashCode(this.parts); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final XMLAVM2Item other = (XMLAVM2Item) obj; + if (!Objects.equals(this.parts, other.parts)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java index feffe3bea..9d4db33d4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,15 +28,17 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; +import java.util.Objects; /** * * @author JPEXS */ -public class AddAVM2Item extends BinaryOpItem { +public class AddAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public AddAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "+", "", ""); //? diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java index af46fc26b..5859d46a9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitAndAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class BitAndAVM2Item extends BinaryOpItem { +public class BitAndAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public BitAndAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java index e2a02ae3c..4b7138dbc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitOrAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class BitOrAVM2Item extends BinaryOpItem { +public class BitOrAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public BitOrAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java index 9531d0159..1590db27a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/BitXorAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class BitXorAVM2Item extends BinaryOpItem { +public class BitXorAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public BitXorAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java index 8b32dcae3..059479fd7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -33,6 +34,7 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -104,4 +106,34 @@ public class DeletePropertyAVM2Item extends AVM2Item { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 53 * hash + Objects.hashCode(this.object); + hash = 53 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DeletePropertyAVM2Item other = (DeletePropertyAVM2Item) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java index 28ed57aec..3a09714e4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DivideAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -32,7 +34,7 @@ import java.util.List; * * @author JPEXS */ -public class DivideAVM2Item extends BinaryOpItem { +public class DivideAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public DivideAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java index d377c912f..602c2ada3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/LShiftAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class LShiftAVM2Item extends BinaryOpItem { +public class LShiftAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public LShiftAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java index da0d348d2..646338869 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -32,7 +34,7 @@ import java.util.List; * * @author JPEXS */ -public class ModuloAVM2Item extends BinaryOpItem { +public class ModuloAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public ModuloAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java index faeb5d5b5..fe3800015 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -32,7 +34,7 @@ import java.util.List; * * @author JPEXS */ -public class MultiplyAVM2Item extends BinaryOpItem { +public class MultiplyAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public MultiplyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java index 8e1c56dfb..29a667664 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/RShiftAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class RShiftAVM2Item extends BinaryOpItem { +public class RShiftAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public RShiftAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java index f753d5d87..e94052c1a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -33,7 +35,7 @@ import java.util.List; * * @author JPEXS */ -public class SubtractAVM2Item extends BinaryOpItem { +public class SubtractAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public SubtractAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java index ce27890bf..ebcdada9d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/URShiftAVM2Item.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class URShiftAVM2Item extends BinaryOpItem { +public class URShiftAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { public URShiftAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java index 6bbf583c8..ea347a678 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/AsciiToCharActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -76,4 +78,28 @@ public class AsciiToCharActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java index bea33dabe..63fe098be 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -61,4 +63,28 @@ public class CallActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java index 545868354..006d921c9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; 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 0af9f9806..b590a952d 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -134,4 +136,38 @@ public class CallMethodActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 79 * hash + Objects.hashCode(this.methodName); + hash = 79 * hash + Objects.hashCode(this.scriptObject); + hash = 79 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CallMethodActionItem other = (CallMethodActionItem) obj; + if (!Objects.equals(this.methodName, other.methodName)) { + return false; + } + if (!Objects.equals(this.scriptObject, other.scriptObject)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java index ce9095873..02e3ff3ec 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CastOpActionItem.java @@ -27,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -76,4 +77,34 @@ public class CastOpActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 29 * hash + Objects.hashCode(this.constructor); + hash = 29 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CastOpActionItem other = (CastOpActionItem) obj; + if (!Objects.equals(this.constructor, other.constructor)) { + return false; + } + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java index 9d6a8e272..a668c8da7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CharToAsciiActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -91,4 +93,28 @@ public class CharToAsciiActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java index 2321d73c1..b64337782 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -42,6 +43,7 @@ public class CloneSpriteActionItem extends ActionItem { @Override public void visit(GraphTargetVisitorInterface visitor) { visitor.visit(source); + visitor.visit(target); visitor.visit(depth); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java index ed469588f..006548936 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DecrementActionItem.java @@ -27,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -93,4 +94,30 @@ public class DecrementActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 3; + hash = 53 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DecrementActionItem other = (DecrementActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java index 94217d41a..b34780728 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; @@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -120,4 +122,33 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.name); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DefineLocalActionItem other = (DefineLocalActionItem) obj; + if (!Objects.equals(this.name, other.name)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java deleted file mode 100644 index 4984b7bb7..000000000 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineRegisterActionItem.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010-2021 JPEXS, All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3.0 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ -package com.jpexs.decompiler.flash.action.model; - -import com.jpexs.decompiler.flash.helpers.GraphTextWriter; -import com.jpexs.decompiler.graph.model.LocalData; - -/** - * - * @author JPEXS - */ -public class DefineRegisterActionItem extends ActionItem { - - private final String identifier; - - private final int register; - - public DefineRegisterActionItem(String identifier, int register) { - super(null, null, PRECEDENCE_PRIMARY); - this.identifier = identifier; - this.register = register; - } - - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - return writer.append("var ").append(identifier); - } - - @Override - public boolean hasReturnValue() { - return false; - } -} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java index 5f28a43c0..4e0ff8210 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -95,4 +97,34 @@ public class DeleteActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.object); + hash = 97 * hash + Objects.hashCode(this.propertyName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DeleteActionItem other = (DeleteActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.propertyName, other.propertyName)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java index c4942433b..b90368d52 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerateActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -72,4 +74,30 @@ public class EnumerateActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 53 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final EnumerateActionItem other = (EnumerateActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java index c4546a827..d48a523c4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.model.BranchStackResistant; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -63,4 +65,24 @@ public class EnumeratedValueActionItem extends ActionItem implements BranchStack public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java index 04c3f2a93..c29464584 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -62,4 +63,24 @@ public class EnumerationAssignmentValueActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java index 562d8baf1..93b894d96 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EvalActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -53,4 +55,28 @@ public class EvalActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java index 904b7157a..e71f7d406 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ExtendsActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemPos; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -57,4 +59,34 @@ public class ExtendsActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 29 * hash + Objects.hashCode(this.subclass); + hash = 29 * hash + Objects.hashCode(this.superclass); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ExtendsActionItem other = (ExtendsActionItem) obj; + if (!Objects.equals(this.subclass, other.subclass)) { + return false; + } + if (!Objects.equals(this.superclass, other.superclass)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java index f882dd367..82038588d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -35,8 +37,6 @@ import java.util.List; */ public class FSCommand2ActionItem extends ActionItem { - public String target; - public List arguments; public GraphTargetItem command; @@ -92,4 +92,34 @@ public class FSCommand2ActionItem extends ActionItem { public boolean hasReturnValue() { return true; //FIXME ? } + + @Override + public int hashCode() { + int hash = 3; + hash = 71 * hash + Objects.hashCode(this.arguments); + hash = 71 * hash + Objects.hashCode(this.command); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FSCommand2ActionItem other = (FSCommand2ActionItem) obj; + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + if (!Objects.equals(this.command, other.command)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java index 75316e9fd..a43a49dbc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -63,4 +65,30 @@ public class FSCommandActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 97 * hash + Objects.hashCode(this.command); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final FSCommandActionItem other = (FSCommandActionItem) obj; + if (!Objects.equals(this.command, other.command)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java index 4f6c73368..f19c2adbb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; @@ -409,4 +410,6 @@ public class FunctionActionItem extends ActionItem { public boolean hasReturnValue() { return false; //function actually returns itself, but here is false for generator to not add Pop } + + //What about hashcode and equals? Probably not. } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java index ec27ca375..e39755985 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetTimeActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -63,4 +64,24 @@ public class GetTimeActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java index 05e6f119e..983bd0230 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -88,4 +90,38 @@ public class GetURL2ActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 79 * hash + Objects.hashCode(this.urlString); + hash = 79 * hash + Objects.hashCode(this.targetString); + hash = 79 * hash + this.sendVarsMethod; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetURL2ActionItem other = (GetURL2ActionItem) obj; + if (this.sendVarsMethod != other.sendVarsMethod) { + return false; + } + if (!Objects.equals(this.urlString, other.urlString)) { + return false; + } + if (!Objects.equals(this.targetString, other.targetString)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java index 026865b0c..5ffa9f8f4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.helpers.Helper; import java.util.List; +import java.util.Objects; /** * @@ -61,4 +63,34 @@ public class GetURLActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 41 * hash + Objects.hashCode(this.urlString); + hash = 41 * hash + Objects.hashCode(this.targetString); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GetURLActionItem other = (GetURLActionItem) obj; + if (!Objects.equals(this.urlString, other.urlString)) { + return false; + } + if (!Objects.equals(this.targetString, other.targetString)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java index 57f2f26b4..78e4ad12f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -51,4 +52,24 @@ public class GetVersionActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java index c82fbc9b4..d4a3f8565 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -28,6 +29,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -90,4 +92,42 @@ public class GotoFrame2ActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 67 * hash + Objects.hashCode(this.frame); + hash = 67 * hash + (this.sceneBiasFlag ? 1 : 0); + hash = 67 * hash + (this.playFlag ? 1 : 0); + hash = 67 * hash + this.sceneBias; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GotoFrame2ActionItem other = (GotoFrame2ActionItem) obj; + if (this.sceneBiasFlag != other.sceneBiasFlag) { + return false; + } + if (this.playFlag != other.playFlag) { + return false; + } + if (this.sceneBias != other.sceneBias) { + return false; + } + if (!Objects.equals(this.frame, other.frame)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java index 14e0f649d..4e923905c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -55,4 +56,30 @@ public class GotoFrameActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 31 * hash + this.frame; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GotoFrameActionItem other = (GotoFrameActionItem) obj; + if (this.frame != other.frame) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java index a1f1e5a9c..29459bd85 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.helpers.Helper; import java.util.List; +import java.util.Objects; /** * @@ -56,4 +58,30 @@ public class GotoLabelActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 23 * hash + Objects.hashCode(this.label); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GotoLabelActionItem other = (GotoLabelActionItem) obj; + if (!Objects.equals(this.label, other.label)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java index 4aec7003f..a3c874f89 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ImplementsOpActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemPos; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -65,4 +67,34 @@ public class ImplementsOpActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 89 * hash + Objects.hashCode(this.subclass); + hash = 89 * hash + Objects.hashCode(this.superclasses); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final ImplementsOpActionItem other = (ImplementsOpActionItem) obj; + if (!Objects.equals(this.subclass, other.subclass)) { + return false; + } + if (!Objects.equals(this.superclasses, other.superclasses)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java index c9afc828d..4f97387b6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/IncrementActionItem.java @@ -27,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -93,4 +94,30 @@ public class IncrementActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 41 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final IncrementActionItem other = (IncrementActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java index 47f0bc907..ab435b3e3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -75,4 +77,30 @@ public class InitArrayActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 89 * hash + Objects.hashCode(this.values); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final InitArrayActionItem other = (InitArrayActionItem) obj; + if (!Objects.equals(this.values, other.values)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java index b3e9587c1..36dea6e7c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.TernarOpItem; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -100,4 +102,34 @@ public class InitObjectActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 61 * hash + Objects.hashCode(this.names); + hash = 61 * hash + Objects.hashCode(this.values); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final InitObjectActionItem other = (InitObjectActionItem) obj; + if (!Objects.equals(this.names, other.names)) { + return false; + } + if (!Objects.equals(this.values, other.values)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java index 679673a07..30bc8ad7d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -78,4 +80,38 @@ public class LoadMovieActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.urlString); + hash = 97 * hash + Objects.hashCode(this.targetString); + hash = 97 * hash + this.method; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoadMovieActionItem other = (LoadMovieActionItem) obj; + if (this.method != other.method) { + return false; + } + if (!Objects.equals(this.urlString, other.urlString)) { + return false; + } + if (!Objects.equals(this.targetString, other.targetString)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java index fcef11ac4..5dd1a578a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -87,4 +89,38 @@ public class LoadMovieNumActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 97 * hash + Objects.hashCode(this.urlString); + hash = 97 * hash + Objects.hashCode(this.num); + hash = 97 * hash + this.method; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoadMovieNumActionItem other = (LoadMovieNumActionItem) obj; + if (this.method != other.method) { + return false; + } + if (!Objects.equals(this.urlString, other.urlString)) { + return false; + } + if (!Objects.equals(this.num, other.num)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java index b47e6c72a..36f8d3d08 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -78,4 +80,38 @@ public class LoadVariablesActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 13 * hash + Objects.hashCode(this.urlString); + hash = 13 * hash + Objects.hashCode(this.targetString); + hash = 13 * hash + this.method; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoadVariablesActionItem other = (LoadVariablesActionItem) obj; + if (this.method != other.method) { + return false; + } + if (!Objects.equals(this.urlString, other.urlString)) { + return false; + } + if (!Objects.equals(this.targetString, other.targetString)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java index 465e6d845..56b3ec19a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -87,4 +89,38 @@ public class LoadVariablesNumActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 59 * hash + Objects.hashCode(this.urlString); + hash = 59 * hash + Objects.hashCode(this.num); + hash = 59 * hash + this.method; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoadVariablesNumActionItem other = (LoadVariablesNumActionItem) obj; + if (this.method != other.method) { + return false; + } + if (!Objects.equals(this.urlString, other.urlString)) { + return false; + } + if (!Objects.equals(this.num, other.num)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java index bbdc7ae81..d4b199a0c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBAsciiToCharActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -76,4 +78,28 @@ public class MBAsciiToCharActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java index 0451c3822..af24b835e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBCharToAsciiActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -76,4 +78,28 @@ public class MBCharToAsciiActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java index 031a348ea..70145a169 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringExtractActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -111,4 +113,37 @@ public class MBStringExtractActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.index); + hash = 97 * hash + Objects.hashCode(this.count); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final MBStringExtractActionItem other = (MBStringExtractActionItem) obj; + if (!Objects.equals(this.index, other.index)) { + return false; + } + if (!Objects.equals(this.count, other.count)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java index 50c5d484b..15e8f87a9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/MBStringLengthActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -77,4 +79,28 @@ public class MBStringLengthActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java index 4b1d72de0..bb9761910 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -113,4 +115,38 @@ public class NewMethodActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 47 * hash + Objects.hashCode(this.methodName); + hash = 47 * hash + Objects.hashCode(this.scriptObject); + hash = 47 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NewMethodActionItem other = (NewMethodActionItem) obj; + if (!Objects.equals(this.methodName, other.methodName)) { + return false; + } + if (!Objects.equals(this.scriptObject, other.scriptObject)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java index f05504d0e..5f0776098 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewObjectActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -83,4 +85,34 @@ public class NewObjectActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 97 * hash + Objects.hashCode(this.objectName); + hash = 97 * hash + Objects.hashCode(this.arguments); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final NewObjectActionItem other = (NewObjectActionItem) obj; + if (!Objects.equals(this.objectName, other.objectName)) { + return false; + } + if (!Objects.equals(this.arguments, other.arguments)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java index 9461b43a3..a7b70c61d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class NextFrameActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java index 1464f3094..59756eabe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class PlayActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java index a5a317b1f..a15628b78 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PopActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -58,4 +59,24 @@ public class PopActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java index 764fe4e4a..87316c319 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -35,6 +36,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -146,4 +148,30 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 71 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PostDecrementActionItem other = (PostDecrementActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java index 36ba99431..c0fd56ea5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -35,6 +36,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * @@ -146,4 +148,30 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 5; + hash = 17 * hash + Objects.hashCode(this.object); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PostIncrementActionItem other = (PostIncrementActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java index 95802735d..f17e17d6f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class PrevFrameActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java index f8af42eb6..c117c170d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -71,4 +73,34 @@ public class PrintActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.target); + hash = 97 * hash + Objects.hashCode(this.boundingBox); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PrintActionItem other = (PrintActionItem) obj; + if (!Objects.equals(this.target, other.target)) { + return false; + } + if (!Objects.equals(this.boundingBox, other.boundingBox)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java index fc3c64028..584d86f4c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -71,4 +73,34 @@ public class PrintAsBitmapActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 67 * hash + Objects.hashCode(this.target); + hash = 67 * hash + Objects.hashCode(this.boundingBox); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PrintAsBitmapActionItem other = (PrintAsBitmapActionItem) obj; + if (!Objects.equals(this.target, other.target)) { + return false; + } + if (!Objects.equals(this.boundingBox, other.boundingBox)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java index 83a874a6e..90b68437e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -77,4 +79,34 @@ public class PrintAsBitmapNumActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 97 * hash + Objects.hashCode(this.num); + hash = 97 * hash + Objects.hashCode(this.boundingBox); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PrintAsBitmapNumActionItem other = (PrintAsBitmapNumActionItem) obj; + if (!Objects.equals(this.num, other.num)) { + return false; + } + if (!Objects.equals(this.boundingBox, other.boundingBox)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java index b8be5d540..78381e928 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -77,4 +79,34 @@ public class PrintNumActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 37 * hash + Objects.hashCode(this.num); + hash = 37 * hash + Objects.hashCode(this.boundingBox); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final PrintNumActionItem other = (PrintNumActionItem) obj; + if (!Objects.equals(this.num, other.num)) { + return false; + } + if (!Objects.equals(this.boundingBox, other.boundingBox)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java index 5b2eb2206..ce9d29747 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RandomNumberActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Random; /** @@ -73,4 +75,28 @@ public class RandomNumberActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java index 807e5db1a..f604f8899 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -61,4 +63,28 @@ public class RemoveSpriteActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java index 6a66a6f5c..473077804 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SWF; @@ -36,6 +37,7 @@ import com.jpexs.decompiler.graph.model.ExitItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -94,4 +96,28 @@ public class ReturnActionItem extends ActionItem implements ExitItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } 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 61e29118e..ee335dc48 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; @@ -32,6 +33,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -139,4 +141,37 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 23 * hash + Objects.hashCode(this.object); + hash = 23 * hash + Objects.hashCode(this.objectName); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetMemberActionItem other = (SetMemberActionItem) obj; + if (!Objects.equals(this.object, other.object)) { + return false; + } + if (!Objects.equals(this.objectName, other.objectName)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } 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 33f723937..60e7c2af0 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 @@ -32,6 +32,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -133,4 +134,37 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.target); + hash = 97 * hash + this.propertyIndex; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetPropertyActionItem other = (SetPropertyActionItem) obj; + if (this.propertyIndex != other.propertyIndex) { + return false; + } + if (!Objects.equals(this.target, other.target)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java index ce5e44c01..f3c632c09 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTarget2ActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,6 +25,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -63,4 +65,30 @@ public class SetTarget2ActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 59 * hash + Objects.hashCode(this.target); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetTarget2ActionItem other = (SetTarget2ActionItem) obj; + if (!Objects.equals(this.target, other.target)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java index 99acd651f..ce6a1562c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetTargetActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.helpers.Helper; import java.util.List; +import java.util.Objects; /** * @@ -53,4 +55,30 @@ public class SetTargetActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 79 * hash + Objects.hashCode(this.target); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetTargetActionItem other = (SetTargetActionItem) obj; + if (!Objects.equals(this.target, other.target)) { + return false; + } + return true; + } + } 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 5ff90cc61..899a90021 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; @@ -32,6 +33,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -143,4 +145,33 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 13 * hash + Objects.hashCode(this.name); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final SetVariableActionItem other = (SetVariableActionItem) obj; + if (!Objects.equals(this.name, other.name)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java index ed83df879..772a7242d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -115,4 +117,54 @@ public class StartDragActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 29 * hash + Objects.hashCode(this.target); + hash = 29 * hash + Objects.hashCode(this.lockCenter); + hash = 29 * hash + Objects.hashCode(this.constrain); + hash = 29 * hash + Objects.hashCode(this.y2); + hash = 29 * hash + Objects.hashCode(this.x2); + hash = 29 * hash + Objects.hashCode(this.y1); + hash = 29 * hash + Objects.hashCode(this.x1); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final StartDragActionItem other = (StartDragActionItem) obj; + if (!Objects.equals(this.target, other.target)) { + return false; + } + if (!Objects.equals(this.lockCenter, other.lockCenter)) { + return false; + } + if (!Objects.equals(this.constrain, other.constrain)) { + return false; + } + if (!Objects.equals(this.y2, other.y2)) { + return false; + } + if (!Objects.equals(this.x2, other.x2)) { + return false; + } + if (!Objects.equals(this.y1, other.y1)) { + return false; + } + if (!Objects.equals(this.x1, other.x1)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java index 24721f379..5b5c6af2f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class StopActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java index e9bdd89b5..9106ef3d7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class StopAllSoundsActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java index 92414c9e2..e7802e41f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class StopDragActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } 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 c12cc941b..c8455d2b3 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 @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -131,4 +133,33 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction public Object getResult() { return value.getResult(); } + + @Override + public int hashCode() { + int hash = 7; + hash = 59 * hash + Objects.hashCode(this.register); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final StoreRegisterActionItem other = (StoreRegisterActionItem) obj; + if (!Objects.equals(this.register, other.register)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java index 66465403b..1d7728798 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StrictModeActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -44,4 +45,24 @@ public class StrictModeActionItem extends ActionItem { public boolean hasReturnValue() { return false; //FIXME ? } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java index 8347742f1..98302faee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringExtractActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -102,4 +104,37 @@ public class StringExtractActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public int hashCode() { + int hash = 7; + hash = 37 * hash + Objects.hashCode(this.index); + hash = 37 * hash + Objects.hashCode(this.count); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final StringExtractActionItem other = (StringExtractActionItem) obj; + if (!Objects.equals(this.index, other.index)) { + return false; + } + if (!Objects.equals(this.count, other.count)) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java index e42ee1dfe..03273b5df 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StringLengthActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -69,4 +71,28 @@ public class StringLengthActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java index 067fe095d..fa484697a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TargetPathActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -61,4 +63,28 @@ public class TargetPathActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java index b0b2c3106..f9a7ac874 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -21,6 +22,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -78,4 +80,33 @@ public class TemporaryRegister extends ActionItem { public GraphTargetItem getNotCoercedNoDup() { return value.getNotCoercedNoDup(); } + + @Override + public int hashCode() { + int hash = 5; + hash = 41 * hash + this.regId; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TemporaryRegister other = (TemporaryRegister) obj; + if (this.regId != other.regId) { + return false; + } + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java index 69b231432..eceebb696 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ThrowActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -58,4 +60,28 @@ public class ThrowActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java index 09029378a..2b81547d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToIntegerActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -71,4 +73,28 @@ public class ToIntegerActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java index b3d0e5f96..5c13a06bf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToNumberActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -70,4 +72,28 @@ public class ToNumberActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java index f185d6f37..1c1179caf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToStringActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -71,4 +73,28 @@ public class ToStringActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java index 30a35dad3..369352389 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -50,4 +51,24 @@ public class ToggleHighQualityActionItem extends ActionItem { public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSourceMerge(localData, generator, new ActionToggleQuality()); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java index d964bff09..35c116e73 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -61,4 +63,28 @@ public class TraceActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java index a32122800..4a16c4964 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -98,4 +100,28 @@ public class TypeOfActionItem extends ActionItem { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java index 6171a244c..318adae71 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -26,6 +27,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -63,4 +65,30 @@ public class UnLoadMovieActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 5; + hash = 37 * hash + Objects.hashCode(this.targetString); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UnLoadMovieActionItem other = (UnLoadMovieActionItem) obj; + if (!Objects.equals(this.targetString, other.targetString)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java index 805cbb903..b2da3ec3c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -29,6 +30,7 @@ import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; +import java.util.Objects; /** * @@ -72,4 +74,30 @@ public class UnLoadMovieNumActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 7; + hash = 17 * hash + Objects.hashCode(this.num); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UnLoadMovieNumActionItem other = (UnLoadMovieNumActionItem) obj; + if (!Objects.equals(this.num, other.num)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java index e301cf18c..e4eca1bca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java index 372d144bf..002487aae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnsupportedActionItem.java @@ -12,13 +12,15 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.flash.AppResources; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.model.LocalData; +import java.util.Objects; /** * @@ -42,4 +44,30 @@ public class UnsupportedActionItem extends ActionItem { public boolean hasReturnValue() { return false; } + + @Override + public int hashCode() { + int hash = 3; + hash = 89 * hash + Objects.hashCode(this.value); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UnsupportedActionItem other = (UnsupportedActionItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java index cefc0541a..4bc787be7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -27,6 +28,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -34,7 +36,7 @@ import java.util.List; * * @author JPEXS */ -public class AddActionItem extends BinaryOpItem { +public class AddActionItem extends BinaryOpItem implements CompoundableBinaryOp { boolean version2; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java index b8e99ccdc..af0e0fbf9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class BitAndActionItem extends BinaryOpItem { +public class BitAndActionItem extends BinaryOpItem implements CompoundableBinaryOp { public BitAndActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISEAND, leftSide, rightSide, "&", "int", "int"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java index 0752a9ca3..9ce1d6c6c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -30,7 +32,7 @@ import java.util.List; * * @author JPEXS */ -public class BitOrActionItem extends BinaryOpItem { +public class BitOrActionItem extends BinaryOpItem implements CompoundableBinaryOp { public BitOrActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISEOR, leftSide, rightSide, "|", "int", "int"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java index ef8566166..243c9d912 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -33,7 +35,7 @@ import java.util.List; * * @author JPEXS */ -public class BitXorActionItem extends BinaryOpItem { +public class BitXorActionItem extends BinaryOpItem implements CompoundableBinaryOp { public BitXorActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISEXOR, leftSide, rightSide, "^", "int", "int"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java index 1d9e2db54..97316f6a7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.List; @@ -29,7 +31,7 @@ import java.util.List; * * @author JPEXS */ -public class DivideActionItem extends BinaryOpItem { +public class DivideActionItem extends BinaryOpItem implements CompoundableBinaryOp { public DivideActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "/", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java index 3ae6ae6ef..434aaa262 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,13 +25,14 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.List; /** * * @author JPEXS */ -public class LShiftActionItem extends BinaryOpItem { +public class LShiftActionItem extends BinaryOpItem implements CompoundableBinaryOp { public LShiftActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, "<<", "int", "int"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java index 42b4e4473..c3166cc75 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,13 +24,14 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.List; /** * * @author JPEXS */ -public class ModuloActionItem extends BinaryOpItem { +public class ModuloActionItem extends BinaryOpItem implements CompoundableBinaryOp { public ModuloActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "%", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java index c455239cb..81eff7189 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,13 +24,14 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.List; /** * * @author JPEXS */ -public class MultiplyActionItem extends BinaryOpItem { +public class MultiplyActionItem extends BinaryOpItem implements CompoundableBinaryOp { public MultiplyActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_MULTIPLICATIVE, leftSide, rightSide, "*", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java index 86b5036e7..f8be45866 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -24,13 +25,14 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.List; /** * * @author JPEXS */ -public class RShiftActionItem extends BinaryOpItem { +public class RShiftActionItem extends BinaryOpItem implements CompoundableBinaryOp { public RShiftActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>", "int", "int"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java index 3111254d1..1f7532129 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -25,6 +26,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; @@ -32,7 +34,7 @@ import java.util.List; * * @author JPEXS */ -public class SubtractActionItem extends BinaryOpItem { +public class SubtractActionItem extends BinaryOpItem implements CompoundableBinaryOp { public SubtractActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_ADDITIVE, leftSide, rightSide, "-", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java index ebfb93497..5125aeca5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.action.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,13 +24,14 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; +import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.List; /** * * @author JPEXS */ -public class URShiftActionItem extends BinaryOpItem { +public class URShiftActionItem extends BinaryOpItem implements CompoundableBinaryOp { public URShiftActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem leftSide, GraphTargetItem rightSide) { super(instruction, lineStartIns, PRECEDENCE_BITWISESHIFT, leftSide, rightSide, ">>>", "Number", "Number"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java index ca626d706..197dee08e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOp.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.graph.GraphTargetItem; @@ -35,4 +36,6 @@ public interface BinaryOp { public int getPrecedence(); public List getAllSubItems(); + + public String getOperator(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java index 9427af181..0a7ba272c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/BinaryOpItem.java @@ -12,9 +12,11 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; +import com.jpexs.decompiler.flash.abc.avm2.model.operations.AddAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphPart; import com.jpexs.decompiler.graph.GraphSourceItem; @@ -212,4 +214,9 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp { visitor.visit(getLeftSide()); visitor.visit(getRightSide()); } + + @Override + public String getOperator() { + return operator; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CompoundableBinaryOp.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CompoundableBinaryOp.java new file mode 100644 index 000000000..4b492b09d --- /dev/null +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CompoundableBinaryOp.java @@ -0,0 +1,9 @@ +package com.jpexs.decompiler.graph.model; + +/** + * + * @author JPEXS + */ +public interface CompoundableBinaryOp extends BinaryOp { + +} diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java index 194006a4a..a0907bdaf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/FalseItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -75,4 +76,24 @@ public class FalseItem extends GraphTargetItem implements LogicalOpItem, SimpleV public Object getResult() { return Boolean.FALSE; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java index 6abf3c672..1a1f707bb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/IntegerValueItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -63,4 +64,30 @@ public class IntegerValueItem extends GraphTargetItem implements IntegerValueTyp public int intValue() { return intValue; } + + @Override + public int hashCode() { + int hash = 3; + hash = 83 * hash + this.intValue; + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final IntegerValueItem other = (IntegerValueItem) obj; + if (this.intValue != other.intValue) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java index 0bdc36f43..9151a6583 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/OrItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java index 96c4e11b9..daae2a85f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/PushItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import java.util.List; +import java.util.Objects; /** * @@ -77,4 +79,28 @@ public class PushItem extends GraphTargetItem { public GraphTargetItem getNotCoercedNoDup() { return value.getNotCoercedNoDup(); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java index 9ff28ef1a..3d7dc3eb9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TernarOpItem.java @@ -24,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import java.util.List; +import java.util.Objects; /** * @@ -94,4 +95,38 @@ public class TernarOpItem extends GraphTargetItem { public GraphTargetItem returnType() { return onTrue.returnType(); } + + @Override + public int hashCode() { + int hash = 5; + hash = 61 * hash + Objects.hashCode(this.expression); + hash = 61 * hash + Objects.hashCode(this.onTrue); + hash = 61 * hash + Objects.hashCode(this.onFalse); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TernarOpItem other = (TernarOpItem) obj; + if (!Objects.equals(this.expression, other.expression)) { + return false; + } + if (!Objects.equals(this.onTrue, other.onTrue)) { + return false; + } + if (!Objects.equals(this.onFalse, other.onFalse)) { + return false; + } + return true; + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java index eb456eff5..da3a607f4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/TrueItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; @@ -75,4 +76,24 @@ public class TrueItem extends GraphTargetItem implements LogicalOpItem, SimpleVa public Object getResult() { return Boolean.TRUE; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java index 81b05292b..9ab979e79 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/UnaryOpItem.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.graph.model; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -20,6 +21,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphSourceItemPos; import com.jpexs.decompiler.graph.GraphTargetItem; import java.util.List; +import java.util.Objects; import java.util.Set; /** @@ -102,4 +104,28 @@ public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp { public boolean hasReturnValue() { return true; } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final GraphTargetItem other = (GraphTargetItem) obj; + if (!Objects.equals(this.value, other.value)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + return hash; + } }