Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Aug 14, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 14, 2025 08:42
@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Aug 14, 2025
Copy link
Member Author

Boshen commented Aug 14, 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the minifier's side-effect analysis by marking more global constructors as side-effect free. The changes improve the test infrastructure and extend the list of built-in constructors that are considered safe to optimize away when they don't have observable side effects.

  • Replaces manual global variable tracking with the javascript-globals library for more comprehensive coverage
  • Adds side-effect free handling for built-in constructors like Set, Map, Boolean, Error, etc.
  • Refactors test utilities to use static string references instead of owned String values

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_minifier/tests/ecmascript/may_have_side_effects.rs Updates test infrastructure to use javascript-globals and adds comprehensive tests for new expression side effects
crates/oxc_minifier/Cargo.toml Adds dependency on javascript-globals library
crates/oxc_ecmascript/src/side_effects/may_have_side_effects.rs Implements side-effect free handling for built-in global constructors

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 14, 2025

CodSpeed Instrumentation Performance Report

Merging #13082 will not alter performance

Comparing 08-14-feat_minifier_mark_more_global_constructors_as_side-effect_free (af5657b) with main (e190ee5)

Summary

✅ 34 untouched benchmarks

@Boshen Boshen merged commit fe4589b into main Aug 14, 2025
27 checks passed
@Boshen Boshen deleted the 08-14-feat_minifier_mark_more_global_constructors_as_side-effect_free branch August 14, 2025 08:54
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.

2 participants