Class ByteCodeSwitch

  • All Implemented Interfaces:
    org.objectweb.asm.Opcodes

    public class ByteCodeSwitch
    extends EmftvmSwitch<org.objectweb.asm.MethodVisitor>
    implements org.objectweb.asm.Opcodes
    Adds code to the given MethodVisitor, and returns it.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.Class<?>,​java.lang.Class<?>> BOXED_CLASSES
      The map of primitive types to their boxed class counterpart type.
      protected boolean hasMonitor
      Whether or not the current execution environment has a monitor attached.
      protected CodeBlockJIT jit
      The JIT compiler to generate instructions for.
      protected LabelSwitch ls
      The LabelSwitch to look up generated labels.
      protected org.objectweb.asm.MethodVisitor mv
      The MethodVisitor to add code to.
      protected java.util.Set<Instruction> skipInstructions
      Set of instructions to skip while generating bytecode.
      • Fields inherited from interface org.objectweb.asm.Opcodes

        AALOAD, AASTORE, ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_MANDATED, ACC_MODULE, ACC_NATIVE, ACC_OPEN, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_RECORD, ACC_STATIC, ACC_STATIC_PHASE, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_TRANSITIVE, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASM10_EXPERIMENTAL, ASM4, ASM5, ASM6, ASM7, ASM8, ASM9, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DOUBLE, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F_APPEND, F_CHOP, F_FULL, F_NEW, F_SAME, F_SAME1, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FLOAT, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, H_GETFIELD, H_GETSTATIC, H_INVOKEINTERFACE, H_INVOKESPECIAL, H_INVOKESTATIC, H_INVOKEVIRTUAL, H_NEWINVOKESPECIAL, H_PUTFIELD, H_PUTSTATIC, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INTEGER, INVOKEDYNAMIC, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LONG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, NULL, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SOURCE_DEPRECATED, SOURCE_MASK, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH, TOP, UNINITIALIZED_THIS, V_PREVIEW, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V9
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void aastore()  
      protected void aconst_null()  
      protected void aload​(int var)
      Generates an ALOAD instruction.
      protected void anewarray​(java.lang.Class<?> cls)  
      protected void areturn()  
      protected void astore​(int var)
      Generates an ASTORE instruction.
      protected void athrow()  
      static java.lang.Class<?> boxed​(java.lang.Class<?> type)
      Returns the boxed version of type, or type if no boxing required.
      org.objectweb.asm.MethodVisitor caseAdd​(Add object)
      Returns the result of interpreting the object as an instance of 'Add'.
      org.objectweb.asm.MethodVisitor caseAllinst​(Allinst object)
      Returns the result of interpreting the object as an instance of 'Allinst'.
      org.objectweb.asm.MethodVisitor caseAllinstIn​(AllinstIn object)
      Returns the result of interpreting the object as an instance of 'Allinst In'.
      org.objectweb.asm.MethodVisitor caseAnd​(And object)
      Returns the result of interpreting the object as an instance of 'And'.
      org.objectweb.asm.MethodVisitor caseDelete​(Delete object)
      Returns the result of interpreting the object as an instance of 'Delete'.
      org.objectweb.asm.MethodVisitor caseDup​(Dup object)
      Returns the result of interpreting the object as an instance of 'Dup'.
      org.objectweb.asm.MethodVisitor caseDupX1​(DupX1 object)
      Returns the result of interpreting the object as an instance of 'Dup X1'.
      org.objectweb.asm.MethodVisitor caseEnditerate​(Enditerate object)
      Returns the result of interpreting the object as an instance of 'Enditerate'.
      org.objectweb.asm.MethodVisitor caseFindtype​(Findtype object)
      Returns the result of interpreting the object as an instance of 'Findtype'.
      org.objectweb.asm.MethodVisitor caseFindtypeS​(FindtypeS object)
      Returns the result of interpreting the object as an instance of 'Findtype S'.
      org.objectweb.asm.MethodVisitor caseGet​(Get object)
      Returns the result of interpreting the object as an instance of 'Get'.
      org.objectweb.asm.MethodVisitor caseGetcb​(Getcb object)
      Returns the result of interpreting the object as an instance of 'Getcb'.
      org.objectweb.asm.MethodVisitor caseGetenv​(Getenv object)
      Returns the result of interpreting the object as an instance of 'Getenv'.
      org.objectweb.asm.MethodVisitor caseGetenvtype​(Getenvtype object)
      Returns the result of interpreting the object as an instance of 'Getenvtype'.
      org.objectweb.asm.MethodVisitor caseGetStatic​(GetStatic object)
      Returns the result of interpreting the object as an instance of 'Get Static'.
      org.objectweb.asm.MethodVisitor caseGetSuper​(GetSuper object)
      Returns the result of interpreting the object as an instance of 'Get Super'.
      org.objectweb.asm.MethodVisitor caseGetTrans​(GetTrans object)
      Returns the result of interpreting the object as an instance of 'Get Trans'.
      org.objectweb.asm.MethodVisitor caseGoto​(Goto object)
      Returns the result of interpreting the object as an instance of 'Goto'.
      org.objectweb.asm.MethodVisitor caseIf​(If object)
      Returns the result of interpreting the object as an instance of 'If'.
      org.objectweb.asm.MethodVisitor caseIfn​(Ifn object)
      Returns the result of interpreting the object as an instance of 'Ifn'.
      org.objectweb.asm.MethodVisitor caseIfte​(Ifte object)
      Returns the result of interpreting the object as an instance of 'Ifte'.
      org.objectweb.asm.MethodVisitor caseImplies​(Implies object)
      Returns the result of interpreting the object as an instance of 'Implies'.
      org.objectweb.asm.MethodVisitor caseInsert​(Insert object)
      Returns the result of interpreting the object as an instance of 'Insert'.
      org.objectweb.asm.MethodVisitor caseInstruction​(Instruction object)
      Returns the result of interpreting the object as an instance of 'Instruction'.
      org.objectweb.asm.MethodVisitor caseInvoke​(Invoke object)
      Returns the result of interpreting the object as an instance of 'Invoke'.
      org.objectweb.asm.MethodVisitor caseInvokeAllCbs​(InvokeAllCbs object)
      Returns the result of interpreting the object as an instance of 'Invoke All Cbs'.
      org.objectweb.asm.MethodVisitor caseInvokeCb​(InvokeCb object)
      Returns the result of interpreting the object as an instance of 'Invoke Cb'.
      org.objectweb.asm.MethodVisitor caseInvokeCbS​(InvokeCbS object)
      Returns the result of interpreting the object as an instance of 'Invoke Cb S'.
      org.objectweb.asm.MethodVisitor caseInvokeStatic​(InvokeStatic object)
      Returns the result of interpreting the object as an instance of 'Invoke Static'.
      org.objectweb.asm.MethodVisitor caseInvokeSuper​(InvokeSuper object)
      Returns the result of interpreting the object as an instance of 'Invoke Super'.
      org.objectweb.asm.MethodVisitor caseIsnull​(Isnull object)
      Returns the result of interpreting the object as an instance of 'Isnull'.
      org.objectweb.asm.MethodVisitor caseIterate​(Iterate object)
      Returns the result of interpreting the object as an instance of 'Iterate'.
      org.objectweb.asm.MethodVisitor caseLoad​(Load object)
      Returns the result of interpreting the object as an instance of 'Load'.
      org.objectweb.asm.MethodVisitor caseMatch​(Match object)
      Returns the result of interpreting the object as an instance of 'Match'.
      org.objectweb.asm.MethodVisitor caseMatchS​(MatchS object)
      Returns the result of interpreting the object as an instance of 'Match S'.
      org.objectweb.asm.MethodVisitor caseNew​(New object)
      Returns the result of interpreting the object as an instance of 'New'.
      org.objectweb.asm.MethodVisitor caseNewS​(NewS object)
      Returns the result of interpreting the object as an instance of 'New S'.
      org.objectweb.asm.MethodVisitor caseNot​(Not object)
      Returns the result of interpreting the object as an instance of 'Not'.
      org.objectweb.asm.MethodVisitor caseOr​(Or object)
      Returns the result of interpreting the object as an instance of 'Or'.
      org.objectweb.asm.MethodVisitor casePop​(Pop object)
      Returns the result of interpreting the object as an instance of 'Pop'.
      org.objectweb.asm.MethodVisitor casePush​(Push object)
      Returns the result of interpreting the object as an instance of 'Push'.
      org.objectweb.asm.MethodVisitor casePushf​(Pushf object)
      Returns the result of interpreting the object as an instance of 'Pushf'.
      org.objectweb.asm.MethodVisitor casePusht​(Pusht object)
      Returns the result of interpreting the object as an instance of 'Pusht'.
      org.objectweb.asm.MethodVisitor caseRemove​(Remove object)
      Returns the result of interpreting the object as an instance of 'Remove'.
      org.objectweb.asm.MethodVisitor caseReturn​(Return object)
      Returns the result of interpreting the object as an instance of 'Return'.
      org.objectweb.asm.MethodVisitor caseSet​(Set object)
      Returns the result of interpreting the object as an instance of 'Set'.
      org.objectweb.asm.MethodVisitor caseSetStatic​(SetStatic object)
      Returns the result of interpreting the object as an instance of 'Set Static'.
      org.objectweb.asm.MethodVisitor caseStore​(Store object)
      Returns the result of interpreting the object as an instance of 'Store'.
      org.objectweb.asm.MethodVisitor caseSwap​(Swap object)
      Returns the result of interpreting the object as an instance of 'Swap'.
      org.objectweb.asm.MethodVisitor caseSwapX1​(SwapX1 object)
      Returns the result of interpreting the object as an instance of 'Swap X1'.
      org.objectweb.asm.MethodVisitor caseXor​(Xor object)
      Returns the result of interpreting the object as an instance of 'Xor'.
      protected void checkcast​(java.lang.Class<?> cls)  
      protected void dup()  
      protected void dup_x1()  
      protected void dup_x2()  
      protected void field​(int opcode, java.lang.Class<?> owner, java.lang.String name, java.lang.Object type)
      Generates a field access instruction.
      protected void generateBoxing​(java.lang.Class<?> cls, java.lang.Class<?> selfCls)
      Generates boxing code for a value of type cls, if necessary.
      protected void generatePushInt​(int value)
      Generates an optimised instruction for pushing a constant integer value onto the stack.
      protected void generateSetPc​(Instruction object)
      Generates frame.setPc(pc) for object, iff hasMonitor is false.
      protected void generateSubFrame​(java.lang.String opname)
      Generates bytecode that creates a new sub-StackFrame.
      protected void generateUnboxing​(java.lang.Class<?> cls)
      Generates unboxing code for a value of type cls, if necessary.
      protected void getField​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object type)  
      protected void getStatic​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object type)  
      protected void goto_​(org.objectweb.asm.Label label)  
      protected void iconst_0()  
      protected void iconst_1()  
      protected void ifeq​(org.objectweb.asm.Label label)  
      protected void ifne​(org.objectweb.asm.Label label)  
      protected void ifnonnull​(org.objectweb.asm.Label label)  
      protected void ifnull​(org.objectweb.asm.Label label)  
      protected void instanceof_​(java.lang.Class<?> cls)  
      protected void invoke​(int opcode, java.lang.Class<?> owner, java.lang.String name, java.lang.Object retType, java.lang.Object... argTypes)
      Generates a method invocation instruction.
      protected void invokeCons​(java.lang.Class<?> owner, java.lang.Object... argTypes)  
      protected void invokeIface​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object retType, java.lang.Object... argTypes)  
      protected void invokeSpec​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object retClass, java.lang.Object... argClasses)  
      protected void invokeStat​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object retType, java.lang.Object... argTypes)  
      protected void invokeVirt​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object retType, java.lang.Object... argTypes)  
      protected void label​(org.objectweb.asm.Label label)
      Inserts a label.
      protected void ldc​(java.lang.Object object)  
      protected void localVariable​(java.lang.String name, java.lang.Class<?> type, org.objectweb.asm.Label start, org.objectweb.asm.Label end, int index)
      Generates a local variable table entry.
      protected void new_​(java.lang.Class<?> cls)  
      protected Instruction nextInstruction​(Instruction instruction)
      Returns the next instruction for the given instruction, or null.
      protected void pop()  
      protected void putField​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object type)  
      protected void putStatic​(java.lang.Class<?> owner, java.lang.String name, java.lang.Object type)  
      protected void swap()  
      protected void tryCatchBlock​(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, java.lang.Class<?> type)
      Generates a try-catch block.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BOXED_CLASSES

        public static final java.util.Map<java.lang.Class<?>,​java.lang.Class<?>> BOXED_CLASSES
        The map of primitive types to their boxed class counterpart type.
      • mv

        protected final org.objectweb.asm.MethodVisitor mv
        The MethodVisitor to add code to.
      • jit

        protected final CodeBlockJIT jit
        The JIT compiler to generate instructions for.
      • hasMonitor

        protected final boolean hasMonitor
        Whether or not the current execution environment has a monitor attached.
      • skipInstructions

        protected final java.util.Set<Instruction> skipInstructions
        Set of instructions to skip while generating bytecode.
    • Constructor Detail

      • ByteCodeSwitch

        public ByteCodeSwitch​(CodeBlockJIT jit,
                              org.objectweb.asm.MethodVisitor mv,
                              LabelSwitch ls)
        Creates a new ByteCodeSwitch.
        Parameters:
        jit - the JIT compiler to generate instructions for
        mv - the MethodVisitor to add code to
        ls - the LabelSwitch to look up generated labels
    • Method Detail

      • boxed

        public static java.lang.Class<?> boxed​(java.lang.Class<?> type)
        Returns the boxed version of type, or type if no boxing required.
        Parameters:
        type - the type to box
        Returns:
        the boxed version of type, or type if no boxing required
      • caseInstruction

        public org.objectweb.asm.MethodVisitor caseInstruction​(Instruction object)
        Description copied from class: EmftvmSwitch
        Returns the result of interpreting the object as an instance of 'Instruction'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInstruction in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Instruction'.
        See Also:
        doSwitch(EObject)
      • casePush

        public org.objectweb.asm.MethodVisitor casePush​(Push object)
        Returns the result of interpreting the object as an instance of 'Push'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        casePush in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Push'.
        See Also:
        doSwitch(EObject)
      • casePusht

        public org.objectweb.asm.MethodVisitor casePusht​(Pusht object)
        Returns the result of interpreting the object as an instance of 'Pusht'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        casePusht in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Pusht'.
        See Also:
        doSwitch(EObject)
      • casePushf

        public org.objectweb.asm.MethodVisitor casePushf​(Pushf object)
        Returns the result of interpreting the object as an instance of 'Pushf'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        casePushf in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Pushf'.
        See Also:
        doSwitch(EObject)
      • casePop

        public org.objectweb.asm.MethodVisitor casePop​(Pop object)
        Returns the result of interpreting the object as an instance of 'Pop'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        casePop in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Pop'.
        See Also:
        doSwitch(EObject)
      • caseLoad

        public org.objectweb.asm.MethodVisitor caseLoad​(Load object)
        Returns the result of interpreting the object as an instance of 'Load'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseLoad in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Load'.
        See Also:
        doSwitch(EObject)
      • caseStore

        public org.objectweb.asm.MethodVisitor caseStore​(Store object)
        Returns the result of interpreting the object as an instance of 'Store'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseStore in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Store'.
        See Also:
        doSwitch(EObject)
      • caseSet

        public org.objectweb.asm.MethodVisitor caseSet​(Set object)
        Returns the result of interpreting the object as an instance of 'Set'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseSet in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Set'.
        See Also:
        doSwitch(EObject)
      • caseGet

        public org.objectweb.asm.MethodVisitor caseGet​(Get object)
        Returns the result of interpreting the object as an instance of 'Get'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGet in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Get'.
        See Also:
        doSwitch(EObject)
      • caseGetTrans

        public org.objectweb.asm.MethodVisitor caseGetTrans​(GetTrans object)
        Returns the result of interpreting the object as an instance of 'Get Trans'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGetTrans in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Get Trans'.
        See Also:
        doSwitch(EObject)
      • caseSetStatic

        public org.objectweb.asm.MethodVisitor caseSetStatic​(SetStatic object)
        Returns the result of interpreting the object as an instance of 'Set Static'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseSetStatic in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Set Static'.
        See Also:
        doSwitch(EObject)
      • caseGetStatic

        public org.objectweb.asm.MethodVisitor caseGetStatic​(GetStatic object)
        Returns the result of interpreting the object as an instance of 'Get Static'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGetStatic in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Get Static'.
        See Also:
        doSwitch(EObject)
      • caseFindtype

        public org.objectweb.asm.MethodVisitor caseFindtype​(Findtype object)
        Returns the result of interpreting the object as an instance of 'Findtype'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseFindtype in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Findtype'.
        See Also:
        doSwitch(EObject)
      • caseFindtypeS

        public org.objectweb.asm.MethodVisitor caseFindtypeS​(FindtypeS object)
        Returns the result of interpreting the object as an instance of 'Findtype S'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseFindtypeS in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Findtype S'.
        See Also:
        doSwitch(EObject)
      • caseNew

        public org.objectweb.asm.MethodVisitor caseNew​(New object)
        Returns the result of interpreting the object as an instance of 'New'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseNew in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'New'.
        See Also:
        doSwitch(EObject)
      • caseNewS

        public org.objectweb.asm.MethodVisitor caseNewS​(NewS object)
        Returns the result of interpreting the object as an instance of 'New S'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseNewS in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'New S'.
        See Also:
        doSwitch(EObject)
      • caseDelete

        public org.objectweb.asm.MethodVisitor caseDelete​(Delete object)
        Returns the result of interpreting the object as an instance of 'Delete'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseDelete in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Delete'.
        See Also:
        doSwitch(EObject)
      • caseDup

        public org.objectweb.asm.MethodVisitor caseDup​(Dup object)
        Returns the result of interpreting the object as an instance of 'Dup'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseDup in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Dup'.
        See Also:
        doSwitch(EObject)
      • caseDupX1

        public org.objectweb.asm.MethodVisitor caseDupX1​(DupX1 object)
        Returns the result of interpreting the object as an instance of 'Dup X1'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseDupX1 in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Dup X1'.
        See Also:
        doSwitch(EObject)
      • caseSwap

        public org.objectweb.asm.MethodVisitor caseSwap​(Swap object)
        Returns the result of interpreting the object as an instance of 'Swap'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseSwap in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Swap'.
        See Also:
        doSwitch(EObject)
      • caseSwapX1

        public org.objectweb.asm.MethodVisitor caseSwapX1​(SwapX1 object)
        Returns the result of interpreting the object as an instance of 'Swap X1'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseSwapX1 in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Swap X1'.
        See Also:
        doSwitch(EObject)
      • caseIf

        public org.objectweb.asm.MethodVisitor caseIf​(If object)
        Returns the result of interpreting the object as an instance of 'If'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseIf in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'If'.
        See Also:
        doSwitch(EObject)
      • caseIfn

        public org.objectweb.asm.MethodVisitor caseIfn​(Ifn object)
        Returns the result of interpreting the object as an instance of 'Ifn'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseIfn in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Ifn'.
        See Also:
        doSwitch(EObject)
      • caseGoto

        public org.objectweb.asm.MethodVisitor caseGoto​(Goto object)
        Returns the result of interpreting the object as an instance of 'Goto'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGoto in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Goto'.
        See Also:
        doSwitch(EObject)
      • caseIterate

        public org.objectweb.asm.MethodVisitor caseIterate​(Iterate object)
        Returns the result of interpreting the object as an instance of 'Iterate'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseIterate in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Iterate'.
        See Also:
        doSwitch(EObject)
      • caseEnditerate

        public org.objectweb.asm.MethodVisitor caseEnditerate​(Enditerate object)
        Returns the result of interpreting the object as an instance of 'Enditerate'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseEnditerate in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Enditerate'.
        See Also:
        doSwitch(EObject)
      • caseInvoke

        public org.objectweb.asm.MethodVisitor caseInvoke​(Invoke object)
        Returns the result of interpreting the object as an instance of 'Invoke'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInvoke in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Invoke'.
        See Also:
        doSwitch(EObject)
      • caseInvokeSuper

        public org.objectweb.asm.MethodVisitor caseInvokeSuper​(InvokeSuper object)
        Returns the result of interpreting the object as an instance of 'Invoke Super'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInvokeSuper in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Invoke Super'.
        See Also:
        doSwitch(EObject)
      • caseInvokeStatic

        public org.objectweb.asm.MethodVisitor caseInvokeStatic​(InvokeStatic object)
        Returns the result of interpreting the object as an instance of 'Invoke Static'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInvokeStatic in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Invoke Static'.
        See Also:
        doSwitch(EObject)
      • caseAllinst

        public org.objectweb.asm.MethodVisitor caseAllinst​(Allinst object)
        Returns the result of interpreting the object as an instance of 'Allinst'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAllinst in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Allinst'.
        See Also:
        doSwitch(EObject)
      • caseAllinstIn

        public org.objectweb.asm.MethodVisitor caseAllinstIn​(AllinstIn object)
        Returns the result of interpreting the object as an instance of 'Allinst In'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAllinstIn in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Allinst In'.
        See Also:
        doSwitch(EObject)
      • caseMatch

        public org.objectweb.asm.MethodVisitor caseMatch​(Match object)
        Returns the result of interpreting the object as an instance of 'Match'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseMatch in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Match'.
        See Also:
        doSwitch(EObject)
      • caseMatchS

        public org.objectweb.asm.MethodVisitor caseMatchS​(MatchS object)
        Returns the result of interpreting the object as an instance of 'Match S'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseMatchS in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Match S'.
        See Also:
        doSwitch(EObject)
      • caseAdd

        public org.objectweb.asm.MethodVisitor caseAdd​(Add object)
        Returns the result of interpreting the object as an instance of 'Add'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAdd in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Add'.
        See Also:
        doSwitch(EObject)
      • caseRemove

        public org.objectweb.asm.MethodVisitor caseRemove​(Remove object)
        Returns the result of interpreting the object as an instance of 'Remove'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseRemove in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Remove'.
        See Also:
        doSwitch(EObject)
      • caseInsert

        public org.objectweb.asm.MethodVisitor caseInsert​(Insert object)
        Returns the result of interpreting the object as an instance of 'Insert'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInsert in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Insert'.
        See Also:
        doSwitch(EObject)
      • caseGetSuper

        public org.objectweb.asm.MethodVisitor caseGetSuper​(GetSuper object)
        Returns the result of interpreting the object as an instance of 'Get Super'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGetSuper in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Get Super'.
        See Also:
        doSwitch(EObject)
      • caseGetenv

        public org.objectweb.asm.MethodVisitor caseGetenv​(Getenv object)
        Returns the result of interpreting the object as an instance of 'Getenv'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGetenv in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Getenv'.
        See Also:
        doSwitch(EObject)
      • caseReturn

        public org.objectweb.asm.MethodVisitor caseReturn​(Return object)
        Returns the result of interpreting the object as an instance of 'Return'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseReturn in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Return'.
        See Also:
        doSwitch(EObject)
      • caseGetcb

        public org.objectweb.asm.MethodVisitor caseGetcb​(Getcb object)
        Returns the result of interpreting the object as an instance of 'Getcb'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGetcb in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Getcb'.
        See Also:
        doSwitch(EObject)
      • caseInvokeAllCbs

        public org.objectweb.asm.MethodVisitor caseInvokeAllCbs​(InvokeAllCbs object)
        Returns the result of interpreting the object as an instance of 'Invoke All Cbs'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInvokeAllCbs in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Invoke All Cbs'.
        See Also:
        doSwitch(EObject)
      • caseInvokeCb

        public org.objectweb.asm.MethodVisitor caseInvokeCb​(InvokeCb object)
        Returns the result of interpreting the object as an instance of 'Invoke Cb'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInvokeCb in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Invoke Cb'.
        See Also:
        doSwitch(EObject)
      • caseInvokeCbS

        public org.objectweb.asm.MethodVisitor caseInvokeCbS​(InvokeCbS object)
        Returns the result of interpreting the object as an instance of 'Invoke Cb S'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseInvokeCbS in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Invoke Cb S'.
        See Also:
        doSwitch(EObject)
      • caseNot

        public org.objectweb.asm.MethodVisitor caseNot​(Not object)
        Returns the result of interpreting the object as an instance of 'Not'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseNot in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Not'.
        See Also:
        doSwitch(EObject)
      • caseAnd

        public org.objectweb.asm.MethodVisitor caseAnd​(And object)
        Returns the result of interpreting the object as an instance of 'And'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAnd in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'And'.
        See Also:
        doSwitch(EObject)
      • caseOr

        public org.objectweb.asm.MethodVisitor caseOr​(Or object)
        Returns the result of interpreting the object as an instance of 'Or'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseOr in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Or'.
        See Also:
        doSwitch(EObject)
      • caseXor

        public org.objectweb.asm.MethodVisitor caseXor​(Xor object)
        Returns the result of interpreting the object as an instance of 'Xor'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseXor in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Xor'.
        See Also:
        doSwitch(EObject)
      • caseImplies

        public org.objectweb.asm.MethodVisitor caseImplies​(Implies object)
        Returns the result of interpreting the object as an instance of 'Implies'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseImplies in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Implies'.
        See Also:
        doSwitch(EObject)
      • caseIfte

        public org.objectweb.asm.MethodVisitor caseIfte​(Ifte object)
        Returns the result of interpreting the object as an instance of 'Ifte'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseIfte in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Ifte'.
        See Also:
        doSwitch(EObject)
      • caseIsnull

        public org.objectweb.asm.MethodVisitor caseIsnull​(Isnull object)
        Returns the result of interpreting the object as an instance of 'Isnull'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseIsnull in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Isnull'.
        See Also:
        doSwitch(EObject)
      • caseGetenvtype

        public org.objectweb.asm.MethodVisitor caseGetenvtype​(Getenvtype object)
        Returns the result of interpreting the object as an instance of 'Getenvtype'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseGetenvtype in class EmftvmSwitch<org.objectweb.asm.MethodVisitor>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Getenvtype'.
        See Also:
        doSwitch(EObject)
      • generateSetPc

        protected void generateSetPc​(Instruction object)
        Generates frame.setPc(pc) for object, iff hasMonitor is false.
        Parameters:
        object - the next instruction
      • generateSubFrame

        protected void generateSubFrame​(java.lang.String opname)
        Generates bytecode that creates a new sub-StackFrame.
        Parameters:
        opname - the operation name (for debugger)
      • generateBoxing

        protected void generateBoxing​(java.lang.Class<?> cls,
                                      java.lang.Class<?> selfCls)
        Generates boxing code for a value of type cls, if necessary.
        Parameters:
        cls - the value class
        selfCls - the class of self
      • generateUnboxing

        protected void generateUnboxing​(java.lang.Class<?> cls)
        Generates unboxing code for a value of type cls, if necessary.
        Parameters:
        cls - the value class
      • generatePushInt

        protected void generatePushInt​(int value)
        Generates an optimised instruction for pushing a constant integer value onto the stack.
        Parameters:
        value - the constant integer value to push
      • label

        protected void label​(org.objectweb.asm.Label label)
        Inserts a label.
        Parameters:
        label - the label to insert
      • aload

        protected void aload​(int var)
        Generates an ALOAD instruction.
        Parameters:
        var - the index of the local variable to load
      • astore

        protected void astore​(int var)
        Generates an ASTORE instruction.
        Parameters:
        var - the index of the local variable to store
      • new_

        protected void new_​(java.lang.Class<?> cls)
      • checkcast

        protected void checkcast​(java.lang.Class<?> cls)
      • instanceof_

        protected void instanceof_​(java.lang.Class<?> cls)
      • anewarray

        protected void anewarray​(java.lang.Class<?> cls)
      • dup

        protected void dup()
      • dup_x1

        protected void dup_x1()
      • dup_x2

        protected void dup_x2()
      • pop

        protected void pop()
      • swap

        protected void swap()
      • ldc

        protected void ldc​(java.lang.Object object)
      • aconst_null

        protected void aconst_null()
      • aastore

        protected void aastore()
      • areturn

        protected void areturn()
      • iconst_1

        protected void iconst_1()
      • iconst_0

        protected void iconst_0()
      • invoke

        protected void invoke​(int opcode,
                              java.lang.Class<?> owner,
                              java.lang.String name,
                              java.lang.Object retType,
                              java.lang.Object... argTypes)
        Generates a method invocation instruction.
        Parameters:
        opcode - the method invocation instruction opcode (e.g. INVOKEVIRTUAL)
        owner - the method owner class
        name - the method name
        retType - the method return type Class or Type
        argTypes - the method argument type Classes or Types
      • invokeIface

        protected void invokeIface​(java.lang.Class<?> owner,
                                   java.lang.String name,
                                   java.lang.Object retType,
                                   java.lang.Object... argTypes)
      • invokeVirt

        protected void invokeVirt​(java.lang.Class<?> owner,
                                  java.lang.String name,
                                  java.lang.Object retType,
                                  java.lang.Object... argTypes)
      • invokeStat

        protected void invokeStat​(java.lang.Class<?> owner,
                                  java.lang.String name,
                                  java.lang.Object retType,
                                  java.lang.Object... argTypes)
      • invokeSpec

        protected void invokeSpec​(java.lang.Class<?> owner,
                                  java.lang.String name,
                                  java.lang.Object retClass,
                                  java.lang.Object... argClasses)
      • invokeCons

        protected void invokeCons​(java.lang.Class<?> owner,
                                  java.lang.Object... argTypes)
      • field

        protected void field​(int opcode,
                             java.lang.Class<?> owner,
                             java.lang.String name,
                             java.lang.Object type)
        Generates a field access instruction.
        Parameters:
        opcode - the field access opcode (e.g. GETFIELD)
        owner - the field owner class
        name - the field name
        type - the field Class or Type
      • getField

        protected void getField​(java.lang.Class<?> owner,
                                java.lang.String name,
                                java.lang.Object type)
      • putField

        protected void putField​(java.lang.Class<?> owner,
                                java.lang.String name,
                                java.lang.Object type)
      • getStatic

        protected void getStatic​(java.lang.Class<?> owner,
                                 java.lang.String name,
                                 java.lang.Object type)
      • putStatic

        protected void putStatic​(java.lang.Class<?> owner,
                                 java.lang.String name,
                                 java.lang.Object type)
      • ifne

        protected void ifne​(org.objectweb.asm.Label label)
      • ifeq

        protected void ifeq​(org.objectweb.asm.Label label)
      • goto_

        protected void goto_​(org.objectweb.asm.Label label)
      • ifnull

        protected void ifnull​(org.objectweb.asm.Label label)
      • ifnonnull

        protected void ifnonnull​(org.objectweb.asm.Label label)
      • athrow

        protected void athrow()
      • localVariable

        protected void localVariable​(java.lang.String name,
                                     java.lang.Class<?> type,
                                     org.objectweb.asm.Label start,
                                     org.objectweb.asm.Label end,
                                     int index)
        Generates a local variable table entry.
        Parameters:
        name - the name of a local variable.
        type - the type of this local variable.
        start - the first instruction corresponding to the scope of this local variable (inclusive).
        end - the last instruction corresponding to the scope of this local variable (exclusive).
        index - the local variable's index.
        Throws:
        java.lang.IllegalArgumentException - if one of the labels has not already been visited by this visitor (by the MethodVisitor.visitLabel(org.objectweb.asm.Label) method).
      • tryCatchBlock

        protected void tryCatchBlock​(org.objectweb.asm.Label start,
                                     org.objectweb.asm.Label end,
                                     org.objectweb.asm.Label handler,
                                     java.lang.Class<?> type)
        Generates a try-catch block.
        Parameters:
        start - beginning of the exception handler's scope (inclusive).
        end - end of the exception handler's scope (exclusive).
        handler - beginning of the exception handler's code.
        type - internal name of the type of exceptions handled by the handler, or null to catch any exceptions (for "finally" blocks).
        Throws:
        java.lang.IllegalArgumentException - if one of the labels has already been visited by this visitor (by the MethodVisitor.visitLabel(org.objectweb.asm.Label) method).
      • nextInstruction

        protected Instruction nextInstruction​(Instruction instruction)
        Returns the next instruction for the given instruction, or null.
        Parameters:
        instruction - the instruction
        Returns:
        the next instruction for the given instruction, or null