Package jminusminus

Class NLIRNewArray


class NLIRNewArray extends NLIRInstruction
LIR instruction representing JVM array creation instructions.
  • Constructor Details

    • NLIRNewArray

      public NLIRNewArray(NBasicBlock block, int id, int opcode, int dim, String sType, String lType)
      Constructs an NLIRNewArray object.
      Parameters:
      block - enclosing block.
      id - identifier of the instruction.
      opcode - JVM opcode for the instruction.
      dim - dimension of the array.
      sType - type (short name) of the array.
      lType - type (long name) of the array.
  • Method Details

    • toSpim

      public void toSpim(PrintWriter out)
      Translates this LIR instruction into SPIM and writes it out to the specified output stream.
      Overrides:
      toSpim in class NLIRInstruction
      Parameters:
      out - output stream for SPIM code.
    • toString

      public String toString()
      Returns a string representation of this instruction.
      Overrides:
      toString in class NLIRInstruction
      Returns:
      a string representation of this instruction.