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: 4 additions & 4 deletions crates/oxc_mangler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ impl<'t> Mangler<'t> {

// Stores the lived scope ids for each slot. Keyed by slot number.
let mut slot_liveness: std::vec::Vec<FixedBitSet> = vec![];
let mut tmp_bindings = std::vec::Vec::with_capacity(100);
let mut tmp_bindings = Vec::with_capacity_in(100, temp_allocator);

let mut reusable_slots = std::vec::Vec::new();
let mut reusable_slots = Vec::new_in(temp_allocator);
// Walk down the scope tree and assign a slot number for each symbol.
// It is possible to do this in a loop over the symbol list,
// but walking down the scope tree seems to generate a better code.
Expand Down Expand Up @@ -426,8 +426,8 @@ impl<'t> Mangler<'t> {
// function fa() { .. } function ga() { .. }

let mut freq_iter = frequencies.iter();
let mut symbols_renamed_in_this_batch = std::vec::Vec::with_capacity(100);
let mut slice_of_same_len_strings = std::vec::Vec::with_capacity(100);
let mut symbols_renamed_in_this_batch = Vec::with_capacity_in(100, temp_allocator);
let mut slice_of_same_len_strings = Vec::with_capacity_in(100, temp_allocator);
// 2. "N number of vars are going to be assigned names of the same length"
for (_, slice_of_same_len_strings_group) in
&reserved_names.into_iter().chunk_by(InlineString::len)
Expand Down
Loading