Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Aug 29, 2025

Remove pure function calls when the return value is not used.

var foo = () => 1;
foo(), foo() // these can be removed

close #13027

@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Aug 29, 2025
Copy link
Member Author

sapphi-red commented Aug 29, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 29, 2025

CodSpeed Instrumentation Performance Report

Merging #13403 will not alter performance

Comparing 08-30-feat_minifier_remove_pure_function_calls_when_the_return_value_is_not_used (2d0414d) with main (5d74332)1

Summary

✅ 38 untouched benchmarks

Footnotes

  1. No successful run was found on main (2d0414d) during the generation of this report, so 5d74332 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Aug 30, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 30, 2025

Merge activity

…ot used (#13403)

Remove pure function calls when the return value is not used.
```js
var foo = () => 1;
foo(), foo() // these can be removed
```

close #13027
@graphite-app graphite-app bot force-pushed the 08-30-feat_ecmascript_support_mayhavesideeffects_for_statements branch from 57dafa2 to c557854 Compare August 30, 2025 04:15
@graphite-app graphite-app bot force-pushed the 08-30-feat_minifier_remove_pure_function_calls_when_the_return_value_is_not_used branch from d68f127 to 2d0414d Compare August 30, 2025 04:16
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 30, 2025
Base automatically changed from 08-30-feat_ecmascript_support_mayhavesideeffects_for_statements to main August 30, 2025 04:20
@graphite-app graphite-app bot merged commit 2d0414d into main Aug 30, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 08-30-feat_minifier_remove_pure_function_calls_when_the_return_value_is_not_used branch August 30, 2025 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minifier: does not eliminate unnecessary side-effect free function call

2 participants