private void addLabelIndex(int label, int index) {
    int origSz = labelToIndex.size();

    for (int i = 0; i <= (label - origSz); i++) {
      labelToIndex.add(-1);
    }

    labelToIndex.set(label, index);
  }
Adds a label and index to the label-to-index mapping.

@param label new label
@param index index of block.
android/android_framework/dex-maker/src/main/java/com/android/dx/util/LabeledList.java