use crate::classloader::io::{Lookupswitch, Tableswitch};

#[allow(non_camel_case_types)]
#[derive(Clone, Debug)]
pub(crate) enum Opcode {
    NOP,
    ACONST_NULL,
    ICONST(i16),
    LCONST(u8),
    FCONST(u8),
    DCONST(u8),
    BIPUSH(u8),
    SIPUSH(u16),
    LDC(u16),
    LDC_W(u16),
    LDC2_W(u16),
    ILOAD(u8),
    WIDE_ILOAD(u16),
    LLOAD(u8),
    WIDE_LLOAD(u16),
    FLOAD(u8),
    WIDE_FLOAD(u16),
    DLOAD(u8),
    WIDE_DLOAD(u16),
    ALOAD(u8),
    WIDE_ALOAD(u16),
    IALOAD,
    LALOAD,
    FALOAD,
    DALOAD,
    AALOAD,
    BALOAD,
    CALOAD,
    SALOAD,
    ISTORE(u8),
    WIDE_ISTORE(u16),
    LSTORE(u8),
    WIDE_LSTORE(u16),
    FSTORE(u8),
    WIDE_FSTORE(u16),
    DSTORE(u8),
    WIDE_DSTORE(u16),
    ASTORE(u8),
    WIDE_ASTORE(u16),
    IASTORE,
    LASTORE,
    FASTORE,
    DASTORE,
    AASTORE,
    BASTORE,
    CASTORE,
    SASTORE,
    POP,
    DUP,
    DUP_X1,
    DUP_X2,
    DUP2,
    DUP2_X1,
    DUP2_X2,
    IADD,
    LADD,
    FADD,
    DADD,
    ISUB,
    LSUB,
    FSUB,
    DSUB,
    IMUL,
    LMUL,
    FMUL,
    DMUL,
    IDIV,
    LDIV,
    FDIV,
    DDIV,
    IREM,
    LREM,
    FREM,
    DREM,
    INEG,
    LNEG,
    FNEG,
    DNEG,
    ISHL,
    LSHL,
    ISHR,
    LSHR,
    IAND,
    LAND,
    IOR,
    LOR,
    IXOR,
    LXOR,
    IINC(u8,u8),
    I2L,
    I2F,
    I2D,
    L2I,
    L2F,
    L2D,
    WIDE_IINC(u16,u16),
    F2I,
    F2L,
    F2D,
    D2I,
    D2L,
    D2F,
    I2B,
    I2C,
    I2S,
    LCMP,
    FCMPL,
    FCMPG,
    DCMPL,
    DCMPG,
    IFEQ(u16),
    IFNE(u16),
    IFLT(u16),
    IFGE(u16),
    IFGT(u16),
    IFLE(u16),
    IF_ICMPEQ(u16),
    IF_ICMPNE(u16),
    IF_ICMPLT(u16),
    IF_ICMPGE(u16),
    IF_ICMPGT(u16),
    IF_ICMPLE(u16),
    IF_ACMPEQ(u16),
    IF_ACMPNE(u16),
    GOTO(u16),
    JSR(u16),
    RET(u8),
    WIDE_RET(u16),
    TABLESWITCH(Tableswitch),
    LOOKUPSWITCH(Lookupswitch),
    IRETURN,
    FRETURN,
    DRETURN,
    ARETURN,
    RETURN_VOID,
    GETSTATIC(u16),
    PUTSTATIC(u16),
    GETFIELD(u16),
    PUTFIELD(u16),
    INVOKEVIRTUAL(u16),
    INVOKESPECIAL(u16),
    INVOKESTATIC(u16),
    INVOKEINTERFACE(u16, u8),
    INVOKEDYNAMIC(u16),
    NEW(u16),
    NEWARRAY(u8),
    ANEWARRAY(u16),
    ARRAYLENGTH,
    ATHROW,
    CHECKCAST(u16),
    INSTANCEOF(u16),
    MONITORENTER,
    MONITOREXIT,
    WIDE(Box<Opcode>),
    MULTIANEWARRAY(u16, u8),
    IFNULL(u16),
    IFNONNULL(u16),
    GOTOW(i32),
    JSR_W(i32),

}


