Class LoadLocalInstruction


  • public class LoadLocalInstruction
    extends IRInstruction
    A load from a local variable slot, used during lifting before SSA conversion.
    • Constructor Detail

      • LoadLocalInstruction

        public LoadLocalInstruction​(SSAValue result,
                                    int localIndex)
        Creates a local load.
        Parameters:
        result - the SSA value receiving the loaded value
        localIndex - the local variable slot to read
    • Method Detail

      • getLocalIndex

        public int getLocalIndex()
        Returns:
        the local index
      • replaceOperand

        public void replaceOperand​(Value oldValue,
                                   Value newValue)
        Description copied from class: IRInstruction
        Replaces an operand value with a new value.
        Specified by:
        replaceOperand in class IRInstruction
        Parameters:
        oldValue - the value to replace
        newValue - the replacement value
      • accept

        public <T> T accept​(IRVisitor<T> visitor)
        Description copied from class: IRInstruction
        Accepts a visitor for this instruction.
        Specified by:
        accept in class IRInstruction
        Type Parameters:
        T - the return type
        Parameters:
        visitor - the visitor to accept
        Returns:
        the visitor result
      • copyWithNewOperands

        public IRInstruction copyWithNewOperands​(SSAValue newResult,
                                                 List<Value> newOperands)
        Description copied from class: IRInstruction
        Creates a copy of this instruction with new result and operands.
        Overrides:
        copyWithNewOperands in class IRInstruction
        Parameters:
        newResult - the new result value (may be null)
        newOperands - the new operand values
        Returns:
        a copy of this instruction, or null if copying not supported