More documentation.

This commit is contained in:
Jindra Petřík
2024-08-08 19:27:14 +02:00
parent 38bcab878b
commit 5c1811582a
677 changed files with 7393 additions and 343 deletions
@@ -36,8 +36,8 @@ public abstract class ParseException extends Exception {
/**
* Constructs a new parse exception.
*
* @param text
* @param line
* @param text Text of the exception
* @param line Line number where the exception occurred
*/
public ParseException(String text, long line) {
super("ParseException:" + text + " on line " + line);
@@ -131,7 +131,7 @@ public class ABC implements Openable {
*/
private ABCMethodIndexing abcMethodIndexing;
/*
/**
* ABC minor version with decimal support
*/
public static final int MINORwithDECIMAL = 17;
@@ -151,7 +151,7 @@ public class ABC implements Openable {
*/
private AVM2Deobfuscation deobfuscation;
/*
/**
* Parent tag
*/
@Internal
@@ -195,7 +195,7 @@ public class ABC implements Openable {
/**
* Constructs ABC.
*
* @param tag
* @param tag ABC container tag
*/
public ABC(ABCContainerTag tag) {
this.parentTag = tag;
@@ -205,7 +205,7 @@ public class ABC implements Openable {
/**
* Adds change listener.
*
* @param listener
* @param listener Listener
*/
public void addChangeListener(Runnable listener) {
changeListeners.add(listener);
@@ -214,7 +214,7 @@ public class ABC implements Openable {
/**
* Removes change listener.
*
* @param listener
* @param listener Listener
*/
public void removeChangeListener(Runnable listener) {
changeListeners.remove(listener);
@@ -232,7 +232,7 @@ public class ABC implements Openable {
/**
* Gets openable.
*
* @return
* @return Openable
*/
@Override
public Openable getOpenable() {
@@ -245,7 +245,7 @@ public class ABC implements Openable {
/**
* Gets SWF.
*
* @return
* @return SWF
*/
public SWF getSwf() {
return parentTag.getSwf();
@@ -254,7 +254,7 @@ public class ABC implements Openable {
/**
* Gets list of ABC containers.
*
* @return
* @return List of ABC containers
*/
public List<ABCContainerTag> getAbcTags() {
Openable openable = getOpenable();
@@ -267,8 +267,8 @@ public class ABC implements Openable {
/**
* Adds method body.
*
* @param body
* @return
* @param body Method body
* @return Method body index
*/
public int addMethodBody(MethodBody body) {
bodies.add(body);
@@ -279,8 +279,8 @@ public class ABC implements Openable {
/**
* Adds method info.
*
* @param mi
* @return
* @param mi Method info
* @return Method info index
*/
public int addMethodInfo(MethodInfo mi) {
method_info.add(mi);
@@ -315,7 +315,7 @@ public class ABC implements Openable {
/**
* Gets id of metadata/add metadata.
*
* @param newMetadata
* @param newMetadata Metadata
* @param add Add if not found?
* @return New index or -1 if not found (add=false)
*/
@@ -341,7 +341,7 @@ public class ABC implements Openable {
* @param classId Class index
* @param name Method name
* @param isStatic Whether method is static
* @return
* @return Method/Getter/Setter trait
*/
public TraitMethodGetterSetter addMethod(int classId, String name, boolean isStatic) {
Multiname multiname = new Multiname();
@@ -379,7 +379,7 @@ public class ABC implements Openable {
/**
* Adds event listener.
*
* @param listener
* @param listener Listener
*/
public void addEventListener(EventListener listener) {
listeners.add(listener);
@@ -388,7 +388,7 @@ public class ABC implements Openable {
/**
* Removes event listener.
*
* @param listener
* @param listener Listener
*/
public void removeEventListener(EventListener listener) {
listeners.remove(listener);
@@ -397,8 +397,8 @@ public class ABC implements Openable {
/**
* Informs listeners.
*
* @param event
* @param data
* @param event Event
* @param data Data
*/
protected void informListeners(String event, Object data) {
for (EventListener listener : listeners) {
@@ -409,8 +409,8 @@ public class ABC implements Openable {
/**
* Removes traps (deobfuscation).
*
* @return
* @throws InterruptedException
* @return Number of removed traps
* @throws InterruptedException On interrupt
*/
public int removeTraps() throws InterruptedException {
return removeTraps(null);
@@ -420,8 +420,8 @@ public class ABC implements Openable {
* Removes traps (deobfuscation).
*
* @param listener Listener
* @return
* @throws InterruptedException
* @return Number of removed traps
* @throws InterruptedException On interrupt
*/
public int removeTraps(DeobfuscationListener listener) throws InterruptedException {
int rem = 0;
@@ -437,8 +437,8 @@ public class ABC implements Openable {
/**
* Removes dead code.
*
* @return
* @throws InterruptedException
* @return Number of modified lines
* @throws InterruptedException On interrupt
*/
public int removeDeadCode() throws InterruptedException {
return removeDeadCode(null);
@@ -448,8 +448,8 @@ public class ABC implements Openable {
* Removes dead code.
*
* @param listener Listener
* @return
* @throws InterruptedException
* @return Number of modified lines
* @throws InterruptedException On interrupt
*/
public int removeDeadCode(DeobfuscationListener listener) throws InterruptedException {
int rem = 0;
@@ -497,7 +497,7 @@ public class ABC implements Openable {
/**
* Gets string usages.
*
* @return
* @return Set of string indexes
*/
public Set<Integer> getStringUsages() {
Set<Integer> ret = new HashSet<>();
@@ -621,8 +621,8 @@ public class ABC implements Openable {
/**
* Renames multiname.
*
* @param multinameIndex
* @param newname
* @param multinameIndex Multiname index
* @param newname New name
*/
public void renameMultiname(int multinameIndex, String newname) {
if (multinameIndex <= 0 || multinameIndex >= constants.getMultinameCount()) {
@@ -742,7 +742,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has decimal support.
*
* @return
* @return Whether the ABC has decimal support
*/
public boolean hasDecimalSupport() {
return version.minor >= MINORwithDECIMAL;
@@ -751,7 +751,7 @@ public class ABC implements Openable {
/**
* Sets decimal support.
*
* @param val
* @param val Value
*/
public void setDecimalSupport(boolean val) {
if (val) {
@@ -768,8 +768,8 @@ public class ABC implements Openable {
/**
* Checks minimum version.
*
* @param minMajor
* @param minMinor
* @param minMajor Minimum major version
* @param minMinor Minimum minor version
* @return
*/
private boolean minVersionCheck(int minMajor, int minMinor) {
@@ -779,7 +779,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has float support.
*
* @return
* @return Whether the ABC has float support
*/
public boolean hasFloatSupport() {
return minVersionCheck(47, 16);
@@ -788,7 +788,7 @@ public class ABC implements Openable {
/**
* Sets float support.
*
* @param val
* @param val Value
*/
public void setFloatSupport(boolean val) {
if (val) {
@@ -805,7 +805,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has exception support.
*
* @return
* @return Whether the ABC has exception support
*/
public boolean hasExceptionSupport() {
return version.compareTo(new ABCVersion(46, 15)) > 0;
@@ -817,7 +817,7 @@ public class ABC implements Openable {
* @param ais ABC input stream
* @param swf SWF
* @param tag ABC container tag
* @throws IOException
* @throws IOException On I/O error
*/
public ABC(ABCInputStream ais, SWF swf, ABCContainerTag tag) throws IOException {
this(ais, swf, tag, null, null);
@@ -831,7 +831,7 @@ public class ABC implements Openable {
* @param tag ABC container tag
* @param file File
* @param fileTitle File title
* @throws IOException
* @throws IOException On I/O error
*/
public ABC(ABCInputStream ais, SWF swf, ABCContainerTag tag, String file, String fileTitle) throws IOException {
this.parentTag = tag;
@@ -861,7 +861,7 @@ public class ABC implements Openable {
*
* @param ais ABC input stream
* @param swf SWF
* @throws IOException
* @throws IOException On I/O error
*/
private void read(ABCInputStream ais, SWF swf) throws IOException {
int minor_version = ais.readU16("minor_version");
@@ -1093,7 +1093,7 @@ public class ABC implements Openable {
* Saves ABC to stream.
*
* @param os Output stream
* @throws IOException
* @throws IOException On I/O error
*/
public void saveToStream(OutputStream os) throws IOException {
ABCOutputStream aos = new ABCOutputStream(os);
@@ -1513,7 +1513,7 @@ public class ABC implements Openable {
/**
* Dump ABC to output stream.
*
* @param os
* @param os Output stream
*/
public void dump(OutputStream os) {
Utf8PrintWriter output;
@@ -2152,9 +2152,9 @@ public class ABC implements Openable {
* @param as ActionScript
* @param dependencies Dependencies
* @return True if the pack is simple (= not compound)
* @throws As3ScriptReplaceException
* @throws IOException
* @throws InterruptedException
* @throws As3ScriptReplaceException On script replace error
* @throws IOException On IO error
* @throws InterruptedException On interrupt
*/
public boolean replaceScriptPack(As3ScriptReplacerInterface replacer, ScriptPack pack, String as, List<SWF> dependencies) throws As3ScriptReplaceException, IOException, InterruptedException {
replacer.replaceScript(pack, as, dependencies);
@@ -2867,7 +2867,7 @@ public class ABC implements Openable {
/**
* Gets modified flag.
*
* @return
* @return Whether the ABC is modified
*/
@Override
public boolean isModified() {
@@ -2898,7 +2898,7 @@ public class ABC implements Openable {
/**
* To string.
*
* @return
* @return String
*/
@Override
public String toString() {
@@ -2909,7 +2909,7 @@ public class ABC implements Openable {
* Saves ABC to stream.
*
* @param os Output stream
* @throws IOException
* @throws IOException On IO error
*/
@Override
public void saveTo(OutputStream os) throws IOException {
@@ -119,7 +119,7 @@ public class ABCInputStream implements AutoCloseable {
* Sets position in bytes in the stream.
*
* @param pos Number of bytes
* @throws java.io.IOException
* @throws IOException On I/O error
*/
public void seek(long pos) throws IOException {
is.seek(pos);
@@ -195,7 +195,7 @@ public class ABCInputStream implements AutoCloseable {
* Reads byte from the stream.
*
* @return Byte
* @throws IOException
* @throws IOException On I/O error
*/
private int readInternal() throws IOException {
int i = is.read();
@@ -218,7 +218,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Byte
* @throws IOException
* @throws IOException On I/O error
*/
public int read(String name) throws IOException {
newDumpLevel(name, "byte");
@@ -232,7 +232,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param b Bytes
* @return Number of bytes read
* @throws IOException
* @throws IOException On I/O error
*/
private int read(byte[] b) throws IOException {
int currBytesRead = is.read(b);
@@ -262,7 +262,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return U8
* @throws IOException
* @throws IOException On I/O error
*/
public int readU8(String name) throws IOException {
newDumpLevel(name, "U8");
@@ -275,7 +275,7 @@ public class ABCInputStream implements AutoCloseable {
* Reads U32 from the stream.
*
* @return U32
* @throws IOException
* @throws IOException On I/O error
*/
private long readU32Internal() throws IOException {
int i;
@@ -299,7 +299,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return U32
* @throws IOException
* @throws IOException On I/O error
*/
public long readU32(String name) throws IOException {
newDumpLevel(name, "U32");
@@ -312,7 +312,7 @@ public class ABCInputStream implements AutoCloseable {
* Reads U30 from the stream.
*
* @return U30
* @throws IOException
* @throws IOException On I/O error
*/
private int readU30Internal() throws IOException {
long u32 = readU32Internal();
@@ -325,7 +325,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return U30
* @throws IOException
* @throws IOException On I/O error
*/
public int readU30(String name) throws IOException {
newDumpLevel(name, "U30");
@@ -339,7 +339,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return S24
* @throws IOException
* @throws IOException On I/O error
*/
public int readS24(String name) throws IOException {
newDumpLevel(name, "S24");
@@ -358,7 +358,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return U16
* @throws IOException
* @throws IOException On I/O error
*/
public int readU16(String name) throws IOException {
newDumpLevel(name, "U16");
@@ -372,7 +372,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return S32
* @throws IOException
* @throws IOException On I/O error
*/
public int readS32(String name) throws IOException {
int i;
@@ -403,7 +403,7 @@ public class ABCInputStream implements AutoCloseable {
* Gets available bytes in the stream.
*
* @return Available bytes
* @throws IOException
* @throws IOException On I/O error
*/
public int available() throws IOException {
return is.available();
@@ -413,7 +413,7 @@ public class ABCInputStream implements AutoCloseable {
* Reads long from the stream.
*
* @return Long
* @throws IOException
* @throws IOException On I/O error
*/
private long readLong() throws IOException {
safeRead(8, stringDataBuffer);
@@ -433,7 +433,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Double
* @throws IOException
* @throws IOException On I/O error
*/
public double readDouble(String name) throws IOException {
newDumpLevel(name, "Double");
@@ -448,7 +448,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param count Count
* @param data Data
* @throws IOException
* @throws IOException On I/O error
*/
private void safeRead(int count, byte[] data) throws IOException {
for (int i = 0; i < count; i++) {
@@ -461,7 +461,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Namespace
* @throws IOException
* @throws IOException On I/O error
*/
public Namespace readNamespace(String name) throws IOException {
newDumpLevel(name, "Namespace");
@@ -482,7 +482,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Multiname
* @throws IOException
* @throws IOException On I/O error
*/
public Multiname readMultiname(String name) throws IOException {
int kind = readU8("kind");
@@ -526,7 +526,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Method info
* @throws IOException
* @throws IOException On I/O error
*/
public MethodInfo readMethodInfo(String name) throws IOException {
newDumpLevel(name, "method_info");
@@ -565,7 +565,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Trait
* @throws IOException
* @throws IOException On I/O error
*/
public Trait readTrait(String name) throws IOException {
newDumpLevel(name, "Trait");
@@ -633,7 +633,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Traits
* @throws IOException
* @throws IOException On I/O error
*/
public Traits readTraits(String name) throws IOException {
newDumpLevel(name, "Traits");
@@ -651,7 +651,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param count Count
* @return Bytes
* @throws IOException
* @throws IOException On I/O error
*/
private byte[] readBytesInternal(int count) throws IOException {
byte[] ret = new byte[count];
@@ -668,7 +668,7 @@ public class ABCInputStream implements AutoCloseable {
* @param name Name
* @param specialType Special type
* @return Bytes
* @throws IOException
* @throws IOException On I/O error
*/
public byte[] readBytes(int count, String name, DumpInfoSpecialType specialType) throws IOException {
newDumpLevel(name, "Bytes", specialType);
@@ -682,7 +682,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Decimal
* @throws IOException
* @throws IOException On I/O error
*/
public Decimal readDecimal(String name) throws IOException {
newDumpLevel(name, "Decimal");
@@ -696,7 +696,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Float
* @throws IOException
* @throws IOException On I/O error
*/
public Float readFloat(String name) throws IOException {
newDumpLevel(name, "Float");
@@ -711,7 +711,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Float4
* @throws IOException
* @throws IOException On I/O error
*/
public Float4 readFloat4(String name) throws IOException {
newDumpLevel(name, "Float4");
@@ -729,7 +729,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return Instance info
* @throws IOException
* @throws IOException On I/O error
*/
public InstanceInfo readInstanceInfo(String name) throws IOException {
newDumpLevel(name, "instance_info");
@@ -756,7 +756,7 @@ public class ABCInputStream implements AutoCloseable {
*
* @param name Name
* @return String
* @throws IOException
* @throws IOException On I/O error
*/
public String readString(String name) throws IOException {
newDumpLevel(name, "String");
@@ -71,7 +71,7 @@ public class ABCOutputStream extends OutputStream {
* Writes a byte to the output stream.
*
* @param b The byte to write.
* @throws IOException
* @throws IOException On I/O error
*/
@Override
public void write(int b) throws IOException {
@@ -83,7 +83,7 @@ public class ABCOutputStream extends OutputStream {
* Writes a byte array to the output stream.
*
* @param data The data to write.
* @throws IOException
* @throws IOException On I/O error
*/
@Override
public void write(byte[] data) throws IOException {
@@ -97,7 +97,7 @@ public class ABCOutputStream extends OutputStream {
* @param b The data to write.
* @param off The start offset in the data.
* @param len The number of bytes to write.
* @throws IOException
* @throws IOException On I/O error
*/
@Override
public void write(byte[] b, int off, int len) throws IOException {
@@ -109,7 +109,7 @@ public class ABCOutputStream extends OutputStream {
* Writes U30 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeU30(long value) throws IOException {
writeS32(value);
@@ -139,7 +139,7 @@ public class ABCOutputStream extends OutputStream {
* Writes U32 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeU32(long value) throws IOException {
boolean loop = true;
@@ -161,7 +161,7 @@ public class ABCOutputStream extends OutputStream {
* Writes S24 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeS24(long value) throws IOException {
int ret = (int) (value & 0xff);
@@ -178,7 +178,7 @@ public class ABCOutputStream extends OutputStream {
* Writes S32 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeS32(long value) throws IOException {
boolean belowZero = value < 0;
@@ -216,7 +216,7 @@ public class ABCOutputStream extends OutputStream {
* Writes long to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeLong(long value) throws IOException {
byte[] writeBuffer = new byte[8];
@@ -235,7 +235,7 @@ public class ABCOutputStream extends OutputStream {
* Writes double to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeDouble(double value) throws IOException {
writeLong(Double.doubleToLongBits(value));
@@ -245,7 +245,7 @@ public class ABCOutputStream extends OutputStream {
* Writes float to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeFloat(float value) throws IOException {
writeU16(Float.floatToIntBits(value));
@@ -255,7 +255,7 @@ public class ABCOutputStream extends OutputStream {
* Writes float4 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeFloat4(Float4 value) throws IOException {
writeFloat(value.values[0]);
@@ -268,7 +268,7 @@ public class ABCOutputStream extends OutputStream {
* Writes U8 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeU8(int value) throws IOException {
write(value);
@@ -278,7 +278,7 @@ public class ABCOutputStream extends OutputStream {
* Writes U16 to the output stream.
*
* @param value Value to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeU16(int value) throws IOException {
write(value & 0xff);
@@ -289,7 +289,7 @@ public class ABCOutputStream extends OutputStream {
* Writes String to the output stream.
*
* @param s String to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeString(String s) throws IOException {
byte[] sbytes = Utf8Helper.getBytes(s);
@@ -301,7 +301,7 @@ public class ABCOutputStream extends OutputStream {
* Writes Namespace to the output stream.
*
* @param ns Namespace to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeNamespace(Namespace ns) throws IOException {
write(ns.kind);
@@ -322,7 +322,7 @@ public class ABCOutputStream extends OutputStream {
* Writes Multiname to the output stream.
*
* @param m Multiname to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeMultiname(Multiname m) throws IOException {
writeU8(m.kind);
@@ -350,7 +350,7 @@ public class ABCOutputStream extends OutputStream {
* Writes MethodInfo to the output stream.
*
* @param mi MethodInfo to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeMethodInfo(MethodInfo mi) throws IOException {
writeU30(mi.param_types.length);
@@ -379,7 +379,7 @@ public class ABCOutputStream extends OutputStream {
* Writes Trait to the output stream.
*
* @param t Trait to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeTrait(Trait t) throws IOException {
writeU30(t.name_index);
@@ -420,7 +420,7 @@ public class ABCOutputStream extends OutputStream {
* Writes Traits to the output stream.
*
* @param t Traits to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeTraits(Traits t) throws IOException {
writeU30(t.traits.size());
@@ -433,7 +433,7 @@ public class ABCOutputStream extends OutputStream {
* Writes InstanceInfo to the output stream.
*
* @param ii InstanceInfo to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeInstanceInfo(InstanceInfo ii) throws IOException {
writeU30(ii.name_index);
@@ -454,7 +454,7 @@ public class ABCOutputStream extends OutputStream {
* Writes Decimal to the output stream.
*
* @param value Decimal to write
* @throws IOException
* @throws IOException On I/O error
*/
public void writeDecimal(Decimal value) throws IOException {
write(value.data);
@@ -464,7 +464,7 @@ public class ABCOutputStream extends OutputStream {
* Gets U30 byte length.
*
* @param value Value
* @return
* @return Length
*/
public static int getU30ByteLength(long value) {
boolean belowZero = value < 0;
@@ -67,7 +67,7 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Returns string representation of ABCVersion
*
* @return
* @return String representation of ABCVersion
*/
@Override
public String toString() {
@@ -77,7 +77,7 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Returns hash code of ABCVersion
*
* @return
* @return Hash code of ABCVersion
*/
@Override
public int hashCode() {
@@ -90,8 +90,8 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Equals method
*
* @param obj
* @return
* @param obj Object to compare
* @return True if objects are equal
*/
@Override
public boolean equals(Object obj) {
@@ -31,37 +31,37 @@ import java.lang.annotation.Target;
public @interface ABCVersionRequirements {
/**
* Minimum minor version.
* Gets minimum minor version.
*
* @return
* @return minimum minor version
*/
int minMinor() default 0;
/**
* Maximum minor version.
* Gets maximum minor version.
*
* @return
* @return maximum minor version
*/
int maxMinor() default 0;
/**
* Maximum major version.
* Gets maximum major version.
*
* @return
* @return maximum major version
*/
int maxMajor() default 0;
/**
* Minimum major version.
* Get minimum major version.
*
* @return
* @return minimum major version
*/
int minMajor() default 0;
/**
* Exact minor version.
* Gets exact minor version.
*
* @return
* @return Exact minor version
*/
int exactMinor() default 0;
}
@@ -32,6 +32,15 @@ import java.util.Set;
*/
public class AbcMultiNameCollisionFixer {
/**
* Constructs new AbcMultiNameCollisionFixer.
*/
public AbcMultiNameCollisionFixer() {
}
/**
* Fixes collisions of multinames in SWF file.
*
@@ -161,7 +161,7 @@ public abstract class InstructionDefinition implements Serializable {
* @param lda Local data area
* @param constants Constant pool
* @param ins Instruction
* @throws AVM2VerifyErrorException
* @throws AVM2VerifyErrorException On verification error
*/
public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException {
for (int i = 0; i < operands.length; i++) {
@@ -232,7 +232,7 @@ public abstract class InstructionDefinition implements Serializable {
* @param constants Constant pool
* @param ins Instruction
* @return True if instruction was executed, false if not
* @throws AVM2ExecutionException
* @throws AVM2ExecutionException On execution error
*/
public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2ExecutionException {
//throw new UnsupportedOperationException("Instruction " + instructionName + " not implemented");
@@ -244,7 +244,7 @@ public abstract class InstructionDefinition implements Serializable {
*
* @param lda Local data area
* @param ins Instruction
* @throws AVM2VerifyErrorException
* @throws AVM2VerifyErrorException On verification error
*/
protected void illegalOpCode(LocalDataArea lda, AVM2Instruction ins) throws AVM2VerifyErrorException {
throw new AVM2VerifyErrorException(AVM2VerifyErrorException.ILLEGAL_OPCODE, lda.isDebug(), new Object[]{lda.methodName, instructionCode, ins.getAddress()});
@@ -258,7 +258,7 @@ public abstract class InstructionDefinition implements Serializable {
* @param ins Instruction
* @param output Output
* @param path Path
* @throws InterruptedException
* @throws InterruptedException On interrupt
*/
public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) throws InterruptedException {
}
@@ -290,7 +290,7 @@ public abstract class InstructionDefinition implements Serializable {
* @param ip IP
* @param code AVM2 code
* @param thisHasDefaultToPrimitive This has default to primitive
* @throws InterruptedException
* @throws InterruptedException On interrupt
*/
public void translate(Set<GraphPart> switchParts, List<MethodBody> callStack, AbcIndexing abcIndex, Map<Integer, Set<Integer>> setLocalPosToGetLocalPos, Reference<GraphSourceItem> lineStartItem, boolean isStatic, int scriptIndex, int classIndex, HashMap<Integer, GraphTargetItem> localRegs, TranslateStack stack, ScopeStack scopeStack, ScopeStack localScopeStack, AVM2Instruction ins, List<GraphTargetItem> output, MethodBody body, ABC abc, HashMap<Integer, String> localRegNames, HashMap<Integer, GraphTargetItem> localRegTypes, List<DottedChain> fullyQualifiedNames, String path, HashMap<Integer, Integer> localRegsAssignmentIps, int ip, AVM2Code code, boolean thisHasDefaultToPrimitive) throws InterruptedException {
AVM2LocalData localData = new AVM2LocalData();
@@ -36,7 +36,9 @@ import java.util.List;
* @author JPEXS
*/
public class Lf32Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Lf32Ins() {
super(0x38, "lf32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Lf64Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Lf64Ins() {
super(0x39, "lf64", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Li16Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Li16Ins() {
super(0x36, "li16", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Li32Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Li32Ins() {
super(0x37, "li32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Li8Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Li8Ins() {
super(0x35, "li8", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Sf32Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Sf32Ins() {
super(0x3D, "sf32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Sf64Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Sf64Ins() {
super(0x3E, "sf64", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Si16Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Si16Ins() {
super(0x3B, "si16", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Si32Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Si32Ins() {
super(0x3C, "si32", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class Si8Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Si8Ins() {
super(0x3A, "si8", new int[]{}, true, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class Sxi16Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Sxi16Ins() {
super(0x52, "sxi16", new int[]{}, false, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class Sxi1Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Sxi1Ins() {
super(0x50, "sxi1", new int[]{}, false, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class Sxi8Ins extends InstructionDefinition implements AlchemyTypeIns {
/**
* Constructor
*/
public Sxi8Ins() {
super(0x51, "sxi8", new int[]{}, false, AVM2InstructionFlag.DOMAIN_MEMORY);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class AddIIns extends InstructionDefinition {
/**
* Constructor
*/
public AddIIns() {
super(0xc5, "add_i", new int[]{}, true);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class AddIns extends InstructionDefinition {
/**
* Constructor
*/
public AddIns() {
super(0xa0, "add", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class DecrementIIns extends InstructionDefinition {
/**
* Constructor
*/
public DecrementIIns() {
super(0xc1, "decrement_i", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class DecrementIns extends InstructionDefinition {
/**
* Constructor
*/
public DecrementIns() {
super(0x93, "decrement", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class DivideIns extends InstructionDefinition {
/**
* Constructor
*/
public DivideIns() {
super(0xa3, "divide", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class IncrementIIns extends InstructionDefinition {
/**
* Constructor
*/
public IncrementIIns() {
super(0xc0, "increment_i", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class IncrementIns extends InstructionDefinition {
/**
* Constructor
*/
public IncrementIns() {
super(0x91, "increment", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class ModuloIns extends InstructionDefinition {
/**
* Constructor
*/
public ModuloIns() {
super(0xa4, "modulo", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class MultiplyIIns extends InstructionDefinition {
/**
* Constructor
*/
public MultiplyIIns() {
super(0xc7, "multiply_i", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class MultiplyIns extends InstructionDefinition {
/**
* Constructor
*/
public MultiplyIns() {
super(0xa2, "multiply", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class NegateIIns extends InstructionDefinition {
/**
* Constructor
*/
public NegateIIns() {
super(0xc4, "negate_i", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class NegateIns extends InstructionDefinition {
/**
* Constructor
*/
public NegateIns() {
super(0x90, "negate", new int[]{}, true);
}
@@ -34,6 +34,9 @@ import java.util.List;
*/
public class NotIns extends InstructionDefinition {
/**
* Constructor
*/
public NotIns() {
super(0x96, "not", new int[]{}, false);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class SubtractIIns extends InstructionDefinition {
/**
* Constructor
*/
public SubtractIIns() {
super(0xc6, "subtract_i", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class SubtractIns extends InstructionDefinition {
/**
* Constructor
*/
public SubtractIns() {
super(0xa1, "subtract", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class BitAndIns extends InstructionDefinition {
/**
* Constructor
*/
public BitAndIns() {
super(0xa8, "bitand", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class BitNotIns extends InstructionDefinition {
/**
* Constructor
*/
public BitNotIns() {
super(0x97, "bitnot", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class BitOrIns extends InstructionDefinition {
/**
* Constructor
*/
public BitOrIns() {
super(0xa9, "bitor", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class BitXorIns extends InstructionDefinition {
/**
* Constructor
*/
public BitXorIns() {
super(0xaa, "bitxor", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class LShiftIns extends InstructionDefinition {
/**
* Constructor
*/
public LShiftIns() {
super(0xa5, "lshift", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class RShiftIns extends InstructionDefinition {
/**
* Constructor
*/
public RShiftIns() {
super(0xa6, "rshift", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class URShiftIns extends InstructionDefinition {
/**
* Constructor
*/
public URShiftIns() {
super(0xa7, "urshift", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class EqualsIns extends InstructionDefinition {
/**
* Constructor
*/
public EqualsIns() {
super(0xab, "equals", new int[]{}, true);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class GreaterEqualsIns extends InstructionDefinition {
/**
* Constructor
*/
public GreaterEqualsIns() {
super(0xb0, "greaterequals", new int[]{}, true);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class GreaterThanIns extends InstructionDefinition {
/**
* Constructor
*/
public GreaterThanIns() {
super(0xaf, "greaterthan", new int[]{}, true);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class LessEqualsIns extends InstructionDefinition {
/**
* Constructor
*/
public LessEqualsIns() {
super(0xae, "lessequals", new int[]{}, true);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class LessThanIns extends InstructionDefinition {
/**
* Constructor
*/
public LessThanIns() {
super(0xad, "lessthan", new int[]{}, true);
}
@@ -35,6 +35,9 @@ import java.util.List;
*/
public class StrictEqualsIns extends InstructionDefinition {
/**
* Constructor
*/
public StrictEqualsIns() {
super(0xac, "strictequals", new int[]{}, true);
}
@@ -48,6 +48,9 @@ import java.util.List;
*/
public class ConstructIns extends InstructionDefinition {
/**
* Constructor
*/
public ConstructIns() {
super(0x42, "construct", new int[]{AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -43,6 +43,9 @@ import java.util.List;
*/
public class ConstructPropIns extends InstructionDefinition {
/**
* Constructor
*/
public ConstructPropIns() {
super(0x4a, "constructprop", new int[]{AVM2Code.DAT_MULTINAME_INDEX, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -36,6 +36,9 @@ import java.util.List;
*/
public class ConstructSuperIns extends InstructionDefinition {
/**
* Constructor
*/
public ConstructSuperIns() {
super(0x49, "constructsuper", new int[]{AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -32,6 +32,9 @@ import java.util.List;
*/
public class NewActivationIns extends InstructionDefinition {
/**
* Constructor
*/
public NewActivationIns() {
super(0x57, "newactivation", new int[]{}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class NewArrayIns extends InstructionDefinition {
/**
* Constructor
*/
public NewArrayIns() {
super(0x56, "newarray", new int[]{AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -33,6 +33,9 @@ import java.util.List;
*/
public class NewCatchIns extends InstructionDefinition {
/**
* Constructor
*/
public NewCatchIns() {
super(0x5a, "newcatch", new int[]{AVM2Code.DAT_EXCEPTION_INDEX}, true);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class NewClassIns extends InstructionDefinition {
/**
* Constructor
*/
public NewClassIns() {
super(0x58, "newclass", new int[]{AVM2Code.DAT_CLASS_INDEX}, true);
}
@@ -34,6 +34,9 @@ import java.util.List;
*/
public class NewFunctionIns extends InstructionDefinition {
/**
* Constructor
*/
public NewFunctionIns() {
super(0x40, "newfunction", new int[]{AVM2Code.DAT_METHOD_INDEX}, true);
}
@@ -41,6 +41,9 @@ import java.util.List;
*/
public class NewObjectIns extends InstructionDefinition {
/**
* Constructor
*/
public NewObjectIns() {
super(0x55, "newobject", new int[]{AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -29,6 +29,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
*/
public class DebugFileIns extends InstructionDefinition {
/**
* Constructor
*/
public DebugFileIns() {
super(0xf1, "debugfile", new int[]{AVM2Code.DAT_STRING_INDEX}, false);
}
@@ -29,6 +29,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
*/
public class DebugIns extends InstructionDefinition {
/**
* Constructor
*/
public DebugIns() {
super(0xef, "debug", new int[]{AVM2Code.DAT_DEBUG_TYPE, AVM2Code.DAT_STRING_INDEX, AVM2Code.DAT_REGISTER_INDEX, AVM2Code.OPT_U30}, false);
}
@@ -29,6 +29,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
*/
public class DebugLineIns extends InstructionDefinition {
/**
* Constructor
*/
public DebugLineIns() {
super(0xf0, "debugline", new int[]{AVM2Code.DAT_LINENUM}, false);
}
@@ -41,6 +41,9 @@ import java.util.List;
*/
public class CallIns extends InstructionDefinition {
/**
* Constructor
*/
public CallIns() {
super(0x41, "call", new int[]{AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class CallMethodIns extends InstructionDefinition {
/**
* Constructor
*/
public CallMethodIns() {
super(0x43, "callmethod", new int[]{AVM2Code.DAT_DISPATCH_ID, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -38,6 +38,9 @@ import java.util.List;
*/
public class CallPropLexIns extends CallPropertyIns {
/**
* Constructor
*/
public CallPropLexIns() {
instructionName = "callproplex";
instructionCode = 0x4c;
@@ -39,6 +39,9 @@ import java.util.List;
*/
public class CallPropVoidIns extends InstructionDefinition {
/**
* Constructor
*/
public CallPropVoidIns() {
super(0x4f, "callpropvoid", new int[]{AVM2Code.DAT_MULTINAME_INDEX, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class CallPropertyIns extends InstructionDefinition {
/**
* Constructor
*/
public CallPropertyIns() {
super(0x46, "callproperty", new int[]{AVM2Code.DAT_MULTINAME_INDEX, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class CallStaticIns extends InstructionDefinition {
/**
* Constructor
*/
public CallStaticIns() {
super(0x44, "callstatic", new int[]{AVM2Code.DAT_METHOD_INDEX, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -38,6 +38,9 @@ import java.util.List;
*/
public class CallSuperIns extends InstructionDefinition {
/**
* Constructor
*/
public CallSuperIns() {
super(0x45, "callsuper", new int[]{AVM2Code.DAT_MULTINAME_INDEX, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class CallSuperVoidIns extends InstructionDefinition {
/**
* Constructor
*/
public CallSuperVoidIns() {
super(0x4e, "callsupervoid", new int[]{AVM2Code.DAT_MULTINAME_INDEX, AVM2Code.DAT_ARG_COUNT}, true);
}
@@ -39,6 +39,9 @@ import java.util.List;
*/
public class IfEqIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfEqIns() {
super(0x13, "ifeq", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class IfFalseIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfFalseIns() {
super(0x12, "iffalse", new int[]{AVM2Code.DAT_OFFSET}, false);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfGeIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfGeIns() {
super(0x18, "ifge", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfGtIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfGtIns() {
super(0x17, "ifgt", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfLeIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfLeIns() {
super(0x16, "ifle", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfLtIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfLtIns() {
super(0x15, "iflt", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfNGeIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfNGeIns() {
super(0x0f, "ifnge", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfNGtIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfNGtIns() {
super(0x0e, "ifngt", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfNLeIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfNLeIns() {
super(0x0d, "ifnle", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IfNLtIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfNLtIns() {
super(0x0c, "ifnlt", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -39,6 +39,9 @@ import java.util.List;
*/
public class IfNeIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfNeIns() {
super(0x14, "ifne", new int[]{AVM2Code.DAT_OFFSET}, true);
}
@@ -39,6 +39,9 @@ import java.util.List;
*/
public class IfStrictEqIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfStrictEqIns() {
super(0x19, "ifstricteq", new int[]{AVM2Code.DAT_OFFSET}, false);
}
@@ -39,6 +39,9 @@ import java.util.List;
*/
public class IfStrictNeIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfStrictNeIns() {
super(0x1A, "ifstrictne", new int[]{AVM2Code.DAT_OFFSET}, false);
}
@@ -37,6 +37,9 @@ import java.util.List;
*/
public class IfTrueIns extends InstructionDefinition implements IfTypeIns {
/**
* Constructor
*/
public IfTrueIns() {
super(0x11, "iftrue", new int[]{AVM2Code.DAT_OFFSET}, false);
}
@@ -34,11 +34,11 @@ import java.util.List;
* @author JPEXS
*/
public class JumpIns extends InstructionDefinition implements IfTypeIns {
public static final String NAME = "jump";
/**
* Constructor
*/
public JumpIns() {
super(0x10, NAME, new int[]{AVM2Code.DAT_OFFSET}, false);
super(0x10, "jump", new int[]{AVM2Code.DAT_OFFSET}, false);
}
@Override
@@ -32,6 +32,9 @@ import java.util.List;
*/
public class LookupSwitchIns extends InstructionDefinition {
/**
* Constructor
*/
public LookupSwitchIns() {
super(0x1b, "lookupswitch", new int[]{AVM2Code.DAT_CASE_BASEOFFSET, AVM2Code.OPT_CASE_OFFSETS}, false);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class DecLocalIIns extends InstructionDefinition {
/**
* Constructor
*/
public DecLocalIIns() {
super(0xc3, "declocal_i", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class DecLocalIns extends InstructionDefinition {
/**
* Constructor
*/
public DecLocalIns() {
super(0x94, "declocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}, true);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class GetLocal0Ins extends GetLocalTypeIns {
/**
* Constructor
*/
public GetLocal0Ins() {
super(0xd0, "getlocal0", new int[]{}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class GetLocal1Ins extends GetLocalTypeIns {
/**
* Constructor
*/
public GetLocal1Ins() {
super(0xd1, "getlocal1", new int[]{}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class GetLocal2Ins extends GetLocalTypeIns {
/**
* Constructor
*/
public GetLocal2Ins() {
super(0xd2, "getlocal2", new int[]{}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class GetLocal3Ins extends GetLocalTypeIns {
/**
* Constructor
*/
public GetLocal3Ins() {
super(0xd3, "getlocal3", new int[]{}, false);
}
@@ -26,6 +26,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class GetLocalIns extends GetLocalTypeIns {
/**
* Constructor
*/
public GetLocalIns() {
super(0x62, "getlocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}, false);
}
@@ -55,6 +55,13 @@ import java.util.List;
*/
public abstract class GetLocalTypeIns extends InstructionDefinition {
/**
* Constructor
* @param instructionCode Instruction code
* @param instructionName Instruction name
* @param operands Operands
* @param canThrow Can throw exception
*/
public GetLocalTypeIns(int instructionCode, String instructionName, int[] operands, boolean canThrow) {
super(instructionCode, instructionName, operands, canThrow);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IncLocalIIns extends InstructionDefinition {
/**
* Constructor
*/
public IncLocalIIns() {
super(0xc2, "inclocal_i", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}, true);
}
@@ -40,6 +40,9 @@ import java.util.List;
*/
public class IncLocalIns extends InstructionDefinition {
/**
* Constructor
*/
public IncLocalIns() {
super(0x92, "inclocal", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}, true);
}
@@ -31,6 +31,9 @@ import java.util.List;
*/
public class KillIns extends InstructionDefinition {
/**
* Constructor
*/
public KillIns() {
super(0x08, "kill", new int[]{AVM2Code.DAT_LOCAL_REG_INDEX}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class SetLocal0Ins extends SetLocalTypeIns {
/**
* Constructor
*/
public SetLocal0Ins() {
super(0xd4, "setlocal0", new int[]{}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class SetLocal1Ins extends SetLocalTypeIns {
/**
* Constructor
*/
public SetLocal1Ins() {
super(0xd5, "setlocal1", new int[]{}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class SetLocal2Ins extends SetLocalTypeIns {
/**
* Constructor
*/
public SetLocal2Ins() {
super(0xd6, "setlocal2", new int[]{}, false);
}
@@ -25,6 +25,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
*/
public class SetLocal3Ins extends SetLocalTypeIns {
/**
* Constructor
*/
public SetLocal3Ins() {
super(0xd7, "setlocal3", new int[]{}, false);
}

Some files were not shown because too many files have changed in this diff Show More