void updateOneDefinition(SsaInsn insn, RegisterSpec oldResult) {
    if (definitionList == null) return;

    if (oldResult != null) {
      int reg = oldResult.getReg();
      definitionList[reg] = null;
    }

    RegisterSpec resultReg = insn.getResult();

    if (resultReg != null) {
      int reg = resultReg.getReg();

      if (definitionList[reg] != null) {
        throw new RuntimeException("Duplicate add of insn");
      } else {
        definitionList[resultReg.getReg()] = insn;
      }
    }
  }
Updates a single definition.

@param insn {@code non-null;} insn who's result should be recorded as a definition
@param oldResult {@code null-ok;} a previous result that should be no longer considered a
    definition by this insn
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/SsaMethod.java