code: private void movePrototypeDotMethodAssignment(Node destParent, Node functionNode) {
      checkState(functionNode.isFunction(), functionNode);
      Node assignNode = functionNode.getParent();
      checkState(assignNode.isAssign() && functionNode.isSecondChildOf(assignNode), assignNode);
      Node definitionStatement = assignNode.getParent();
      checkState(definitionStatement.isExprResult(), assignNode);
  
      if (noStubFunctions) {
        // Remove the definition statement from its current location
        Node assignStatementParent = definitionStatement.getParent();
        definitionStatement.detach();
        compiler.reportChangeToEnclosingScope(assignStatementParent);
  
        // Prepend definition to new chunk
        // Foo.prototype.propName = function() {};
        destParent.addChildToFront(definitionStatement);
        compiler.reportChangeToEnclosingScope(destParent);
      } else {
        int stubId = idGenerator.newId();
  
        // replace function definition with temporary placeholder so we can clone the whole
        // assignment statement without cloning the function definition itself.
        Node originalDefinitionPlaceholder = astFactory.createEmpty();
        functionNode.replaceWith(originalDefinitionPlaceholder);
        Node newDefinitionStatement = definitionStatement.cloneTree();
        Node newDefinitionPlaceholder =
            newDefinitionStatement // EXPR_RESULT
                .getOnlyChild() // ASSIGN
                .getLastChild(); // EMPTY RHS node
  
        // convert original assignment statement to
        // owner.prototype.propName = JSCompiler_stubMethod(0);
        Node stubCall = createStubCall(functionNode, stubId);
        originalDefinitionPlaceholder.replaceWith(stubCall);
        compiler.reportChangeToEnclosingScope(definitionStatement);
  
        // Prepend new definition to new chunk
        // Foo.prototype.propName = JSCompiler_unstubMethod(0, function() {});
        Node unstubCall = createUnstubCall(functionNode, stubId);
        newDefinitionPlaceholder.replaceWith(unstubCall);
        destParent.addChildToFront(newDefinitionStatement);
        compiler.reportChangeToEnclosingScope(destParent);
      }
    }
docs: Move a property defined by assignment to `.prototype` or `.prototype.propName`.
  
  <pre><code>
  Foo.prototype.propName = function() {};
  </code></pre>