private ByteBlockList getBlockList() {
    BytecodeArray bytes = method.getCode();
    ByteBlock[] bbs = new ByteBlock[bytes.size()];
    int count = 0;

    for (int at = 0, next; /*at*/ ; at = next) {
      next = Bits.findFirst(blockSet, at + 1);
      if (next < 0) {
        break;
      }

      if (Bits.get(liveSet, at)) {
        /*
         * Search backward for the branch or throwing
         * instruction at the end of this block, if any. If
         * there isn't any, then "next" is the sole target.
         */
        IntList targets = null;
        int targetsAt = -1;
        ByteCatchList blockCatches;

        for (int i = next - 1; i >= at; i--) {
          targets = targetLists[i];
          if (targets != null) {
            targetsAt = i;
            break;
          }
        }

        if (targets == null) {
          targets = IntList.makeImmutable(next);
          blockCatches = ByteCatchList.EMPTY;
        } else {
          blockCatches = catchLists[targetsAt];
          if (blockCatches == null) {
            blockCatches = ByteCatchList.EMPTY;
          }
        }

        bbs[count] = new ByteBlock(at, at, next, targets, blockCatches);
        count++;
      }
    }

    ByteBlockList result = new ByteBlockList(count);
    for (int i = 0; i < count; i++) {
      result.set(i, bbs[i]);
    }

    return result;
  }
Extracts the list of basic blocks from the bit sets.

@return {@code non-null;} the list of basic blocks
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/BasicBlocker.java