Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(minifier): remove incorrect fold Expression::AssignmentExpression #8211

Merged
Show file tree
Hide file tree
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
7 changes: 0 additions & 7 deletions crates/oxc_ecmascript/src/constant_evaluation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,6 @@ pub trait ConstantEvaluation<'a> {
_ => None,
}
}
Expression::AssignmentExpression(assign_expr) => {
match assign_expr.operator {
AssignmentOperator::LogicalAnd | AssignmentOperator::LogicalOr => None,
// For ASSIGN, the value is the value of the RHS.
_ => self.get_boolean_value(&assign_expr.right),
}
}
expr => {
use crate::ToBoolean;
expr.to_boolean()
Expand Down
4 changes: 2 additions & 2 deletions tasks/minsize/minsize.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Original | minified | minified | gzip | gzip | Fixture

544.10 kB | 71.84 kB | 72.48 kB | 26.19 kB | 26.20 kB | lodash.js

555.77 kB | 273.48 kB | 270.13 kB | 90.94 kB | 90.80 kB | d3.js
555.77 kB | 273.58 kB | 270.13 kB | 90.98 kB | 90.80 kB | d3.js

1.01 MB | 460.75 kB | 458.89 kB | 126.88 kB | 126.71 kB | bundle.min.js

1.25 MB | 653.17 kB | 646.76 kB | 163.58 kB | 163.73 kB | three.js

2.14 MB | 726.71 kB | 724.14 kB | 180.25 kB | 181.07 kB | victory.js

3.20 MB | 1.01 MB | 1.01 MB | 332.13 kB | 331.56 kB | echarts.js
3.20 MB | 1.01 MB | 1.01 MB | 332.14 kB | 331.56 kB | echarts.js

6.69 MB | 2.32 MB | 2.31 MB | 493.00 kB | 488.28 kB | antd.js

Expand Down
Loading