Skip to content

refactor(allocator): rename Bump to Arena#21394

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/04-13-refactor_allocator_rename_bump_to_arena_
Apr 13, 2026
Merged

refactor(allocator): rename Bump to Arena#21394
graphite-app[bot] merged 1 commit intomainfrom
om/04-13-refactor_allocator_rename_bump_to_arena_

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Apr 13, 2026

Pure refactor. Rename Bump to Arena. The name "Bump" was a legacy from bumpalo, Arena is a more appropriate name.

No substantive changes, only renaming.

Copy link
Copy Markdown
Member Author

overlookmotel commented Apr 13, 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 13, 2026
@overlookmotel overlookmotel self-assigned this Apr 13, 2026
@overlookmotel overlookmotel marked this pull request as ready for review April 13, 2026 18:15
Copilot AI review requested due to automatic review settings April 13, 2026 18:15
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 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 (BumpArena) across the crate and tests.
  • Update Allocator internals to hold and expose an Arena (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_sendarena_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 bumparena, updates delegation methods, and introduces arena() accessor.
crates/oxc_allocator/src/alloc.rs Updates Alloc impl target from Bump to Arena and related comments.

Comment thread crates/oxc_allocator/src/bump.rs
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 13, 2026

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/04-13-refactor_allocator_rename_bump_to_arena_ (f9c4f29) with main (2e144c2)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 main (f9c4f29) during the generation of this report, so 2e144c2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Apr 13, 2026

Merge activity

Pure refactor. Rename `Bump` to `Arena`. The name "Bump" was a legacy from `bumpalo`, `Arena` is a more appropriate name.

No substantive changes, only renaming.
@graphite-app graphite-app bot force-pushed the om/04-13-refactor_allocator_rename_bump_to_arena_ branch from 7163641 to f9c4f29 Compare April 13, 2026 18:33
graphite-app bot pushed a commit that referenced this pull request Apr 13, 2026
Rename `Box` and `Vec` methods which contained the word "bump", in line with renaming `Bump` to `Arena` (#21394).

No substantive changes, only renaming.
graphite-app bot pushed a commit that referenced this pull request Apr 13, 2026
Pure refactor. Rename `bump.rs` to `arena.rs`, and rename `bump` tests directory to `arena` - in line with renaming `Bump` to `Arena` (#21394).

No substantive changes, only renaming.
@graphite-app graphite-app bot merged commit f9c4f29 into main Apr 13, 2026
35 checks passed
@graphite-app graphite-app bot deleted the om/04-13-refactor_allocator_rename_bump_to_arena_ branch April 13, 2026 18:37
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