Skip to content

Commit

Permalink
#1048 Recategorized AVM2 instructions in package "other2",
Browse files Browse the repository at this point in the history
added links to sources for unknown instructions.
  • Loading branch information
jindrapetrik committed Mar 19, 2023
1 parent 859049b commit 8378042
Show file tree
Hide file tree
Showing 57 changed files with 271 additions and 135 deletions.
104 changes: 52 additions & 52 deletions libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,58 +156,58 @@
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetSlotIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetSuperIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ThrowIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.AbsJumpIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.AddDIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.AddPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.AllocIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.BkptIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.BkptLineIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CallInterfaceIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CallSuperIdIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CodeGenOpIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceBIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceDIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceIIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceOIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.CoerceUIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConcatIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertF4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertFIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertMIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ConvertMPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DecLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DecodeIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DecrementPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DelDescendantsIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DeletePropertyLateIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DividePIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DoubleToAtomIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.FindPropGlobalIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.GetOuterScopeIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.IncLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.IncrementPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.InvalidIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.Lf32x4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.MarkIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.ModuloPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.MultiplyPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.NegatePIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PrologueIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushConstantIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushDNanIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushDecimalIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushFloat4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.PushFloatIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.SendEnterIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.SetPropertyLateIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.Sf32x4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.SubtractPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.SweepIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.TimestampIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.UnPlusIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.VerifyOpIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.VerifyPassIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.WbIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AbsJumpIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AddDIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.AddPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AllocIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.BkptIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.BkptLineIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CallInterfaceIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CallSuperIdIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CodeGenOpIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceBIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceDIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceIIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceUIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.ConcatIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.ConvertF4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.ConvertFIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.ConvertMIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.ConvertMPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DecLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DecodeIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DecrementPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DelDescendantsIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DeletePropertyLateIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DividePIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DoubleToAtomIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.FindPropGlobalIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetOuterScopeIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.IncLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.IncrementPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.InvalidIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.Lf32x4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.MarkIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.ModuloPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.MultiplyPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.NegatePIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.PrologueIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.PushConstantIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.PushDNanIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.PushDecimalIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.PushFloat4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.PushFloatIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.SendEnterIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.SetPropertyLateIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.Sf32x4Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.SubtractPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.SweepIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.TimestampIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.UnPlusIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.VerifyOpIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.VerifyPassIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.WbIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.DupIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopScopeIns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.HasNext2Ins;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.LabelIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.NopIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.DecLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other2.IncLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DecLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.IncLocalPIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushByteIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushScopeIns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,17 @@ public class AVM2Instructions {
public static final int ConvertO = 0x77;

public static final int CheckFilter = 0x78;

public static final int ConvertM = 0x79;

public static final int ConvertF = 0x79;

public static final int ConvertMP = 0x7A;


public static final int UnPlus = 0x7A;

public static final int ConvertF4 = 0x7B;

public static final int Coerce = 0x80;

public static final int CoerceB = 0x81;
Expand Down Expand Up @@ -424,14 +430,10 @@ public class AVM2Instructions {

public static final int Prologue = 0xF9;

public static final int SendEnter = 0xFA;

public static final int UnPlus = 0xFA;
public static final int SendEnter = 0xFA;

public static final int DoubleToAtom = 0xFB;

public static final int ConvertF4 = 0x7B;


public static final int Sweep = 0xFC;

public static final int CodeGenOp = 0xFD;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other;

import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other;

import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other;

import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
Expand All @@ -33,11 +33,11 @@ public GetOuterScopeIns() {

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
throw new UnsupportedOperationException();
return 0;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
throw new UnsupportedOperationException();
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other;

import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
Expand Down Expand Up @@ -47,11 +47,11 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
throw new UnsupportedOperationException();
return 1;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
throw new UnsupportedOperationException();
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

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.AVM2Runtime;
Expand Down Expand Up @@ -43,4 +44,14 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

super.verify(lda, constants, ins);
}

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 0;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

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.AVM2Runtime;
Expand Down Expand Up @@ -43,4 +44,14 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

super.verify(lda, constants, ins);
}

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 1;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
Expand Down Expand Up @@ -47,11 +47,11 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 2; // ?
return 2;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 1; // ?
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

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.AVM2Runtime;
Expand Down Expand Up @@ -43,4 +44,14 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

super.verify(lda, constants, ins);
}

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 0;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

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.AVM2Runtime;
Expand Down Expand Up @@ -43,4 +44,14 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

super.verify(lda, constants, ins);
}

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 1;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.other2;
package com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport;

import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
Expand Down Expand Up @@ -47,11 +47,11 @@ public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instructio

@Override
public int getStackPopCount(AVM2Instruction ins, ABC abc) {
return 2; // ?
return 2;
}

@Override
public int getStackPushCount(AVM2Instruction ins, ABC abc) {
return 1; // ?
return 1;
}
}
Loading

0 comments on commit 8378042

Please sign in to comment.