Skip to content

test(minifier): simplify ArenaVec builder args to array#24625

Merged
graphite-app[bot] merged 1 commit into
mainfrom
om/07-17-test_minifier_simplify_arenavec_builder_args_to_array
Jul 17, 2026
Merged

test(minifier): simplify ArenaVec builder args to array#24625
graphite-app[bot] merged 1 commit into
mainfrom
om/07-17-test_minifier_simplify_arenavec_builder_args_to_array

Conversation

@overlookmotel

@overlookmotel overlookmotel commented Jul 17, 2026

Copy link
Copy Markdown
Member

Pure refactor. Just shorten code.

Replace pattern of creating a Vec and pushing to it repeatedly with just passing an array to the AST builder method.

This is shorter and more performant - though perf doesn't matter, because it's just in a test.

overlookmotel commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 57 untouched benchmarks
⏩ 19 skipped benchmarks1


Comparing om/07-17-test_minifier_simplify_arenavec_builder_args_to_array (f78e096) with om/07-17-refactor_ast_visit_isolated_declarations_minifier_transformer_pass_array_literals_for_from_array_in_builder_args (6b23ad7)2

Open in CodSpeed

Footnotes

  1. 19 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on om/07-17-refactor_ast_visit_isolated_declarations_minifier_transformer_pass_array_literals_for_from_array_in_builder_args (c06982a) during the generation of this report, so 401b6d9 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel
overlookmotel force-pushed the om/07-17-test_minifier_simplify_arenavec_builder_args_to_array branch from 69fd3a7 to 3f24355 Compare July 17, 2026 13:08
@overlookmotel
overlookmotel force-pushed the om/07-17-refactor_ast_visit_isolated_declarations_minifier_transformer_pass_array_literals_for_from_array_in_builder_args branch from 702b234 to 6b23ad7 Compare July 17, 2026 13:08
@overlookmotel
overlookmotel marked this pull request as ready for review July 17, 2026 13:22
@overlookmotel
overlookmotel requested a review from Dunqing as a code owner July 17, 2026 13:22
Copilot AI review requested due to automatic review settings July 17, 2026 13:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors an oxc_minifier test to use the AST builder’s IntoIn<ArenaVec<_>> conversions, replacing manual ArenaVec construction/pushes with a fixed-size Rust array literal passed directly into ArrayExpression::new.

Changes:

  • Replace ArenaVec::new_in + push pattern with an inline array literal for ArrayExpression::new elements.
  • Remove the now-unused ArenaVec import in the test.

@graphite-app

graphite-app Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Merge activity

Pure refactor. Just shorten code.

Replace pattern of creating a `Vec` and pushing to it repeatedly with just passing an array to the AST builder method.

This is shorter and more performant - though perf doesn't matter, because it's just in a test.
@graphite-app
graphite-app Bot force-pushed the om/07-17-refactor_ast_visit_isolated_declarations_minifier_transformer_pass_array_literals_for_from_array_in_builder_args branch from 6b23ad7 to c06982a Compare July 17, 2026 13:52
@graphite-app
graphite-app Bot force-pushed the om/07-17-test_minifier_simplify_arenavec_builder_args_to_array branch from 3f24355 to f78e096 Compare July 17, 2026 13:53
Base automatically changed from om/07-17-refactor_ast_visit_isolated_declarations_minifier_transformer_pass_array_literals_for_from_array_in_builder_args to main July 17, 2026 14:00
@graphite-app
graphite-app Bot merged commit f78e096 into main Jul 17, 2026
39 checks passed
@graphite-app
graphite-app Bot deleted the om/07-17-test_minifier_simplify_arenavec_builder_args_to_array branch July 17, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants