Interface IRVisitor<T>

  • All Known Implementing Classes:
    AbstractIRVisitor

    public interface IRVisitor<T>
    Visitor interface for IR instructions.
    • Method Detail

      • visitPhi

        T visitPhi​(PhiInstruction phi)
        Visits a phi that merges values arriving from several predecessors.
        Parameters:
        phi - the instruction
        Returns:
        the visitor result
      • visitBinaryOp

        T visitBinaryOp​(BinaryOpInstruction binaryOp)
        Visits a two-operand arithmetic, logical, or comparison instruction.
        Parameters:
        binaryOp - the instruction
        Returns:
        the visitor result
      • visitUnaryOp

        T visitUnaryOp​(UnaryOpInstruction unaryOp)
        Visits a one-operand instruction such as a negation or a numeric conversion.
        Parameters:
        unaryOp - the instruction
        Returns:
        the visitor result
      • visitBranch

        T visitBranch​(BranchInstruction branch)
        Visits a conditional branch and its two targets.
        Parameters:
        branch - the instruction
        Returns:
        the visitor result
      • visitSwitch

        T visitSwitch​(SwitchInstruction switchInstr)
        Visits a multi-way branch on an int key.
        Parameters:
        switchInstr - the instruction
        Returns:
        the visitor result
      • visitReturn

        T visitReturn​(ReturnInstruction returnInstr)
        Visits a return, with or without a value.
        Parameters:
        returnInstr - the instruction
        Returns:
        the visitor result
      • visitLoadLocal

        T visitLoadLocal​(LoadLocalInstruction loadLocal)
        Visits a read of a local variable slot.
        Parameters:
        loadLocal - the instruction
        Returns:
        the visitor result
      • visitStoreLocal

        T visitStoreLocal​(StoreLocalInstruction storeLocal)
        Visits a write to a local variable slot.
        Parameters:
        storeLocal - the instruction
        Returns:
        the visitor result
      • visitInvoke

        T visitInvoke​(InvokeInstruction invoke)
        Visits a method invocation.
        Parameters:
        invoke - the instruction
        Returns:
        the visitor result
      • visitNew

        T visitNew​(NewInstruction newInstr)
        Visits an uninitialized object allocation, before its constructor call.
        Parameters:
        newInstr - the instruction
        Returns:
        the visitor result
      • visitNewArray

        T visitNewArray​(NewArrayInstruction newArray)
        Visits an array allocation.
        Parameters:
        newArray - the instruction
        Returns:
        the visitor result
      • visitCopy

        T visitCopy​(CopyInstruction copy)
        Visits a copy of one SSA value into another.
        Parameters:
        copy - the instruction
        Returns:
        the visitor result
      • visitConstant

        T visitConstant​(ConstantInstruction constant)
        Visits a constant load.
        Parameters:
        constant - the instruction
        Returns:
        the visitor result
      • visitFieldAccess

        T visitFieldAccess​(FieldAccessInstruction fieldAccess)
        Visits a field read or write.
        Parameters:
        fieldAccess - the instruction
        Returns:
        the visitor result
      • visitArrayAccess

        T visitArrayAccess​(ArrayAccessInstruction arrayAccess)
        Visits an array element read or write.
        Parameters:
        arrayAccess - the instruction
        Returns:
        the visitor result
      • visitTypeCheck

        T visitTypeCheck​(TypeCheckInstruction typeCheck)
        Visits an instanceof test or a checkcast.
        Parameters:
        typeCheck - the instruction
        Returns:
        the visitor result
      • visitSimple

        T visitSimple​(SimpleInstruction simple)
        Visits a single-operand instruction: arraylength, a monitor op, throw, goto, or catch.
        Parameters:
        simple - the instruction
        Returns:
        the visitor result