Commit Graph

784 Commits

Author SHA1 Message Date
Donny/강동윤
fe40d8312b
test(es): Accept arguments (#5916)
**Description:**

This PR adds a way to provide arguments to `exec_node_js`.
2022-09-21 16:23:10 +09:00
SWC Bot
be81c4737e chore: Publish crates 2022-09-20 08:32:27 +00:00
Donny/강동윤
a9873e505d
perf(es/minifier): Optimize analyzer (#5908) 2022-09-20 08:21:39 +00:00
SWC Bot
1898d6686a chore: Publish crates 2022-09-20 06:44:48 +00:00
Donny/강동윤
1df72430a5
perf(es/minifier): Invoke DCE only before the first compression (#5907)
**Description:**

Invoke DCE only before the first compression. I verified that this patch does not affect the compression rate of the real-world inputs greatly.
2022-09-20 15:41:26 +09:00
SWC Bot
cb2044234a chore: Publish crates 2022-09-20 04:32:30 +00:00
Donny/강동윤
6bbd3f4c14
perf(es/minifier): Make more passes parallel (#5906)
**Description:**

We only unwrap parenthesis in precompress optimizer, so I refactored it. Also, as it's embarrassingly parallel, I parallelized it.
2022-09-20 04:29:08 +00:00
SWC Bot
5c2b1bb15d chore: Publish crates 2022-09-20 03:51:28 +00:00
Donny/강동윤
1a182ef8d9
perf(es): Optimize memory layout of AST (#5829) 2022-09-20 12:47:21 +09:00
SWC Bot
8c112c371b chore: Publish crates 2022-09-19 15:11:28 +00:00
Donny/강동윤
aacf7aaf80
feat(es/minifier): Drop function identifier in a single pass (#5901)
**Description:**

We only inline function declarations if `ref_count` is 1, so we don't need to preserve the name of the function.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5682.
2022-09-19 15:07:56 +00:00
SWC Bot
a18625c0d0 chore: Publish crates 2022-09-19 12:25:00 +00:00
Austaras
83c7887600
fix(es/minifier): Remove more pure calls (#5900) 2022-09-19 12:21:15 +00:00
Donny/강동윤
0bbcfe15ee
test(es/minifier): Add a test for a fixed issue (#5897) 2022-09-19 17:25:49 +09:00
SWC Bot
b93d740396 chore: Publish crates 2022-09-19 07:49:46 +00:00
Donny/강동윤
4e656af1ec
feat(es/minifier): Drop variable from the sequential inliner (#5896)
**Description:**

We now drop variable declarations if we are going to eliminate the only usage.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5693.
2022-09-19 07:40:04 +00:00
IWANABETHATGUY
7d6d04b421
fix(es/codegen): Drop the last comma in an array literal (#5877)
**Description:**

Drop the last comma in an array literal.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5692.
2022-09-16 15:48:28 +09:00
Donny/강동윤
f0ca487848 chore: Publish crates 2022-09-16 15:46:25 +09:00
SWC Bot
52c17f3056 chore: Publish crates 2022-09-15 14:49:03 +00:00
Donny/강동윤
c3fa96b21b
fix(es/minifier): Fix unicode handling (#5875) 2022-09-15 14:45:33 +00:00
SWC Bot
69bf533571 chore: Publish crates 2022-09-15 07:03:50 +00:00
magic-akari
90d311c042
fix(es/minifier): Fix handling of .toFixed call without an argument (#5868) 2022-09-15 16:00:36 +09:00
SWC Bot
1d633e8ba7 chore: Publish crates 2022-09-15 06:08:07 +00:00
Donny/강동윤
991a34e0c2
fix(es/minifier): Remove fake_block while calculating next scope (#5869)
**Description:**

We now remove `fake_block` mark from `with_ctx`.

**Related issue:**
 - Closes https://github.com/swc-project/swc/issues/5865
2022-09-15 06:04:47 +00:00
SWC Bot
ec8bb432b9 chore: Publish crates 2022-09-15 05:23:46 +00:00
Alexander Akait
7f62fa6227
perf(html): Reduce memory usage (#5867) 2022-09-15 04:17:05 +00:00
SWC Bot
73ee9d6784 chore: Publish crates 2022-09-15 03:06:15 +00:00
SWC Bot
55a4e18991 chore: Publish crates 2022-09-14 13:00:55 +00:00
Austaras
63fb0c4ad3
feat(es/minifier): Move assign with seq init into seq (#5847) 2022-09-14 12:57:18 +00:00
SWC Bot
d35792f424 chore: Publish crates 2022-09-14 07:56:20 +00:00
SWC Bot
8432c0a1ad chore: Publish crates 2022-09-14 07:19:24 +00:00
SWC Bot
0c24841274 chore: Publish crates 2022-09-14 06:54:54 +00:00
Donny/강동윤
32f18068ad
fix(es/minifier): Preserve more side effects (#5853)
**Description:**

We now preserve more side effects.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5680.
2022-09-14 06:51:56 +00:00
SWC Bot
0a56a2d5ab chore: Publish crates 2022-09-14 06:10:39 +00:00
magic-akari
2b2464271a
fix(es/codegen): Remove redundant ; after export default decl (#5851) 2022-09-14 06:07:15 +00:00
SWC Bot
ad4b0d200c chore: Publish crates 2022-09-14 05:05:55 +00:00
Donny/강동윤
a5f7b6946f
fix(es/minifier): Don't replace parameters of IIFE if it's recursive (#5852)
**Description:**

While investigating, I found that problem is not the analysis of recursive functions. Instead, it was a problem with the IIFE evaluator, which replaces parameters even if it's recursive.

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/5846
2022-09-14 05:02:14 +00:00
Donny/강동윤
0284c1bf40
test(es/transforms): Enable tests for fixed issues (#5845) 2022-09-13 10:32:00 +00:00
SWC Bot
76d22dfeb1 chore: Publish crates 2022-09-13 07:46:53 +00:00
SWC Bot
cae41739d5 chore: Publish crates 2022-09-13 06:48:34 +00:00
Donny/강동윤
fe3072b12a
perf(es/minifier): Reduce type sizes (#5843) 2022-09-13 06:45:33 +00:00
SWC Bot
c624c3de03 chore: Publish crates 2022-09-13 06:06:00 +00:00
SWC Bot
d16fb9a8cf chore: Publish crates 2022-09-13 05:04:36 +00:00
Alexander Akait
ccd618ce54
perf(html/minifier): Improve performance (#5838) 2022-09-13 14:01:41 +09:00
SWC Bot
d8c1e4a62e chore: Publish crates 2022-09-13 03:56:39 +00:00
Austaras
8567a38c4a
feat(es/minifier): Extend inlining of identifiers to multi-usage (#5832) 2022-09-13 03:52:47 +00:00
SWC Bot
b2c0fbd7ba chore: Publish crates 2022-09-13 02:19:15 +00:00
SWC Bot
2df19176fb chore: Publish crates 2022-09-12 05:16:53 +00:00
SWC Bot
9f28c246dc chore: Publish crates 2022-09-12 04:34:08 +00:00
SWC Bot
2b1e73737f chore: Publish crates 2022-09-11 06:21:56 +00:00