refactor(allocator): rename Bump to Arena#21394
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
Pull request overview
Refactors oxc_allocator to rename the internal bump allocator type from Bump to Arena, updating call sites, docs, and tests to reflect the new naming while keeping behavior unchanged.
Changes:
- Rename allocator type and related APIs (
Bump→Arena) across the crate and tests. - Update
Allocatorinternals to hold and expose anArena(bump()→arena()). - Propagate naming changes through arena-backed collections (
Vec,HashMap,HashSet,RawVec) and documentation.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/oxc_allocator/tests/bump_try_alloc.rs | Updates integration test imports/variables to Arena. |
| crates/oxc_allocator/tests/bump/try_alloc_with.rs | Renames test usage from Bump to Arena. |
| crates/oxc_allocator/tests/bump/try_alloc_try_with.rs | Renames test usage from Bump to Arena. |
| crates/oxc_allocator/tests/bump/tests.rs | Renames test usage and one test name (bump_is_send → arena_is_send). |
| crates/oxc_allocator/tests/bump/quickchecks.rs | Updates quickcheck tests to use Arena. |
| crates/oxc_allocator/tests/bump/capacity.rs | Updates capacity test to use Arena. |
| crates/oxc_allocator/tests/bump/allocation_limit.rs | Updates allocation-limit tests and function name to Arena. |
| crates/oxc_allocator/tests/bump/alloc_with.rs | Renames test usage from Bump to Arena. |
| crates/oxc_allocator/tests/bump/alloc_try_with.rs | Renames test usage from Bump to Arena. |
| crates/oxc_allocator/tests/bump/alloc_fill.rs | Renames test usage from Bump to Arena. |
| crates/oxc_allocator/src/vec2/raw_vec.rs | Renames hazardous allocator accessor bump() → arena() and updates safety docs. |
| crates/oxc_allocator/src/vec2/mod.rs | Updates internal RawVec allocator access to arena(). |
| crates/oxc_allocator/src/vec.rs | Switches arena-backed Vec to use Arena and updates safety docs. |
| crates/oxc_allocator/src/tracking.rs | Moves allocation tracking impl from Bump to Arena; updates Allocator delegation. |
| crates/oxc_allocator/src/string_builder.rs | Updates grow path to call allocator.arena().grow(...). |
| crates/oxc_allocator/src/hash_set.rs | Switches backing allocator type from &Bump to &Arena and updates docs. |
| crates/oxc_allocator/src/hash_map.rs | Switches backing allocator type from &Bump to &Arena and updates docs. |
| crates/oxc_allocator/src/from_raw_parts.rs | Updates raw-parts construction to use Arena::from_raw_parts and Allocator::from_arena. |
| crates/oxc_allocator/src/bump.rs | Renames the allocator struct to Arena and updates extensive docs/impls accordingly. |
| crates/oxc_allocator/src/boxed.rs | Updates safety docs to refer to Arena. |
| crates/oxc_allocator/src/allocator_api2.rs | Delegation updated from bump() to arena(). |
| crates/oxc_allocator/src/allocator.rs | Renames internal field bump → arena, updates delegation methods, and introduces arena() accessor. |
| crates/oxc_allocator/src/alloc.rs | Updates Alloc impl target from Bump to Arena and related comments. |
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
7163641 to
f9c4f29
Compare

Pure refactor. Rename
BumptoArena. The name "Bump" was a legacy frombumpalo,Arenais a more appropriate name.No substantive changes, only renaming.