Class NewInstruction


  • public class NewInstruction
    extends IRInstruction
    An uninitialized object allocation (the new opcode, before the constructor call).
    • Constructor Detail

      • NewInstruction

        public NewInstruction​(SSAValue result,
                              String className)
        Creates an object allocation.
        Parameters:
        result - the SSA value receiving the new object reference
        className - the internal name of the class to instantiate
    • Method Detail

      • getClassName

        public String getClassName()
        Returns:
        the class name
      • 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