public void addAssignment(Insn insn, RegisterSpec spec) {
    throwIfImmutable();

    if (insn == null) {
      throw new NullPointerException("insn == null");
    }

    if (spec == null) {
      throw new NullPointerException("spec == null");
    }

    insnAssignments.put(insn, spec);
  }
Adds an assignment association for the given instruction and register spec. This throws an
exception if the instruction doesn't actually perform a named variable assignment.

<p><b>Note:</b> Although the instruction contains its own spec for the result, it still needs
to be passed in explicitly to this method, since the spec that is stored here should always
have a simple type and the one in the instruction can be an arbitrary {@link TypeBearer} (such
as a constant value).

@param insn {@code non-null;} the instruction in question
@param spec {@code non-null;} the associated register spec
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/code/LocalVariableInfo.java