Class LocalList

All Implemented Interfaces:
ToHuman

public final class LocalList extends FixedSizeList
List of local variables. Each local variable entry indicates a range of code which it is valid for, a register number, a name, and a type.
  • Field Details

    • EMPTY

      public static final LocalList EMPTY
      non-null; empty instance
  • Constructor Details

    • LocalList

      public LocalList(int size)
      Constructs an instance. All indices initially contain null.
      Parameters:
      size - >= 0; the size of the list
  • Method Details

    • get

      public LocalList.Entry get(int n)
      Gets the element at the given index. It is an error to call this with the index for an element which was never set; if you do that, this will throw NullPointerException.
      Parameters:
      n - >= 0, < size(); which index
      Returns:
      non-null; element at that index
    • set

      public void set(int n, LocalList.Entry entry)
      Sets the entry at the given index.
      Parameters:
      n - >= 0, < size(); which index
      entry - non-null; the entry to set at n
    • debugPrint

      public void debugPrint(PrintStream out, String prefix)
      Does a human-friendly dump of this instance.
      Parameters:
      out - non-null; where to dump
      prefix - non-null; prefix to attach to each line of output
    • make

      public static LocalList make(DalvInsnList insns)
      Constructs an instance for the given method, based on the given block order and intermediate local information.
      Parameters:
      insns - non-null; instructions to convert
      Returns:
      non-null; the constructed list