private void isLinked() { VM.assert(prev.next == this, "is_linked: failure (1)"); VM.assert(next.prev == this, "is_linked: failure (2)"); } private void isBackwardLinked() { VM.assert(prev.next == this, "is_backward_linked: failure (1)");  VM.assert(next == null || next.prev == this, "is_backward_linked: failure (2)"); } private void isForwardLinked() {  VM.assert(prev == null || prev.next == this, "is_forward_linked: failure (1)"); VM.assert(next.prev == this, "is_forward_linked (2)"); } private void isNotLinked() { VM.assert(prev == null && next == null, "is_not_linked: failure (1)"); }
  public OPT_Instruction remove() {    if (OPT_IR.PARANOID) {      isLinked();      VM.assert(!isBbFirst() && !isBbLast(), 		"Removal of first/last instructions in block not supported");    }    // Splice this out of instr list    OPT_Instruction Prev = prev, Next = next;    Prev.next = Next;    Next.prev = Prev;    next = null;    prev = null;    return Prev;  }  /*   * Helper routines to verify instruction list invariants.   * Invocations to these functions are guarded by OPT_IR.PARANOID and thus    * the calls to VM.Assert don't need to be guarded by VM.VerifyAssertions.   */  private void isLinked() {    VM.assert(prev.next == this, "is_linked: failure (1)");    VM.assert(next.prev == this, "is_linked: failure (2)");  }  private void isBackwardLinked() {    VM.assert(prev.next == this, "is_backward_linked: failure (1)");    // OK if next is null (IR under construction)    VM.assert(next == null || next.prev == this, 	      "is_backward_linked: failure (2)");  }  private void isForwardLinked() {    // OK if prev is null (IR under construction)    VM.assert(prev == null || prev.next == this, 	      "is_forward_linked: failure (1)");    VM.assert(next.prev == this, "is_forward_linked (2)");  }  private void isNotLinked() {    VM.assert(prev == null && next == null, "is_not_linked: failure (1)");  }