mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 00:30:45 +00:00
AS3 using temp registers on compound assignments when hasSideeffect
This commit is contained in:
+8
@@ -30,6 +30,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -91,4 +92,11 @@ public class AddActionItem extends BinaryOpItem implements CompoundableBinaryOp
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionAdd2());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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,6 +25,7 @@ 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.UnboundedTypeItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,4 +56,11 @@ public class AndActionItem extends BinaryOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return new UnboundedTypeItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionAnd());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -26,6 +26,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -56,4 +57,11 @@ public class BitAndActionItem extends BinaryOpItem implements CompoundableBinary
|
||||
public GraphTargetItem returnType() {
|
||||
return new UnboundedTypeItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionBitAnd());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -26,6 +26,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -56,4 +57,11 @@ public class BitOrActionItem extends BinaryOpItem implements CompoundableBinaryO
|
||||
public GraphTargetItem returnType() {
|
||||
return new UnboundedTypeItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionBitOr());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -29,6 +29,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -76,4 +77,11 @@ public class BitXorActionItem extends BinaryOpItem implements CompoundableBinary
|
||||
public GraphTargetItem returnType() {
|
||||
return new UnboundedTypeItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionBitXor());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -25,6 +25,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -60,4 +61,11 @@ public class DivideActionItem extends BinaryOpItem implements CompoundableBinary
|
||||
public GraphTargetItem returnType() {
|
||||
return new UnboundedTypeItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionDivide());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.BinaryOpItem;
|
||||
import com.jpexs.decompiler.graph.model.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -70,4 +72,11 @@ public class EqActionItem extends BinaryOpItem implements LogicalOpItem, EqualsT
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionEquals2());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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;
|
||||
@@ -30,6 +31,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -76,4 +78,11 @@ public class GeActionItem extends BinaryOpItem implements LogicalOpItem, Inverte
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionLess2()); //FIXME!!!
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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;
|
||||
@@ -29,6 +30,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -74,4 +76,11 @@ public class GtActionItem extends BinaryOpItem implements LogicalOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionGreater()); //FIXME!!!
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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.action.model.ActionItem;
|
||||
@@ -20,6 +21,8 @@ import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.BinaryOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -41,4 +44,10 @@ public class InActionItem extends BinaryOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.TypeItem;
|
||||
import com.jpexs.decompiler.graph.model.BinaryOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -50,4 +52,11 @@ public class InstanceOfActionItem extends BinaryOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionInstanceOf());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -26,6 +26,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -56,4 +57,11 @@ public class LShiftActionItem extends BinaryOpItem implements CompoundableBinary
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionBitLShift());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-1
@@ -12,11 +12,13 @@
|
||||
* 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;
|
||||
import com.jpexs.decompiler.flash.action.parser.script.ActionSourceGenerator;
|
||||
import com.jpexs.decompiler.flash.action.special.ActionNop;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionLess;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionNot;
|
||||
import com.jpexs.decompiler.flash.action.swf5.ActionLess2;
|
||||
@@ -30,6 +32,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -71,4 +74,13 @@ public class LeActionItem extends BinaryOpItem implements LogicalOpItem, Inverte
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
//FIXME!!!
|
||||
ret.add(new ActionGreater());
|
||||
ret.add(new ActionNot());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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;
|
||||
@@ -29,6 +30,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -79,4 +81,11 @@ public class LtActionItem extends BinaryOpItem implements LogicalOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionLess2()); //FIXME!!!
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -25,6 +25,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,4 +59,11 @@ public class ModuloActionItem extends BinaryOpItem implements CompoundableBinary
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionModulo());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -25,6 +25,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -55,4 +56,11 @@ public class MultiplyActionItem extends BinaryOpItem implements CompoundableBina
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionMultiply());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-1
@@ -12,11 +12,13 @@
|
||||
* 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;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.special.ActionNop;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionNot;
|
||||
import com.jpexs.decompiler.flash.action.swf5.ActionEquals2;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
@@ -27,6 +29,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -66,4 +69,12 @@ public class NeqActionItem extends BinaryOpItem implements LogicalOpItem, Invert
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionEquals2());
|
||||
ret.add(new ActionNot());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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,6 +25,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,4 +56,11 @@ public class OrActionItem extends BinaryOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionOr());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -26,6 +26,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,4 +58,11 @@ public class RShiftActionItem extends BinaryOpItem implements CompoundableBinary
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionBitRShift());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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;
|
||||
@@ -26,6 +27,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -63,4 +65,11 @@ public class StrictEqActionItem extends BinaryOpItem implements LogicalOpItem, I
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStrictEquals());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-1
@@ -12,11 +12,13 @@
|
||||
* 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;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionNot;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals;
|
||||
import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
@@ -26,6 +28,7 @@ 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.LogicalOpItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -59,4 +62,12 @@ public class StrictNeqActionItem extends BinaryOpItem implements LogicalOpItem,
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStrictEquals());
|
||||
ret.add(new ActionNot());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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,6 +25,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -60,4 +62,11 @@ public class StringAddActionItem extends BinaryOpItem {
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringAdd());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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,6 +25,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -65,4 +67,11 @@ public class StringEqActionItem extends BinaryOpItem implements Inverted {
|
||||
public GraphTargetItem invert(GraphSourceItem negSrc) {
|
||||
return new StringNeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringEquals());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-1
@@ -12,10 +12,12 @@
|
||||
* 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;
|
||||
import com.jpexs.decompiler.flash.action.special.ActionNop;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionNot;
|
||||
import com.jpexs.decompiler.flash.action.swf4.ActionStringLess;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
@@ -25,6 +27,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -62,4 +65,12 @@ public class StringGeActionItem extends BinaryOpItem implements Inverted {
|
||||
public GraphTargetItem invert(GraphSourceItem negSrc) {
|
||||
return new StringLtActionItem(getSrc(), getLineStartItem(), leftSide, rightSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringLess());
|
||||
ret.add(new ActionNot());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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;
|
||||
@@ -26,6 +27,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -71,4 +73,11 @@ public class StringGtActionItem extends BinaryOpItem implements Inverted {
|
||||
public GraphTargetItem invert(GraphSourceItem negSrc) {
|
||||
return new StringLeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringGreater()); //FIXME!!!
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-2
@@ -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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -58,7 +60,7 @@ public class StringLeActionItem extends BinaryOpItem implements Inverted {
|
||||
return toSourceMerge(localData, generator, leftSide, rightSide, new ActionStringGreater(), new ActionNot());
|
||||
}
|
||||
|
||||
return toSourceMerge(localData, generator, rightSide, leftSide, new ActionStringLess(), new ActionNot());
|
||||
return toSourceMerge(localData, generator, rightSide, leftSide, new ActionStringLess(), new ActionNot()); //TODO: is this correct?
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,4 +72,12 @@ public class StringLeActionItem extends BinaryOpItem implements Inverted {
|
||||
public GraphTargetItem invert(GraphSourceItem negSrc) {
|
||||
return new StringGtActionItem(getSrc(), getLineStartItem(), leftSide, rightSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringGreater());
|
||||
ret.add(new ActionNot()); //FIXME!!!
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -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,6 +25,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -65,4 +67,11 @@ public class StringLtActionItem extends BinaryOpItem implements Inverted {
|
||||
public GraphTargetItem invert(GraphSourceItem negSrc) {
|
||||
return new StringGeActionItem(getSrc(), getLineStartItem(), leftSide, rightSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringLess());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-1
@@ -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,6 +25,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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -56,4 +58,12 @@ public class StringNeActionItem extends BinaryOpItem implements Inverted {
|
||||
public GraphTargetItem invert(GraphSourceItem negSrc) {
|
||||
return new StringEqActionItem(getSrc(), getLineStartItem(), leftSide, rightSide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionStringEquals());
|
||||
ret.add(new ActionNot());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -28,6 +28,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -89,4 +90,11 @@ public class SubtractActionItem extends BinaryOpItem implements CompoundableBina
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionSubtract());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.action.model.operations;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
import com.jpexs.decompiler.flash.action.swf5.ActionBitRShift;
|
||||
import com.jpexs.decompiler.flash.action.swf5.ActionBitURShift;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
@@ -25,6 +26,7 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,4 +59,11 @@ public class URShiftActionItem extends BinaryOpItem implements CompoundableBinar
|
||||
public GraphTargetItem returnType() {
|
||||
return TypeItem.UNBOUNDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraphSourceItem> getOperatorInstruction() {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
ret.add(new ActionBitURShift());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user