mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 09:52:57 +03:00
fix(es/minifier): Fix infinite loop (#2424)
swc_ecma_minifier: - Prevent infinite loop of post-optimize inliner.
This commit is contained in:
parent
8074c72ce9
commit
aff6670856
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -2674,7 +2674,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_minifier"
|
||||
version = "0.37.3"
|
||||
version = "0.37.4"
|
||||
dependencies = [
|
||||
"ansi_term 0.12.1",
|
||||
"anyhow",
|
||||
@ -2783,7 +2783,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_transforms_base"
|
||||
version = "0.37.2"
|
||||
version = "0.37.3"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"phf",
|
||||
|
@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"]
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_ecma_minifier"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.37.3"
|
||||
version = "0.37.4"
|
||||
|
||||
[features]
|
||||
debug = ["backtrace"]
|
||||
|
@ -210,13 +210,12 @@ impl VisitMut for MultiReplacer {
|
||||
}
|
||||
items.visit_mut_children_with(self);
|
||||
|
||||
if self.changed {
|
||||
continue;
|
||||
}
|
||||
|
||||
if cfg!(feature = "debug") {
|
||||
let keys = self.vars.iter().map(|(k, _)| k.clone()).collect::<Vec<_>>();
|
||||
debug!("Left: {:?}", keys);
|
||||
if !self.changed {
|
||||
if cfg!(feature = "debug") {
|
||||
let keys = self.vars.iter().map(|(k, _)| k.clone()).collect::<Vec<_>>();
|
||||
debug!("Dropping {:?}", keys);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user