private void calculateInsnsIfNecessary() {
    if (insns != null) {
      return;
    }

    RegisterSpecList registers = getRegisters();
    int sz = registers.size();

    insns = new SimpleInsn[sz];

    for (int i = 0, outAt = 0; i < sz; i++) {
      RegisterSpec src = registers.get(i);
      insns[i] = moveInsnFor(src, outAt);
      outAt += src.getCategory();
    }
  }
Helper for {@link #codeSize} and {@link #writeTo} which sets up {@link #insns} if not already
done.
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/HighRegisterPrefix.java