feat(allocator): introduce BitSet type#13449
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
This PR moves the BitSet type from the oxc_mangler crate to the oxc_allocator crate to make it available for reuse in other contexts. The change introduces a new bitset feature flag to avoid adding overhead for crates that don't use this functionality.
Key Changes
- Moved
BitSetimplementation fromoxc_manglertooxc_allocator - Added a new
bitsetfeature flag to conditionally include theBitSettype - Updated imports and dependencies to reflect the new location
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/oxc_mangler/src/lib.rs | Removed local bitset module and imports BitSet from oxc_allocator |
| crates/oxc_mangler/Cargo.toml | Added bitset feature dependency to oxc_allocator |
| crates/oxc_allocator/src/lib.rs | Added conditional module and export for BitSet behind bitset feature |
| crates/oxc_allocator/src/bitset.rs | Added BitSet implementation with documentation comments |
| crates/oxc_allocator/README.md | Documented the new bitset feature |
| crates/oxc_allocator/Cargo.toml | Added bitset feature definition |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13449 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
#13419 introduced a `BitSet` type which stores its data in the arena, in the mangler. This type may be useful in other contexts, so move it from `oxc_mangler` into `oxc_allocator`. But put it behind a `bitset` feature, so only crates which use it pay for it.
0d98998 to
afa0877
Compare

#13419 introduced a
BitSettype which stores its data in the arena, in the mangler.This type may be useful in other contexts, so move it from
oxc_manglerintooxc_allocator. But put it behind abitsetfeature, so only crates which use it pay for it.