public void processWorkSet(int[] workSet, Visitor visitor) {
    if (visitor == null) {
      throw new NullPointerException("visitor == null");
    }

    for (; ; ) {
      int offset = Bits.findFirst(workSet, 0);
      if (offset < 0) {
        break;
      }
      Bits.clear(workSet, offset);
      parseInstruction(offset, visitor);
      visitor.setPreviousOffset(offset);
    }
  }
Processes the given "work set" by repeatedly finding the lowest bit in the set, clearing it,
and parsing and visiting the instruction at the indicated offset (that is, the bit index),
repeating until the work set is empty. It is expected that the visitor will regularly set new
bits in the work set during the process.

@param workSet {@code non-null;} the work set to process
@param visitor {@code non-null;} visitor to call back to for each instruction
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/BytecodeArray.java