mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
perf(minifier): remove the useless empty statement removal code in statement fusion (#8646)
This commit is contained in:
parent
5b3c412e26
commit
3e19e4e004
1 changed files with 0 additions and 8 deletions
|
|
@ -17,10 +17,6 @@ impl<'a> PeepholeOptimizations {
|
|||
stmts: &mut Vec<'a, Statement<'a>>,
|
||||
ctx: &mut TraverseCtx<'a>,
|
||||
) {
|
||||
self.fuse_statements(stmts, ctx);
|
||||
}
|
||||
|
||||
fn fuse_statements(&mut self, stmts: &mut Vec<'a, Statement<'a>>, ctx: &mut TraverseCtx<'a>) {
|
||||
let len = stmts.len();
|
||||
|
||||
if len <= 1 {
|
||||
|
|
@ -57,10 +53,6 @@ impl<'a> PeepholeOptimizations {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if self.is_current_function_changed() {
|
||||
stmts.retain(|stmt| !matches!(stmt, Statement::EmptyStatement(_)));
|
||||
}
|
||||
}
|
||||
|
||||
fn is_fusable_control_statement(stmt: &Statement<'a>) -> bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue