Skip to content

Commit a49e119

Browse files
committed
visit_par
1 parent e1c6213 commit a49e119

File tree

1 file changed

+8
-1
lines changed
  • crates/swc_ecma_transforms_optimization/src/simplify/dce

1 file changed

+8
-1
lines changed

crates/swc_ecma_transforms_optimization/src/simplify/dce/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use swc_common::{
1212
use swc_ecma_ast::*;
1313
use swc_ecma_transforms_base::{
1414
helpers::{Helpers, HELPERS},
15-
perf::{cpu_count, ParVisit, Parallel},
15+
perf::{cpu_count, Parallel},
1616
};
1717
use swc_ecma_utils::{
1818
collect_decls, find_pat_ids, parallel::ParallelExt, ExprCtx, ExprExt, IsEmpty, ModuleItemLike,
@@ -415,6 +415,13 @@ impl Analyzer<'_> {
415415
data.used_names.entry(id).or_default().usage += 1;
416416
}
417417
}
418+
419+
fn visit_par<N>(&mut self, threshold: usize, nodes: &[N])
420+
where
421+
N: Send + Sync + VisitWith<Self>,
422+
{
423+
self.maybe_par(threshold, nodes, |v, n| n.visit_with(v));
424+
}
418425
}
419426

420427
impl Visit for Analyzer<'_> {

0 commit comments

Comments
 (0)