Skip to content

feat(allocator): introduce BitSet type#13449

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-30-feat_allocator_introduce_bitset_type
Aug 31, 2025
Merged

feat(allocator): introduce BitSet type#13449
graphite-app[bot] merged 1 commit intomainfrom
08-30-feat_allocator_introduce_bitset_type

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 30, 2025

#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.

Copy link
Member Author

overlookmotel commented Aug 30, 2025


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 hot fixes, skip the queue and merge this PR next

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 the C-enhancement Category - New feature or request label Aug 30, 2025
@overlookmotel overlookmotel marked this pull request as ready for review August 30, 2025 18:58
Copilot AI review requested due to automatic review settings August 30, 2025 18:58
Copy link
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

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 BitSet implementation from oxc_mangler to oxc_allocator
  • Added a new bitset feature flag to conditionally include the BitSet type
  • 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-hq
Copy link

codspeed-hq bot commented Aug 30, 2025

CodSpeed Instrumentation Performance Report

Merging #13449 will not alter performance

Comparing 08-30-feat_allocator_introduce_bitset_type (afa0877) with main (edeebc6)1

Summary

✅ 37 untouched benchmarks

Footnotes

  1. No successful run was found on main (afa0877) during the generation of this report, so edeebc6 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 31, 2025

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.
@graphite-app graphite-app bot force-pushed the 08-30-feat_allocator_introduce_bitset_type branch from 0d98998 to afa0877 Compare August 31, 2025 04:59
@graphite-app graphite-app bot merged commit afa0877 into main Aug 31, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 08-30-feat_allocator_introduce_bitset_type branch August 31, 2025 05:04
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants