Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions crates/oxc_mangler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::ops::Deref;
use std::{iter, ops::Deref};

use fixedbitset::FixedBitSet;
use itertools::Itertools;
Expand Down Expand Up @@ -179,10 +179,8 @@ impl Mangler {
let allocator = Allocator::default();

// All symbols with their assigned slots. Keyed by symbol id.
let mut slots: Vec<'_, Slot> = Vec::with_capacity_in(symbol_table.len(), &allocator);
for _ in 0..symbol_table.len() {
slots.push(0);
}
let mut slots: Vec<'_, Slot> =
Vec::from_iter_in(iter::repeat_n(0, symbol_table.len()), &allocator);

// Stores the lived scope ids for each slot. Keyed by slot number.
let mut slot_liveness: std::vec::Vec<FixedBitSet> = vec![];
Expand Down
Loading