Class StoreLocalInstruction


  • public class StoreLocalInstruction
    extends IRInstruction
    A store to a local variable slot, used during lifting before SSA conversion.
    • Constructor Detail

      • StoreLocalInstruction

        public StoreLocalInstruction​(int localIndex,
                                     Value value)
        Creates a local store and registers a use of an SSA value.
        Parameters:
        localIndex - the local variable slot to write
        value - the value to store
    • Method Detail

      • getLocalIndex

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

        public Value getValue()
        Returns:
        the value
      • 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