public void insertTwin(Instruction inst,Instruction twin){
  ListIterator<GCIRMapElement> iter=list.listIterator();
  while (iter.hasNext()) {
    GCIRMapElement newPtr=iter.next();
    if (newPtr.getInstruction() == inst) {
      iter.add(newPtr.createTwin(twin));
      return;
    }
  }
  throw new OptimizingCompilerException("GCIRMap.createTwin: " + inst + " not found");
}

public void insertTwin ( Instruction inst , Instruction twin ) { ListIterator < GCIRMapElement > iter = list . listIterator ( ) ; while ( iter . hasNext ( ) ) { GCIRMapElement newPtr = iter . next ( ) ; if ( newPtr . getInstruction ( ) == inst ) { iter . add ( newPtr . createTwin ( twin ) ) ; return ; } } throw new OptimizingCompilerException ( "GCIRMap.createTwin: " + inst + " not found" ) ; }
this method inserts an entry for a " twin " instruction immediately after the original entry . if the instruction is not found in the gc map an exception is thrown .
