mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-15 01:22:11 +00:00
valueEquals implemented for AS1/2
This commit is contained in:
@@ -97,6 +97,24 @@ public class AsciiToCharActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -82,6 +82,24 @@ public class CallActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -140,6 +140,24 @@ public class CallFunctionActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final CallFunctionActionItem other = (CallFunctionActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(functionName, other.functionName)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.arguments, other.arguments)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
|
||||
return toSourceMerge(localData, generator, toSourceCall(localData, generator, arguments), functionName, new ActionCallFunction());
|
||||
|
||||
@@ -170,6 +170,30 @@ public class CallMethodActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final CallMethodActionItem other = (CallMethodActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.methodName, other.methodName)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.scriptObject, other.scriptObject)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.arguments, other.arguments)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -107,4 +107,25 @@ public class CastOpActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final CastOpActionItem other = (CastOpActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.constructor, other.constructor)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -112,6 +112,24 @@ public class CharToAsciiActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -90,4 +91,62 @@ public class CloneSpriteActionItem extends ActionItem {
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 17 * hash + Objects.hashCode(this.source);
|
||||
hash = 17 * hash + Objects.hashCode(this.target);
|
||||
hash = 17 * hash + Objects.hashCode(this.depth);
|
||||
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 CloneSpriteActionItem other = (CloneSpriteActionItem) obj;
|
||||
if (!Objects.equals(this.source, other.source)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.depth, other.depth)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final CloneSpriteActionItem other = (CloneSpriteActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.source, other.source)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.depth, other.depth)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,4 +120,22 @@ public class DecrementActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final DecrementActionItem other = (DecrementActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -151,6 +151,27 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final DefineLocalActionItem other = (DefineLocalActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.name, other.name)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -127,6 +127,27 @@ public class DeleteActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final DeleteActionItem other = (DeleteActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.propertyName, other.propertyName)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -239,10 +239,10 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue {
|
||||
if (!Objects.equals(this.constants, other.constants)) {
|
||||
return false;
|
||||
}
|
||||
//??
|
||||
/*if (other.pos != this.pos) {
|
||||
//!!!
|
||||
if (other.pos != this.pos) {
|
||||
return false;
|
||||
}*/
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,24 @@ public class EnumerateActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final EnumerateActionItem other = (EnumerateActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -74,6 +74,24 @@ public class EvalActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -89,4 +89,25 @@ public class ExtendsActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final ExtendsActionItem other = (ExtendsActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.subclass, other.subclass)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.superclass, other.superclass)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -122,6 +122,27 @@ public class FSCommand2ActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final FSCommand2ActionItem other = (FSCommand2ActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.arguments, other.arguments)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.command, other.command)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -91,6 +91,24 @@ public class FSCommandActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final FSCommandActionItem other = (FSCommandActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.command, other.command)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -110,6 +110,24 @@ public class GetMemberActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GetMemberActionItem other = (GetMemberActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(memberName, other.memberName)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
|
||||
return toSourceMerge(localData, generator, object, memberName, new ActionGetMember());
|
||||
|
||||
@@ -106,6 +106,27 @@ public class GetPropertyActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GetPropertyActionItem other = (GetPropertyActionItem) obj;
|
||||
if (this.propertyIndex != other.propertyIndex) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItemPos> getNeededSources() {
|
||||
List<GraphSourceItemPos> ret = super.getNeededSources();
|
||||
|
||||
@@ -124,6 +124,30 @@ public class GetURL2ActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.urlString, other.urlString)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.targetString, other.targetString)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.action.swf3.ActionGetURL;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import com.jpexs.helpers.Helper;
|
||||
@@ -93,6 +94,27 @@ public class GetURLActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GetURLActionItem other = (GetURLActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.urlString, other.urlString)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.targetString, other.targetString)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -130,6 +130,33 @@ public class GotoFrame2ActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.frame, other.frame)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -97,4 +97,25 @@ public class ImplementsOpActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final ImplementsOpActionItem other = (ImplementsOpActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.subclass, other.subclass)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.superclasses, other.superclasses)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,4 +120,22 @@ public class IncrementActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final IncrementActionItem other = (IncrementActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -103,6 +103,24 @@ public class InitArrayActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final InitArrayActionItem other = (InitArrayActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.values, other.values)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
for (GraphTargetItem v : values) {
|
||||
|
||||
@@ -132,6 +132,27 @@ public class InitObjectActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final InitObjectActionItem other = (InitObjectActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.names, other.names)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.values, other.values)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
for (GraphTargetItem n : names) {
|
||||
|
||||
@@ -114,6 +114,30 @@ public class LoadMovieActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.urlString, other.urlString)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.targetString, other.targetString)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -123,6 +123,29 @@ public class LoadMovieNumActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.urlString, other.urlString)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.num, other.num)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -114,6 +114,30 @@ public class LoadVariablesActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.urlString, other.urlString)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.targetString, other.targetString)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -123,6 +123,30 @@ public class LoadVariablesNumActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.urlString, other.urlString)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.num, other.num)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -97,6 +97,24 @@ public class MBAsciiToCharActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -97,6 +97,24 @@ public class MBCharToAsciiActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -146,4 +146,28 @@ public class MBStringExtractActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final MBStringExtractActionItem other = (MBStringExtractActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.index, other.index)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.count, other.count)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -98,6 +98,24 @@ public class MBStringLengthActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -149,6 +149,30 @@ public class NewMethodActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final NewMethodActionItem other = (NewMethodActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.methodName, other.methodName)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.scriptObject, other.scriptObject)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.arguments, other.arguments)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -115,6 +115,27 @@ public class NewObjectActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final NewObjectActionItem other = (NewObjectActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.objectName, other.objectName)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.arguments, other.arguments)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -174,6 +174,24 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PostDecrementActionItem other = (PostDecrementActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTargetItem getCompoundValue() {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
|
||||
@@ -174,6 +174,24 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PostIncrementActionItem other = (PostIncrementActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTargetItem getCompoundValue() {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
|
||||
@@ -103,6 +103,27 @@ public class PrintActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PrintActionItem other = (PrintActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.boundingBox, other.boundingBox)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -103,6 +103,27 @@ public class PrintAsBitmapActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PrintAsBitmapActionItem other = (PrintAsBitmapActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.boundingBox, other.boundingBox)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -109,6 +109,27 @@ public class PrintAsBitmapNumActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PrintAsBitmapNumActionItem other = (PrintAsBitmapNumActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.num, other.num)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.boundingBox, other.boundingBox)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -109,6 +109,27 @@ public class PrintNumActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final PrintNumActionItem other = (PrintNumActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.num, other.num)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.boundingBox, other.boundingBox)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -94,6 +94,24 @@ public class RandomNumberActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -82,6 +82,24 @@ public class RemoveSpriteActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -115,6 +115,24 @@ public class ReturnActionItem extends ActionItem implements ExitItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -184,6 +184,30 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final SetMemberActionItem other = (SetMemberActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.object, other.object)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.objectName, other.objectName)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTargetItem getCompoundValue() {
|
||||
return compoundValue;
|
||||
|
||||
@@ -167,6 +167,30 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTargetItem getCompoundValue() {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
|
||||
@@ -91,6 +91,24 @@ public class SetTarget2ActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final SetTarget2ActionItem other = (SetTarget2ActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import com.jpexs.helpers.Helper;
|
||||
@@ -81,6 +82,24 @@ public class SetTargetActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final SetTargetActionItem other = (SetTargetActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -184,6 +184,27 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final SetVariableActionItem other = (SetVariableActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.name, other.name)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTargetItem getCompoundValue() {
|
||||
return compoundValue;
|
||||
|
||||
@@ -167,6 +167,42 @@ public class StartDragActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final StartDragActionItem other = (StartDragActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.target, other.target)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.lockCenter, other.lockCenter)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.constrain, other.constrain)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.y2, other.y2)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.x2, other.x2)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.y1, other.y1)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.x1, other.x1)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -174,6 +174,27 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final StoreRegisterActionItem other = (StoreRegisterActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.register, other.register)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -137,4 +137,27 @@ public class StringExtractActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final StringExtractActionItem other = (StringExtractActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.index, other.index)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.count, other.count)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,24 @@ public class StringLengthActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -82,6 +82,24 @@ public class TargetPathActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -109,4 +109,25 @@ public class TemporaryRegister extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem 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 (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,6 +79,24 @@ public class ThrowActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -92,6 +92,24 @@ public class ToIntegerActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -91,6 +91,24 @@ public class ToNumberActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -92,6 +92,24 @@ public class ToStringActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -82,6 +82,24 @@ public class TraceActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -119,6 +119,24 @@ public class TypeOfActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
@@ -91,6 +91,24 @@ public class UnLoadMovieActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final UnLoadMovieActionItem other = (UnLoadMovieActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.targetString, other.targetString)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -100,6 +100,24 @@ public class UnLoadMovieNumActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final UnLoadMovieNumActionItem other = (UnLoadMovieNumActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.num, other.num)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true;
|
||||
|
||||
@@ -19,6 +19,7 @@ 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.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -70,6 +71,24 @@ public class UnsupportedActionItem extends ActionItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final UnsupportedActionItem other = (UnsupportedActionItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSideEffect() {
|
||||
return true; //??
|
||||
|
||||
@@ -122,7 +122,7 @@ public class ActionSetVariable extends Action implements StoreTypeAction {
|
||||
CompoundableBinaryOp binaryOp = (CompoundableBinaryOp) value.getNotCoercedNoDup();
|
||||
if (binaryOp.getLeftSide() instanceof GetVariableActionItem) {
|
||||
GetVariableActionItem getVar = (GetVariableActionItem) binaryOp.getLeftSide();
|
||||
if (Objects.equals(name, getVar.name)) {
|
||||
if (GraphTargetItem.objectsValueEquals(name, getVar.name)) {
|
||||
setVar.setCompoundValue(binaryOp.getRightSide());
|
||||
setVar.setCompoundOperator(binaryOp.getOperator());
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ActionSetMember extends Action {
|
||||
CompoundableBinaryOp binaryOp = (CompoundableBinaryOp) value.getNotCoercedNoDup();
|
||||
if (binaryOp.getLeftSide() instanceof GetMemberActionItem) {
|
||||
GetMemberActionItem getMember = (GetMemberActionItem) binaryOp.getLeftSide();
|
||||
if (Objects.equals(object, getMember.object.getThroughDuplicate()) && Objects.equals(memberName, getMember.memberName)) {
|
||||
if (GraphTargetItem.objectsValueEquals(object, getMember.object.getThroughDuplicate()) && GraphTargetItem.objectsValueEquals(memberName, getMember.memberName)) {
|
||||
setMem.setCompoundValue(binaryOp.getRightSide());
|
||||
setMem.setCompoundOperator(binaryOp.getOperator());
|
||||
}
|
||||
|
||||
@@ -645,4 +645,32 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
|
||||
public boolean isIdentical(GraphTargetItem other) {
|
||||
return this == other;
|
||||
}
|
||||
|
||||
public static boolean objectsValueEquals(Object o1, Object o2) {
|
||||
if (o1 == null && o2 == null) {
|
||||
return true;
|
||||
}
|
||||
if (o1 == null || o2 == null) {
|
||||
return false;
|
||||
}
|
||||
if ((o1 instanceof GraphTargetItem) && (o2 instanceof GraphTargetItem)) {
|
||||
GraphTargetItem gt1 = (GraphTargetItem) o1;
|
||||
GraphTargetItem gt2 = (GraphTargetItem) o2;
|
||||
return gt1.valueEquals(gt2);
|
||||
}
|
||||
if ((o1 instanceof List) && (o2 instanceof List)) {
|
||||
List l1 = (List) o1;
|
||||
List l2 = (List) o2;
|
||||
|
||||
if (l1.size() != l2.size()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < l1.size(); i++) {
|
||||
if (!objectsValueEquals(l1.get(i), l2.get(i))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return o1.equals(o2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +168,24 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp {
|
||||
return (Objects.equals(operator, other.operator));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final BinaryOpItem other = (BinaryOpItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(leftSide, other.leftSide)) {
|
||||
return false;
|
||||
}
|
||||
if (!GraphTargetItem.objectsValueEquals(rightSide, other.rightSide)) {
|
||||
return false;
|
||||
}
|
||||
return GraphTargetItem.objectsValueEquals(operator, other.operator);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public boolean toBoolean() {
|
||||
double val=toNumber();
|
||||
|
||||
@@ -123,6 +123,24 @@ public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valueEquals(GraphTargetItem obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final GraphTargetItem other = (GraphTargetItem) obj;
|
||||
if (!GraphTargetItem.objectsValueEquals(this.value, other.value)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 3;
|
||||
|
||||
Reference in New Issue
Block a user