code: private CanInlineResult canInlineReferenceDirectly(
        Reference ref, Node fnNode, Set<String> namesToAlias) {
      if (!isDirectCallNodeReplacementPossible(fnNode)) {
        return CanInlineResult.NO;
      }
  
      // CALL NODE: [ NAME, ARG1, ARG2, ... ]
      Node callNode = ref.callNode;
      Node cArg = callNode.getSecondChild();
  
      // Functions called via 'call' and 'apply' have a this-object as
      // the first parameter, but this is not part of the called function's
      // parameter list.
      if (!callNode.getFirstChild().isName()) {
        if (NodeUtil.isFunctionObjectCall(callNode)) {
          // TODO(johnlenz): Support replace this with a value.
          if (cArg == null || !cArg.isThis()) {
            return CanInlineResult.NO;
          }
          cArg = cArg.getNext();
        } else {
          // ".apply" call should be filtered before this.
          checkState(!NodeUtil.isFunctionObjectApply(callNode));
        }
      }
  
      ImmutableMap<String, Node> args =
          FunctionArgumentInjector.getFunctionCallParameterMap(
              fnNode, callNode, this.throwawayNameSupplier);
      boolean hasArgs = !args.isEmpty();
      if (hasArgs) {
        // Limit the inlining
        Set<String> allNamesToAlias = new HashSet<>(namesToAlias);
        FunctionArgumentInjector.maybeAddTempsForCallArguments(
            compiler, fnNode, args, allNamesToAlias, compiler.getCodingConvention());
        if (!allNamesToAlias.isEmpty()) {
          return CanInlineResult.NO;
        }
      }
  
      return CanInlineResult.YES;
    }
docs: Determines whether a function can be inlined at a particular call site.
  There are several criteria that the function and reference must hold in
  order for the functions to be inlined:
  1) If a call's arguments have side effects,
  the corresponding argument in the function must only be referenced once.
  For instance, this will not be inlined:
  <pre>
  function foo(a) { return a + a }
  x = foo(i++);
  </pre>