Donny/강동윤
73e9185bba
test(es/minifier): Add snapshot testing for the analyzer ( #3529 )
2022-02-11 18:33:08 +09:00
Donny/강동윤
292add7d26
fix(es/minifier): Make sequences
less aggressive ( #3480 )
...
swc_ecma_minifier:
- `sequences`: Abort on RHS contains the left id.
2022-02-08 19:10:22 +09:00
Donny/강동윤
5812c3c10f
fix(es/minifier): Fix codemirror
( #3462 )
...
swc_ecma_minifier:
- Mark for in/of loops as executed multiple times.
- Check captured identifiers while invoking IIFE.
2022-02-07 11:11:53 +09:00
Donny/강동윤
68e9017376
fix(es/minifier): Improve minifier ( #3350 )
...
swc_ecma_transforms_optimization:
- `expr_simplifier`: Track more changes.
swc_ecma_minifier:
- Analyze after applying the pure optimizer.
- Preserve access to a variable not in scope.
- `compress`: Remove string literal if it was not a directive.
- `pure/collapse_vars`: Merge vars declared in the first statement into one with initializers if `collapse_vars` and `join_vars` are enabled.
- `unused`: Use `usage_count` instead of `ref_count`.
- `unused`: Fix dropping rule for member expressions.
- `unused`: Fix dropping rule for declarations.
- `hoist_props`: Preserve exported items.
2022-01-27 15:36:22 +09:00
Donny/강동윤
d52a1f3899
fix(es/minifier): Don't inline a var if the initializer is reassigned ( #3333 )
...
swc_ecma_minifier:
- Consider reassignment to initializer while inlining a variable.
2022-01-21 14:01:20 +09:00
Donny/강동윤
4f23d651d1
fix(es/minifier): Consider capturing while inlining ( #3322 )
...
swc_ecma_minifier:
- Don't inline functions if it captures the environment.
2022-01-21 10:24:41 +09:00
Donny/강동윤
57204e39cd
fix(es/minifier): Don't inline functions used as arguments ( #3320 )
...
swc_ecma_minifier:
- Preserve a variable initialized with a function expression if it's used as an argument.
2022-01-20 16:06:23 +09:00
Donny/강동윤
b4d21bf077
fix(es/minifier): Prevent infinite loop due to negation ( #3310 )
...
swc_ecma_minifier:
- Don't mark as modified while negating.
2022-01-19 23:17:17 +09:00
Donny/강동윤
8e796cdc0a
fix(es/minifier): Don't emit invalid code ( #3302 )
...
swc_ecma_minifier:
- Add lots of debug assertions for invalid codes.
- Remove all invalid AST nodes eagerly.
- `pure`: Normalize `PatOrExpr`.
- `analyzer`: Handle `PatOrExpr` correctly.
2022-01-18 20:52:21 +09:00
Donny/강동윤
74fd353053
fix(es/minifier): Fix bugs ( #3238 )
...
swc_ecma_minifier:
- `collapse_vars`: Respect `mutated`. (Closes #2679 )
- Add a test for https://github.com/vercel/next.js/issues/31084 .
2022-01-12 16:57:54 +09:00