class InsnList implements Iterable<AbstractInsnNode> {

  public int indexOf(final AbstractInsnNode insnNode) {
    if (cache == null) {
      cache = toArray();
    }
    return insnNode.index;
  }

}