as3 execution fixes

This commit is contained in:
zavarkog
2015-11-18 10:33:13 +01:00
parent c41f9afd0f
commit e9072207c1
63 changed files with 661 additions and 495 deletions
@@ -656,16 +656,16 @@ public class AVM2Code implements Cloneable {
}
public Object execute(HashMap<Integer, Object> arguments, AVM2ConstantPool constants) throws AVM2ExecutionException {
return execute(arguments, constants, AVM2Runtime.UNKNOWN, 0);
return execute(arguments, constants, null);
}
public Object execute(HashMap<Integer, Object> arguments, AVM2ConstantPool constants, AVM2Runtime runtime, int runtimeVersoin) throws AVM2ExecutionException {
public Object execute(HashMap<Integer, Object> arguments, AVM2ConstantPool constants, AVM2RuntimeInfo runtimeInfo) throws AVM2ExecutionException {
int pos = 0;
LocalDataArea lda = new LocalDataArea();
lda.methodName = "methodName"; // todo: needed for VerifyError exception message
lda.localRegisters = arguments;
lda.runtime = runtime;
lda.runtimeVersion = runtimeVersoin;
lda.runtimeInfo = runtimeInfo;
for (AVM2Instruction ins : code) {
ins.definition.verify(lda, constants, ins);
}
@@ -680,7 +680,7 @@ public class AVM2Code implements Cloneable {
try {
pos = adr2pos(lda.jump);
} catch (ConvertException ex) {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.BRANCH_TARGET_INVALID_INSTRUCTION);
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.BRANCH_TARGET_INVALID_INSTRUCTION, lda.isDebug());
}
lda.jump = null;
} else {
@@ -0,0 +1,35 @@
/*
* Copyright (C) 2010-2015 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.abc.avm2;
/**
*
* @author JPEXS
*/
public class AVM2RuntimeInfo {
public AVM2Runtime runtime;
public int version;
public boolean debug;
public AVM2RuntimeInfo(AVM2Runtime runtime, int version, boolean debug) {
this.runtime = runtime;
this.version = version;
this.debug = debug;
}
}
@@ -35,9 +35,7 @@ public class LocalDataArea {
public String executionException;
public AVM2Runtime runtime;
public int runtimeVersion;
public AVM2RuntimeInfo runtimeInfo;
private byte[] domainMemory;
@@ -46,12 +44,20 @@ public class LocalDataArea {
public byte[] getDomainMemory() {
if (domainMemory == null) {
domainMemory = new byte[1024 * 1024];
domainMemory = new byte[1024]; // in flash player this is the default size
}
return domainMemory;
}
public AVM2Runtime getRuntime() {
return runtimeInfo == null ? AVM2Runtime.UNKNOWN : runtimeInfo.runtime;
}
public boolean isDebug() {
return runtimeInfo != null && runtimeInfo.debug;
}
public void clear() {
operandStack.clear();
scopeStack.clear();
@@ -21,23 +21,23 @@ package com.jpexs.decompiler.flash.abc.avm2.exceptions;
*/
public class AVM2RangeErrorException extends AVM2ExecutionException {
public AVM2RangeErrorException(int code) {
super(codeToMessage(code, null));
public AVM2RangeErrorException(int code, boolean debug) {
super(codeToMessage(code, debug, null));
}
public AVM2RangeErrorException(int code, Object[] params) {
super(codeToMessage(code, params));
public AVM2RangeErrorException(int code, boolean debug, Object[] params) {
super(codeToMessage(code, debug, params));
}
private static String codeToMessage(int code, Object[] params) {
private static String codeToMessage(int code, boolean debug, Object[] params) {
String msg = null;
switch (code) {
}
String result = "RangeError: Error #" + code;
/*if (msg != null) {
result += ": " + msg;
}*/
if (debug && msg != null) {
result += ": " + msg;
}
return result;
}
@@ -21,23 +21,23 @@ package com.jpexs.decompiler.flash.abc.avm2.exceptions;
*/
public class AVM2TypeErrorException extends AVM2ExecutionException {
public AVM2TypeErrorException(int code) {
super(codeToMessage(code, null));
public AVM2TypeErrorException(int code, boolean debug) {
super(codeToMessage(code, debug, null));
}
public AVM2TypeErrorException(int code, Object[] params) {
super(codeToMessage(code, params));
public AVM2TypeErrorException(int code, boolean debug, Object[] params) {
super(codeToMessage(code, debug, params));
}
private static String codeToMessage(int code, Object[] params) {
private static String codeToMessage(int code, boolean debug, Object[] params) {
String msg = null;
switch (code) {
}
String result = "TypeError: Error #" + code;
/*if (msg != null) {
result += ": " + msg;
}*/
if (debug && msg != null) {
result += ": " + msg;
}
return result;
}
@@ -27,15 +27,15 @@ public class AVM2VerifyErrorException extends AVM2ExecutionException {
public static final int CPOOL_INDEX_OUT_OF_RANGE = 1032;
public AVM2VerifyErrorException(int code) {
super(codeToMessage(code, null));
public AVM2VerifyErrorException(int code, boolean debug) {
super(codeToMessage(code, debug, null));
}
public AVM2VerifyErrorException(int code, Object[] params) {
super(codeToMessage(code, params));
public AVM2VerifyErrorException(int code, boolean debug, Object[] params) {
super(codeToMessage(code, debug, params));
}
private static String codeToMessage(int code, Object[] params) {
private static String codeToMessage(int code, boolean debug, Object[] params) {
String msg = null;
switch (code) {
case ILLEGAL_OPCODE:
@@ -56,9 +56,9 @@ public class AVM2VerifyErrorException extends AVM2ExecutionException {
}
String result = "VerifyError: Error #" + code;
/*if (msg != null) {
result += ": " + msg;
}*/
if (debug && msg != null) {
result += ": " + msg;
}
return result;
}
@@ -98,27 +98,27 @@ public abstract class InstructionDefinition implements Serializable {
if (operand == AVM2Code.DAT_MULTINAME_INDEX) {
int idx = ins.operands[i];
if (idx <= 0 || idx >= constants.getMultinameCount()) {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, new Object[]{idx, constants.getMultinameCount()});
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getMultinameCount()});
}
} else if (operand == AVM2Code.DAT_DOUBLE_INDEX) {
int idx = ins.operands[i];
if (idx <= 0 || idx >= constants.getDoubleCount()) {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, new Object[]{idx, constants.getDoubleCount()});
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getDoubleCount()});
}
} else if (operand == AVM2Code.DAT_INT_INDEX) {
int idx = ins.operands[i];
if (idx <= 0 || idx >= constants.getIntCount()) {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, new Object[]{idx, constants.getIntCount()});
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getIntCount()});
}
} else if (operand == AVM2Code.DAT_UINT_INDEX) {
int idx = ins.operands[i];
if (idx <= 0 || idx >= constants.getUIntCount()) {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, new Object[]{idx, constants.getUIntCount()});
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getUIntCount()});
}
} else if (operand == AVM2Code.DAT_STRING_INDEX) {
int idx = ins.operands[i];
if (idx <= 0 || idx >= constants.getStringCount()) {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, new Object[]{idx, constants.getStringCount()});
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.CPOOL_INDEX_OUT_OF_RANGE, lda.isDebug(), new Object[]{idx, constants.getStringCount()});
}
}
}
@@ -130,7 +130,7 @@ public abstract class InstructionDefinition implements Serializable {
}
protected void illegalOpCode(LocalDataArea lda, AVM2Instruction ins) throws AVM2VerifyErrorException {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.ILLEGAL_OPCODE, new Object[]{lda.methodName, instructionCode, ins.getOffset()});
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.ILLEGAL_OPCODE, lda.isDebug(), new Object[]{lda.methodName, instructionCode, ins.getOffset()});
}
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) throws InterruptedException {
@@ -17,8 +17,9 @@
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
/**
*
@@ -31,8 +32,12 @@ public class UnknownInstruction extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
illegalOpCode(lda, ins);
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
return false;
}
}
@@ -41,10 +41,10 @@ public class Lf32Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
// todo: get 32 bits float
@@ -41,10 +41,10 @@ public class Lf64Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
// todo: get 64 bits float
@@ -41,10 +41,10 @@ public class Li16Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
// todo: get 16 bits
@@ -41,10 +41,10 @@ public class Li32Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
// todo: get 32 bits
@@ -41,10 +41,10 @@ public class Li8Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
lda.operandStack.push((Double) (double) (domainMemory[addr]));
@@ -41,10 +41,10 @@ public class Sf32Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
Double value = (double) EcmaScript.toNumber(lda.operandStack.pop());
@@ -41,10 +41,10 @@ public class Sf64Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
Double value = (double) EcmaScript.toNumber(lda.operandStack.pop());
@@ -41,10 +41,10 @@ public class Si16Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
int value = EcmaScript.toInt32(lda.operandStack.pop());
@@ -41,10 +41,10 @@ public class Si32Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
int value = EcmaScript.toInt32(lda.operandStack.pop());
@@ -41,10 +41,10 @@ public class Si8Ins extends InstructionDefinition implements AlchemyTypeIns {
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2RangeErrorException {
int addr = (int) (double) EcmaScript.toNumber(lda.operandStack.pop());
int addr = EcmaScript.toInt32(lda.operandStack.pop());
byte[] domainMemory = lda.getDomainMemory();
if (addr < 0 || addr >= domainMemory.length) {
throw new AVM2RangeErrorException(1506);
throw new AVM2RangeErrorException(1506, lda.isDebug());
}
int value = EcmaScript.toInt32(lda.operandStack.pop());
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class AbsJumpIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class AddDIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,11 +31,11 @@ public class AddPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class AllocIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,11 +31,11 @@ public class CallInterfaceIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -17,9 +17,9 @@
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -30,11 +30,11 @@ public class CallSuperIdIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class CodeGenOpIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class ConcatIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class ConvertF4Ins extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class ConvertMIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class ConvertMPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,11 +31,11 @@ public class DecLocalPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class DecodeIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,11 +31,11 @@ public class DecrementPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class DelDescendantsIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class DeletePropertyLateIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class DividePIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class DoubleToAtomIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class FindPropGlobalIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,11 +31,11 @@ public class IncLocalPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,11 +31,11 @@ public class IncrementPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -17,9 +17,9 @@
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -30,11 +30,11 @@ public class InvalidIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -17,9 +17,9 @@
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -30,11 +30,11 @@ public class Lf32x4Ins extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class MarkIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class ModuloPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class MultiplyPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class NegatePIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class PrologueIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class PushConstantIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class PushDNanIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class PushDecimalIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -17,9 +17,9 @@
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -30,11 +30,11 @@ public class PushFloat4Ins extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class SendEnterIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class SetPropertyLateIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -17,9 +17,9 @@
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -30,11 +30,11 @@ public class Sf32x4Ins extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
}
@@ -19,9 +19,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -32,12 +32,12 @@ public class SubtractPIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class SweepIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class VerifyOpIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class VerifyPassIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -18,9 +18,9 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Runtime;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
@@ -31,12 +31,12 @@ public class WbIns extends InstructionDefinition {
}
@Override
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
if (lda.runtime == AVM2Runtime.ADOBE_FLASH) {
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) {
illegalOpCode(lda, ins);
}
return super.execute(lda, constants, ins);
super.verify(lda, constants, ins);
}
@Override
@@ -20,9 +20,9 @@ import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2ExecutionException;
import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2TypeErrorException;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
import com.jpexs.decompiler.flash.abc.avm2.model.CoerceAVM2Item;
@@ -46,7 +46,7 @@ public class CoerceIns extends InstructionDefinition implements CoerceOrConvertT
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
Multiname multiname = (Multiname) ins.getParam(constants, 0);
if (multiname == null) {
throw new AVM2TypeErrorException(1034);
throw new AVM2TypeErrorException(1034, lda.isDebug());
}
Object value = lda.operandStack.pop();
@@ -54,13 +54,22 @@ public class CoerceIns extends InstructionDefinition implements CoerceOrConvertT
value = Null.INSTANCE;
}
//push and pop coerced value to specified type
EcmaType type = EcmaScript.type(value);
if (type != EcmaType.NULL && type != EcmaType.OBJECT) {
throw new AVM2TypeErrorException(1034);
switch (type) {
case NUMBER:
case BOOLEAN:
lda.operandStack.push(EcmaScript.toString(value));
break;
case NULL:
case OBJECT:
case STRING:
lda.operandStack.push(value);
break;
default:
throw new AVM2TypeErrorException(1034, lda.isDebug());
}
//push and pop coerced value to specified type
lda.operandStack.push(value);
return true;
}
@@ -42,11 +42,11 @@ public class ConvertOIns extends InstructionDefinition implements CoerceOrConver
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2TypeErrorException {
Object obj = lda.operandStack.peek();
if (EcmaScript.type(obj) == EcmaType.NULL) {
throw new AVM2TypeErrorException(1009);
throw new AVM2TypeErrorException(1009, lda.isDebug());
}
if (EcmaScript.type(obj) == EcmaType.UNDEFINED) {
throw new AVM2TypeErrorException(1010);
throw new AVM2TypeErrorException(1010, lda.isDebug());
}
//throw if pop is not object
@@ -69,6 +69,10 @@ public class EcmaScript {
return Double.NaN;
}
if (o instanceof String && ((String) o).isEmpty()) {
return Double.NaN;
}
return toNumber(o);
}
@@ -213,14 +217,22 @@ public class EcmaScript {
}
public static boolean strictEquals(Object x, Object y) {
return strictEquals(false, x, y);
}
public static boolean equals(Object x, Object y) {
return equals(false, x, y);
}
public static boolean strictEquals(boolean as2, Object x, Object y) {
if (type(x) != type(y)) {
return false;
}
return equals(x, y);
return equals(as2, x, y);
}
public static boolean equals(Object x, Object y) {
public static boolean equals(boolean as2, Object x, Object y) {
EcmaType typeX = type(x);
EcmaType typeY = type(y);
if (typeX == typeY) {
@@ -279,16 +291,16 @@ public class EcmaScript {
}
if ((typeX == EcmaType.NUMBER) && (typeY == EcmaType.STRING)) {
return equals(x, toNumber(y));
return equals(as2, x, as2 ? toNumberAs2(y) : toNumber(y));
}
if ((typeX == EcmaType.STRING) && (typeY == EcmaType.NUMBER)) {
return equals(toNumber(x), y);
return equals(as2, as2 ? toNumberAs2(x) : toNumber(x), y);
}
if (typeX == EcmaType.BOOLEAN) {
return equals(toNumber(x), y);
return equals(as2, as2 ? toNumberAs2(x) : toNumber(x), y);
}
if (typeY == EcmaType.BOOLEAN) {
return equals(x, toNumber(y));
return equals(as2, x, as2 ? toNumberAs2(y) : toNumber(y));
}
if (typeX == EcmaType.STRING || typeX == EcmaType.NUMBER) {
//y is object