private void assignAddresses() {
    int address = 0;
    int size = insns.size();

    for (int i = 0; i < size; i++) {
      DalvInsn insn = insns.get(i);
      insn.setAddress(address);
      address += insn.codeSize();
    }
  }
Helper for {@link #assignAddressesAndFixBranches}, which assigns an address to each
instruction, in order.
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/OutputFinisher.java