code: private void removeUnreferencedFunctionArgs(Scope fparamScope) {
      // Notice that removing unreferenced function args breaks
      // Function.prototype.length. In advanced mode, we don't really care
      // about this: we consider "length" the equivalent of reflecting on
      // the function's lexical source.
      //
      // Rather than create a new option for this, we assume that if the user
      // is removing globals, then it's OK to remove unused function args.
      //
      // See http://blickly.github.io/closure-compiler-issues/#253
      if (!removeGlobals) {
        return;
      }
  
      Node function = fparamScope.getRootNode();
      checkState(function.isFunction());
      if (NodeUtil.isGetOrSetKey(function.getParent())) {
        // The parameters object literal setters can not be removed.
        return;
      }
  
      Node argList = NodeUtil.getFunctionParameters(function);
      // Strip as many unreferenced args off the end of the function declaration as possible.
      maybeRemoveUnusedTrailingParameters(argList, fparamScope);
  
      // Mark any remaining unused parameters are unused to OptimizeParameters can try to remove
      // them.
      markUnusedParameters(argList, fparamScope);
    }
docs: Removes unreferenced arguments from a function declaration and when
  possible the function's callSites.
  
  @param fparamScope The function parameter