Repository: rollup/rollup
File: src/ast/nodes/shared/FunctionBase.ts (TypeScript)

Code before:
				return true;
			}
		}
		for (const parameter of this.params) {
			if (parameter.hasEffects(context)) return true;
		}
		return false;
	}

	/**
	 * If the function (expression or declaration) is only used as function calls
	 */
	protected onlyFunctionCallUsed(): boolean {
		let variable: Variable | null = null;
		if (this.parent.type === NodeType.VariableDeclarator) {
			variable = (this.parent as VariableDeclarator).id.variable ?? null;
		}
		if (this.parent.type === NodeType.ExportDefaultDeclaration) {
			variable = (this.parent as ExportDefaultDeclaration).variable;
		}
		return variable?.getOnlyFunctionCallUsed() ?? false;
	}

	private functionParametersOptimized = false;
	include(context: InclusionContext, includeChildrenRecursively: IncludeChildren): void {
		const shoulOptimizeFunctionParameters = this.onlyFunctionCallUsed();
		if (shoulOptimizeFunctionParameters) {
			this.applyFunctionParameterOptimization();
		} else if (this.functionParametersOptimized) {
			this.deoptimizeFunctionParameters();
		}
		this.functionParametersOptimized = shoulOptimizeFunctionParameters;

		if (!this.deoptimized) this.applyDeoptimizations();
		this.included = true;
		const { brokenFlow } = context;
		context.brokenFlow = false;
		this.body.include(context, includeChildrenRecursively);
		context.brokenFlow = brokenFlow;
	}

	includeCallArguments(
		context: InclusionContext,
		parameters: readonly (ExpressionEntity | SpreadElement)[]
	): void {
		this.scope.includeCallArguments(context, parameters);
	}

	initialise(): void {
		super.initialise();
		if (this.body instanceof BlockStatement) {

Review comment (performance):
Hey, I can contribute a spelling fix, at least 😉 

```suggestion
		const shouldOptimizeFunctionParameters = this.onlyFunctionCallUsed();
```

Code after:
				return true;
			}
		}
		for (const parameter of this.params) {
			if (parameter.hasEffects(context)) return true;
		}
		return false;
	}

	/**
	 * If the function (expression or declaration) is only used as function calls
	 */
	protected onlyFunctionCallUsed(): boolean {
		let variable: Variable | null = null;
		if (this.parent.type === NodeType.VariableDeclarator) {
			variable = (this.parent as VariableDeclarator).id.variable ?? null;
		}
		if (this.parent.type === NodeType.ExportDefaultDeclaration) {
			variable = (this.parent as ExportDefaultDeclaration).variable;
		}
		return variable?.getOnlyFunctionCallUsed() ?? false;
	}

	private functionParametersOptimized = false;
	include(context: InclusionContext, includeChildrenRecursively: IncludeChildren): void {
		const shouldOptimizeFunctionParameters = this.onlyFunctionCallUsed();
		if (shouldOptimizeFunctionParameters) {
			this.applyFunctionParameterOptimization();
		} else if (this.functionParametersOptimized) {
			this.deoptimizeFunctionParameters();
		}
		this.functionParametersOptimized = shouldOptimizeFunctionParameters;

		if (!this.deoptimized) this.applyDeoptimizations();
		this.included = true;
		const { brokenFlow } = context;
		context.brokenFlow = false;
		this.body.include(context, includeChildrenRecursively);
		context.brokenFlow = brokenFlow;
	}

	includeCallArguments(
		context: InclusionContext,
		parameters: readonly (ExpressionEntity | SpreadElement)[]
	): void {
		this.scope.includeCallArguments(context, parameters);
	}

	initialise(): void {
		super.initialise();
		if (this.body instanceof BlockStatement) {