AS3 using temp registers on compound assignments when hasSideeffect

This commit is contained in:
Jindra Petřík
2021-03-08 12:17:46 +01:00
parent e0948e2a38
commit 8fa321cfd3
66 changed files with 707 additions and 197 deletions

View File

@@ -585,7 +585,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
public abstract GraphTargetItem returnType();
@Override
protected GraphTargetItem clone() {
public GraphTargetItem clone() {
try {
return (GraphTargetItem) super.clone();
} catch (CloneNotSupportedException ex) {

View File

@@ -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;
@@ -22,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemPos;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.SourceGenerator;
import com.jpexs.decompiler.graph.TypeItem;
import java.util.ArrayList;
import java.util.List;
/**
@@ -58,4 +60,9 @@ public class AndItem extends BinaryOpItem {
public GraphTargetItem returnType() {
return TypeItem.BOOLEAN;
}
@Override
public List<GraphSourceItem> getOperatorInstruction() {
return new ArrayList<>(); //???
}
}

View File

@@ -16,6 +16,7 @@
*/
package com.jpexs.decompiler.graph.model;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
import java.util.List;
@@ -38,4 +39,6 @@ public interface BinaryOp {
public List<GraphTargetItem> getAllSubItems();
public String getOperator();
public List<GraphSourceItem> getOperatorInstruction();
}

View File

@@ -23,6 +23,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemPos;
import com.jpexs.decompiler.graph.GraphTargetItem;
import com.jpexs.decompiler.graph.SourceGenerator;
import com.jpexs.decompiler.graph.TypeItem;
import java.util.ArrayList;
import java.util.List;
/**
@@ -59,4 +60,9 @@ public class OrItem extends BinaryOpItem {
public GraphTargetItem returnType() {
return TypeItem.BOOLEAN;
}
@Override
public List<GraphSourceItem> getOperatorInstruction() {
return new ArrayList<>(); //???
}
}