Commit Graph

14 Commits

Author SHA1 Message Date
강동윤
b02e189d07
feat(es/minifier): Implement more rules (#1871)
swc_ecma_codegen:
 - Fix codegen of `U+0028` and `U+0029`. 

swc_ecma_minifier:
 - Implement MVP.

swc_ecma_transforms_base:
 - `fixer`: Handle seq/await in rhs of for-of.
2021-07-30 10:11:27 +09:00
David Sherret
6dc6d8a847
refactor(es/dep-graph): Remove SourceMap dependency (#1908) 2021-07-14 00:59:13 +09:00
강동윤
ab161793a1
fix(es/transforms/optimization): Migrate to VisitMut (#1880)
swc_ecma_transforms_optimization:
 - Migrate `expr_simplifier` to `VisitMut`.
 - Migrate `dead_branch_remover` to `VisitMut`.
2021-07-02 12:20:24 +09:00
강동윤
33a43f85b1
feat(es/minifier): Implement more rules (#1766)
swc_ecma_minifier:
 - Implement more rules.

swc_ecma_transforms_base:
 - `resolver`: Fix syntax context of catch block.

swc_ecma_transforms_optimization:
 - `expr_simplifier`: Fix a bug related to `this` of call expressions.
 - `dead_branch_remover`: Don't reduce switch cases if test is now known.
 - `dead_branch_remover`: Don't break `&&`.
2021-06-29 16:11:22 +09:00
강동윤
6ad3f7b90e
feat(es/visit): Groundwork to use VisitMut instead of Fold (#1842)
swc_ecma_transforms:
 - Expose `VisitMut` if possible.

swc_ecma_visit:
 - Implement `VisitMut` for` Folder<V>`.
 - Implement `VisitMut` for `AndThen<A, B>`.
2021-06-23 04:18:41 +00:00
강동윤
3c3fb359ee
fix(es): Remove UB (#1815)
swc_ecma_parser:
 - Remove UB.

swc_ecma_codegen:
 - Remove codes related to the UB of the parser. (#1782)
2021-06-12 05:17:09 +00:00
강동윤
99e738643a
feat(es/minifier): Implement rules and classify tests (#1750)
swc_ecma_minifier:
 - Classify tests so we can focus on MVP.
2021-05-28 19:44:03 +09:00
강동윤
ef6a745599
feat(es/minifier): Implement more rules (#1735)
swc_ecma_minifier:
 - Implement `evaluate` partially.
 - Store 'expected output' from terser along with our result.

swc_ecma_transforms_base:
 - `fixer`: Don't wrap `+ (a % b)`.

swc_ecma_transforms_optimization:
 - `expr_simplifier`: Preserve this in calls.
2021-05-25 16:39:07 +09:00
강동윤
5e2db21e47
feat(es/minifier): Implement more rules (#1731)
swc_ecma_codegen:
 - Don't panic while checking if 2 dots are required.

swc_ecma_minifier:
 - Implement some rules related to the option `evaluate`.
 - Implement some rules related to strings.
 - Implement some rules related to numbers.

swc_ecma_transforms_base:
 - `fixer`: Handle `- (1 / 0)`.
 - `fixer`: Handle `(void 0)(0)`.
2021-05-23 15:39:59 +09:00
강동윤
3522fc71e4
feat(es/minifier): Implement more rules (#1730)
swc_ecma_codegen:
 - Fix codegen of `-0.0`.

swc_ecma_transforms_base:
 - `fixer`: Handle tag of tagged template literals.


swc_ecma_minifier:
 - Implement more rules for strings.
 - Implement more rules for teplate literals.
 - Implement more rules for comparisons.
 - Implement more rules for destructuring bindings.
 - Implement more rules for switch statements.
 - Implement more rules for expressions.
2021-05-23 11:19:11 +09:00
강동윤
d20c1d3089
feat(es/minifier): Implement more rules (#1717)
swc_ecma_minifier:
 - Implement `global-defs` pass.
 - Implement `properties` pass partially.
2021-05-21 15:57:17 +09:00
강동윤
470c8f4745
fix(es/minifier): Publish (#1716) 2021-05-20 15:09:30 +09:00
강동윤
ded8f2b5e5
fix(es/minifier): Use log instead of stderr (#1715) 2021-05-20 14:23:01 +09:00
강동윤
c6b22c57f8
feat(es/minifier): Implement minifier partially (#1302)
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
2021-05-20 13:51:30 +09:00