Commit Graph

133 Commits

Author SHA1 Message Date
Donny/강동윤
5e82640b42 chore: Publish crates 2022-02-09 13:57:21 +09:00
Donny/강동윤
8bf5cf4d03
chore(es): Fix clippy warnings (#3482) 2022-02-08 19:50:22 +09:00
Donny/강동윤
180bb86e8c chore: Publish crates 2022-02-08 19:10:54 +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/강동윤
0ff58d83c6 chore: Publish crates 2022-02-07 13:43:30 +09:00
Donny/강동윤
0371c41b7c
fix(es/minifier): Fix mapbox (#3463)
swc_ecma_minifier:
 - `mangler`: Handle the identifiers of class expressions correctly.
2022-02-07 13:43:00 +09:00
Donny/강동윤
f1f9c1ce4d chore: Publish crates 2022-02-07 11:12:21 +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/강동윤
19e7c70bd7 chore: Publish crates 2022-02-04 13:21:41 +09:00
Alexander Akait
e8b64a9871
feat(es/codegen): Improve compression of numbers (#3425) 2022-02-03 13:04:32 +09:00
Donny
0e7d525352 chore: Publish crates 2022-01-28 16:09:16 +09:00
Donny/강동윤
91d78000ea
feat(es/minifier): Implement drop_console (#3392)
swc_ecma_minifier:
 - Merge `drop_console` into pure optimizer.
 - Implement `drop_console`. (Closes #2321)
2022-01-28 16:08:41 +09:00
Donny
6690354f79 chore: Publish crates 2022-01-28 13:43:58 +09:00
Donny/강동윤
38c2499358
fix(es/minifier): Fix evaluator (#3391) 2022-01-28 13:43:29 +09:00
Donny/강동윤
7ef3bfa5b6
refactor(es/minifier): Merge execution tests into a file to make git faster (#3377) 2022-01-27 17:41:43 +09:00
Donny
6b2f3bb8a0 chore: Publish crates 2022-01-27 15:36:55 +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
ac2bb9b7bd chore: Publish crates 2022-01-26 13:12:02 +09:00
Donny/강동윤
703972dc29
fix(es/minifier): Prepend/append correctly (#3367)
swc_ecma_minifier:
 - Add some assertions for injections.
 - Fix prepend/append logic of statements.
2022-01-26 13:11:26 +09:00
Donny
ad860c9a1c chore: Publish crates 2022-01-25 06:22:21 +09:00
Donny
b7c2e13237 chore: Publish crates 2022-01-24 21:11:03 +09:00
Donny/강동윤
8007b2dc93
feat(es/minifier): Handle array literals in sequences (#3348)
swc_ecma_minifier:
 - `sequences`: Implement more rules for array literals.
2022-01-24 21:10:20 +09:00
Donny
efdbda5808 chore: Publish crates 2022-01-24 00:19:56 +09:00
Donny/강동윤
6921ffbbda
fix(es/minifier): Respect block scoping while negating if statements (#3344)
swc_ecma_minifier:
 - Don't negate a if statement if it has `let`/`const` binding.
2022-01-24 00:19:33 +09:00
Donny
4ee4672e4d chore: Publish crates 2022-01-21 14:01:51 +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
846a91e14c chore: Publish crates 2022-01-21 10:25:41 +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
f62e6312d5 chore: Publish crates 2022-01-20 16:07:42 +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
LongYinan
9608605772
build(node-swc): Fix GLIBC < 2.18 compatible issues and android arm binary loading issue (#3314) 2022-01-20 02:21:24 +00:00
Donny
11aac9b89f chore: Publish crates 2022-01-19 23:17:46 +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
Austaras
9e636c7e58
refactor(es): Add visit_obj_and_computed macro (#3304) 2022-01-19 23:11:52 +09:00
Donny
b4f268fa23 chore: Publish crates 2022-01-19 17:39:58 +09:00
Donny/강동윤
1aa494b1c0
fix(es/minifier): Fix logic for checking arguments (#3313)
swc_ecma_minifier:
 - Don't mark `arguments` in nested scope as a inline blocker.
2022-01-19 17:39:24 +09:00
Donny
4966af8273 chore: Publish crates 2022-01-19 16:38:33 +09:00
Donny/강동윤
289122009b
refactor(es/minifier): Fix clippy warnings (#3312) 2022-01-19 16:37:55 +09:00
Donny
dca1c919c2 chore: Publish crates 2022-01-18 20:52:56 +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
1e4bf76c2b chore: Publish crates 2022-01-18 16:46:13 +09:00
Donny/강동윤
210ecf83bb
feat(es/minifier): Drop more expressions from parallel optimizer (#3303)
swc_ecma_minifier:
 - `pure`: Implement more rule for dropping useless expressions.
2022-01-18 16:45:47 +09:00
Donny
cea7d21ca4 chore: Publish crates 2022-01-18 12:52:37 +09:00
Donny/강동윤
18a11d7c8f
fix(es/minifier): Remove more side-effect-free expressions. (#3301)
swc_ecam_minifier:
- `pure`: Drop more binary expressions.
- `pure`: Drop more literals.
2022-01-18 12:51:31 +09:00
Donny
a424ac30ed chore: Publish crates 2022-01-17 15:17:30 +09:00
Donny/강동윤
fa5c063144
fix(es/minifier): Inline into interpolations in tagged template literals (#3287)
swc_ecma_minifier:
 - Inline into tagged template literals. (Closes #2923)
2022-01-17 15:17:01 +09:00
Donny
023fc956ae chore: Publish crates 2022-01-17 14:30:25 +09:00
Donny/강동윤
b55ae4b312
fix(es/minifier): Fix analysis of unary expressions (#3286)
swc_ecma_minifier:
 - Mark update as usage and assignment. (Closes #3265)
2022-01-17 14:28:35 +09:00
Donny
681de03e4b chore: Publish crates 2022-01-17 13:36:00 +09:00
Donny
0955c3646b chore: Publish crates 2022-01-16 23:32:02 +09:00