protected final RegisterSpec getLocalTarget(boolean isMove) {
    if (localTarget == null) {
      return null;
    }

    if (resultCount != 1) {
      throw new SimException(
          "local target with " + ((resultCount == 0) ? "no" : "multiple") + " results");
    }

    TypeBearer result = results[0];
    Type resultType = result.getType();
    Type localType = localTarget.getType();

    if (resultType == localType) {
      /*
       * If this is to be a move operation and the result is a
       * known value, make the returned localTarget embody that
       * value.
       */
      if (isMove) {
        return localTarget.withType(result);
      } else {
        return localTarget;
      }
    }

    if (!Merger.isPossiblyAssignableFrom(localType, resultType)) {
      // The result and local types are inconsistent. Complain!
      throwLocalMismatch(resultType, localType);
      return null;
    }

    if (localType == Type.OBJECT) {
      /*
       * The result type is more specific than the local type,
       * so use that instead.
       */
      localTarget = localTarget.withType(result);
    }

    return localTarget;
  }
Gets the target local register spec of the current operation, if any. The local target spec is
the combination of the values indicated by a previous call to {@link #localTarget} with the
type of what should be the sole result set by a call to {@link #setResult} (or the combination
{@link #clearResult} then {@link #addResult}.

@param isMove {@code true} if the operation being performed on the local is a move. This will
    cause constant values to be propagated to the returned local
@return {@code null-ok;} the salient register spec or {@code null} if no local target was set
    since the last time {@link #clearArgs} was called
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/BaseMachine.java