swc/crates/swc_ecma_minifier/tests/terser/compress/collapse_vars
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
..
anonymous_function refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
assignment refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
boolean_binary_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
boolean_binary_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_call refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_conditional refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_forin refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_if_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_if_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_return refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_statement refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cascade_switch refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
chained_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
chained_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
chained_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_array refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_boolean_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_boolean_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_conditional_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_conditional_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_function refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_lhs_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_lhs_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_loop refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_number refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_object refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_regexp refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_side_effects refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_string refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_this refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_undefined refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_var refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_rhs_vardef refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_arguments refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_array feat(es/minifier): Handle array literals in sequences (#3348) 2022-01-24 21:10:20 +09:00
collapse_vars_assignment refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_closures refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_constants refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_do_while refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_do_while_drop_assign refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_eval_and_with refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_if refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_issue_721 fix(es/minifier): Improve minifier (#3350) 2022-01-27 15:36:22 +09:00
collapse_vars_lvalues refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_lvalues_drop_assign refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_misc1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_object refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_properties refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_regexp refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_repeated refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_self_reference refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_seq refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_short_circuit refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_short_circuited_conditions refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_side_effects_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_side_effects_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_switch refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_throw refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_try refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_unary refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_unary_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
collapse_vars_while refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
compound_assignment refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cond_branch_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cond_branch_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
cond_branch_switch refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
conditional_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
conditional_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
double_def_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
double_def_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
duplicate_argname refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
for_init refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
ignore_class refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
iife_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
iife_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
inner_lvalues refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_27 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_315 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_348 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_805 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537_destructuring_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537_destructuring_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537_destructuring_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537_destructuring_for_in refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537_destructuring_for_of refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1537_for_of refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1562 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1605_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1605_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1631_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1631_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1631_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_1858 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2187_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2187_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2187_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2203_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2203_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2203_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2203_4 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2250_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2250_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2298 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2313_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2313_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2319_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2319_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2319_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_4 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_5 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_6 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_7 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_8 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2364_9 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2365 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2425_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2425_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2425_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_4 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_5 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_6 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_7 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_8 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_9 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_10 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_11 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_12 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_13 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2436_14 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2437 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2437_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2437_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2453 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2497 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2506 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2571_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2571_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2858 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2873_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2873_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2878 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2891_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2891_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2908 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2914_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2914_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2931 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2954_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2954_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2954_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_2974 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_3032 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
issue_3096 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
lvalues_def refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
may_throw_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
may_throw_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
modified refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
noinline_annotation refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
pure_getters_chain refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
reassign_const_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
reassign_const_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
recursive_function_replacement refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
reduce_vars_assign refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
ref_scope refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
replace_all_var refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
replace_all_var_scope refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
return_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
return_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
return_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
return_4 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
side_effect_free_replacement refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
side_effects_property refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
switch_case_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
switch_case_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
switch_case_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
toplevel_single_reference refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
undeclared refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
unsafe_builtin refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
unused_orig refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
var_defs refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
var_side_effects_1 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
var_side_effects_2 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
var_side_effects_3 refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00