Skip to content

refactor(allocator): import from std at top level#21255

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/04-09-refactor_allocator_import_from_std_at_top_level
Apr 9, 2026
Merged

refactor(allocator): import from std at top level#21255
graphite-app[bot] merged 1 commit intomainfrom
om/04-09-refactor_allocator_import_from_std_at_top_level

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Apr 9, 2026

Pure refactor. Import from std at top level, to shorten and simplify code.

Copy link
Copy Markdown
Member Author

overlookmotel commented Apr 9, 2026


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 changes, fast-track this PR to the front of the merge queue

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.

@github-actions github-actions Bot added A-allocator Area - Allocator C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Apr 9, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 9, 2026

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/04-09-refactor_allocator_import_from_std_at_top_level (44f82f4) with om/04-09-refactor_allocator_use_std_instead_of_core_ (32e4d25)2

Open in CodSpeed

Footnotes

  1. 3 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/04-09-refactor_allocator_use_std_instead_of_core_ (32e4d25) during the generation of this report, so 7814f6c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel self-assigned this Apr 9, 2026
@overlookmotel overlookmotel marked this pull request as ready for review April 9, 2026 13:50
Copilot AI review requested due to automatic review settings April 9, 2026 13:50
Copy link
Copy Markdown
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

Refactors oxc_allocator’s bump allocator implementation to rely on top-level std imports, reducing repeated fully-qualified paths and slightly simplifying call sites.

Changes:

  • Import std::fmt as a module and use fmt::Formatter / fmt::Result in Display impls.
  • Import std::hint::unreachable_unchecked and use it directly in round_up_to_unchecked.
  • Use ptr::copy_nonoverlapping (via std::ptr import) instead of std::ptr::....

Comment thread crates/oxc_allocator/src/bump.rs
@graphite-app graphite-app Bot added the 0-merge Merge with Graphite Merge Queue label Apr 9, 2026
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented Apr 9, 2026

Merge activity

Pure refactor. Import from `std` at top level, to shorten and simplify code.
@graphite-app graphite-app Bot force-pushed the om/04-09-refactor_allocator_use_std_instead_of_core_ branch from 32e4d25 to d5808ef Compare April 9, 2026 14:43
@graphite-app graphite-app Bot force-pushed the om/04-09-refactor_allocator_import_from_std_at_top_level branch from 44f82f4 to 7f91722 Compare April 9, 2026 14:43
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 9, 2026
Base automatically changed from om/04-09-refactor_allocator_use_std_instead_of_core_ to main April 9, 2026 14:50
@graphite-app graphite-app Bot merged commit 7f91722 into main Apr 9, 2026
28 checks passed
@graphite-app graphite-app Bot deleted the om/04-09-refactor_allocator_import_from_std_at_top_level branch April 9, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-allocator Area - Allocator C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants