Skip to content

refactor(allocator): use std instead of core#21254

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

refactor(allocator): use std instead of core#21254
graphite-app[bot] merged 1 commit intomainfrom
om/04-09-refactor_allocator_use_std_instead_of_core_

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Apr 9, 2026

We don't support no_std, and import from std instead of core. Follow that convention here.

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_use_std_instead_of_core_ (32e4d25) with om/04-09-docs_allocator_upper_case_safety_in_comments (6ba9f3f)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-docs_allocator_upper_case_safety_in_comments (6ba9f3f) during the generation of this report, so 49b5d15 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:49
Copilot AI review requested due to automatic review settings April 9, 2026 13:49
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 allocator internals to consistently use std imports (the project doesn’t support no_std) and removes the remaining core-based import patterns.

Changes:

  • Replace core::* imports/usages with std::* in bumpalo_alloc and bump.
  • Remove the #[doc(hidden)] pub extern crate alloc as core_alloc; alias and switch allocation calls to std::alloc.

Reviewed changes

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

File Description
crates/oxc_allocator/src/bumpalo_alloc.rs Switches allocation-related imports from core to std.
crates/oxc_allocator/src/bump.rs Replaces core/alloc usage with std and removes the core_alloc alias.

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

We don't support `no_std`, and import from `std` instead of `core`. Follow that convention here.
@graphite-app graphite-app Bot force-pushed the om/04-09-docs_allocator_upper_case_safety_in_comments branch from 6ba9f3f to 2870174 Compare April 9, 2026 14:42
@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
Base automatically changed from om/04-09-docs_allocator_upper_case_safety_in_comments to main April 9, 2026 14:47
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 9, 2026
@graphite-app graphite-app Bot merged commit d5808ef into main Apr 9, 2026
28 checks passed
@graphite-app graphite-app Bot deleted the om/04-09-refactor_allocator_use_std_instead_of_core_ branch April 9, 2026 14:50
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