commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
d74360ed26fb7bdad448523e1ffa64d59aa11673
Donny/강동윤
2025-03-06T21:19:58
perf(es/fast-lexer): Optimize bound checks (#10157) **Description:** These bound checks are unnecessary, and the performance optimization has a noticeable impact on mac os. <img width="1840" alt="image" src="https://github.com/user-attachments/assets/12073f7c-f0bb-4e8c-81d0-9176312a15d5" />
diff --git a/Cargo.lock b/Cargo.lock index 26064c8afc..72e5089553 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,6 +214,12 @@ dependencies = [ "tempfile", ] +[[package]] +name = "assume" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6f9ca11400f14ef046700eb640...
6
73
44
fb610b096f4b5a8661b1e35e63b6ae327d4725ed
Donny/강동윤
2025-03-06T19:14:56
perf(es/fast-lexer): Optimize lexing of keywords (#10155) **Description:** This PR adds a fast lookup table for keyword lexing.
diff --git a/crates/swc_ecma_fast_parser/src/lexer/identifier.rs b/crates/swc_ecma_fast_parser/src/lexer/identifier.rs index 840fd6aad0..f72eb6b22e 100644 --- a/crates/swc_ecma_fast_parser/src/lexer/identifier.rs +++ b/crates/swc_ecma_fast_parser/src/lexer/identifier.rs @@ -35,6 +35,273 @@ static IDENT_CHAR: [u8; 128] ...
1
409
2
65d23febaaa6334c9e9477a3d5af82ebea66259b
Donny/강동윤
2025-03-06T17:37:19
fix(es/fast-lexer): Fix lexing of numeric literals (#10153) **Description:** This is a PR to ensure correctness. **Related issue:** - This is a follow-up of https://github.com/swc-project/swc/pull/10145
diff --git a/crates/swc_ecma_fast_parser/src/lexer/number.rs b/crates/swc_ecma_fast_parser/src/lexer/number.rs index 7b9a787b3e..472701dfb1 100644 --- a/crates/swc_ecma_fast_parser/src/lexer/number.rs +++ b/crates/swc_ecma_fast_parser/src/lexer/number.rs @@ -57,6 +57,51 @@ impl<'a> Lexer<'a> { Toke...
2
521
3
58e4279fae94a9958ad4229cfa0c9b89b9d0fde4
Donny/강동윤
2025-03-06T12:35:24
refactor: Drop unused crates (#10151) **Description:** I finished experimenting with babel interop and I think I'm not going to work on the cross-module optimizer, mainly because it overlaps with the task of the bundler.
diff --git a/Cargo.lock b/Cargo.lock index 3535b157a5..4768692ddd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2872,7 +2872,6 @@ dependencies = [ "once_cell", "serde", "serde_json", - "tokio", ] [[package]] @@ -6065,28 +6064,6 @@ dependencies = [ "swc_visit", ] -[[package]] -name = "swc_interop_babel" -v...
10
0
256
9676c9acc83cca4297f07abdc203f0ab8da36b2b
Donny/강동윤
2025-03-05T04:31:54
perf(es/lexer): Optimize comment scanning (#10137) <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required --> <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Description:** <!-- Explain the **moti...
diff --git a/crates/swc_ecma_parser/src/lexer/util.rs b/crates/swc_ecma_parser/src/lexer/util.rs index 23c6c368f1..2ebc6cbfc4 100644 --- a/crates/swc_ecma_parser/src/lexer/util.rs +++ b/crates/swc_ecma_parser/src/lexer/util.rs @@ -202,18 +202,42 @@ impl Lexer<'_> { // let is_for_next = self.state.had_...
1
65
14
8a59753429538c62490dde54c56a964b6faa50ec
Donny/강동윤
2025-03-05T03:58:17
perf(es/lexer): Optimize whitespace scanning (#10136) <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required --> <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Description:** <!-- Explain the **m...
diff --git a/crates/swc_ecma_parser/src/lexer/whitespace.rs b/crates/swc_ecma_parser/src/lexer/whitespace.rs index cba91fa015..7211ecab11 100644 --- a/crates/swc_ecma_parser/src/lexer/whitespace.rs +++ b/crates/swc_ecma_parser/src/lexer/whitespace.rs @@ -37,26 +37,80 @@ const SPC: ByteHandler = Some(|_| 1); /// Unic...
1
153
18
1524396025909b8a1a2f3e9695b951717b89c136
강동윤 (Donny)
2025-02-27T08:47:57
chore: Fix version
diff --git a/crates/swc_malloc/Cargo.toml b/crates/swc_malloc/Cargo.toml index 97e736dba8..a02c027eaa 100644 --- a/crates/swc_malloc/Cargo.toml +++ b/crates/swc_malloc/Cargo.toml @@ -6,7 +6,7 @@ edition = { workspace = true } license = { workspace = true } name = "swc_malloc" repository = { w...
1
1
1
b1e5b2da1963aea75729a05a4fb0eb0e7df200b3
강동윤 (Donny)
2025-02-27T01:57:06
fix(es/minifier): Remove needless `println`
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs b/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs index 0ef7ef1416..432de55e5c 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs @@ -2605,7 +2605,...
1
0
1
e74929c01d2d8b9001bbc056f20ca8e1cb1c9a63
Donny/강동윤
2025-02-26T13:13:20
perf(es/minifier): Improve arrow function inlining cost analysis (#10093) **Description:** This PR fixes the cost analysis of arrow functions by making it use `Option<u8>` instead of `bool`.
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index 92b92c0556..184e27cb9c 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -250,7 +250,7 @@ impl Opti...
1
16
14
9ee79c9d475823d1472011bba9ad1f8805487a52
Donny/강동윤
2025-02-25T08:36:18
fix(es/minifier): Fix insufficient logging (#10091) **Description:** This PR makes the minifier use `report_change!()` for important messages instead of `trace_op!()`
diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index f30776b684..2e08592a6b 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -322,8 +322,8 @@ impl Opti...
1
6
6
48f68db89c5fd80c037ef9df891c60011880e7de
Donny/강동윤
2025-02-25T08:00:19
fix(es/minifier): Fix cargo feature `debug` (#10090) **Description:** This PR fixes the `debug` feature of `swc_ecma_minifier`.
diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs index 7cc57a8dd1..ad7fd261a8 100644 --- a/crates/swc_ecma_minifier/src/compress/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/mod.rs @@ -166,7 +166,7 @@ impl Compressor<'_> { #[cfg(feature = "debug")...
1
5
5
43458e91eeb276d4c0603c95da6960e4439747be
Donny/강동윤
2025-02-24T02:14:08
perf(es/lints): Remove needless locks (#10086) **Description:** `Handler` already holds mutex internally, so we don't have to do locking from linter.
diff --git a/crates/swc_ecma_lints/src/rule.rs b/crates/swc_ecma_lints/src/rule.rs index e213bc9bfb..d77f3ba8b7 100644 --- a/crates/swc_ecma_lints/src/rule.rs +++ b/crates/swc_ecma_lints/src/rule.rs @@ -1,11 +1,7 @@ -use std::{fmt::Debug, sync::Arc}; +use std::fmt::Debug; use auto_impl::auto_impl; -use parking_lot::...
1
22
43
29bd286dea65dd934c217b31d419c79b7c15767d
Donny/강동윤
2025-02-23T09:54:34
perf(es/minifier): Prevent double boxing (#10074) **Description:** `VarUsageInfo` is already boxed.
diff --git a/crates/swc_ecma_minifier/src/program_data.rs b/crates/swc_ecma_minifier/src/program_data.rs index fbbe3121cc..9d3472b858 100644 --- a/crates/swc_ecma_minifier/src/program_data.rs +++ b/crates/swc_ecma_minifier/src/program_data.rs @@ -120,7 +120,7 @@ pub(crate) struct VarUsageInfo { /// PR. (because it...
1
2
2
6a90b1fd431601e904b7ce5f18b60d36b94a5aec
Donny/강동윤
2025-02-21T03:11:34
fix(swc_common): Fix build with `swc_allocator/nightly` (#10067) **Description:** It was not shown because the feature was not enabled by default.
diff --git a/crates/swc_common/src/eq.rs b/crates/swc_common/src/eq.rs index 694753f2c1..8d569d720e 100644 --- a/crates/swc_common/src/eq.rs +++ b/crates/swc_common/src/eq.rs @@ -1,7 +1,6 @@ use std::{cell::RefCell, rc::Rc, sync::Arc}; use num_bigint::BigInt; -use swc_allocator::nightly_only; use crate::{BytePos...
3
60
61
853eb53d62b8c5684b846dd095b93a73f8d9a7b4
Donny/강동윤
2025-02-21T02:44:28
chore(swc_allocator): Add `#[inline]` to allocator methods (#10066) **Description:** It's necessary for allocators, for an unknown reason
diff --git a/crates/swc_allocator/src/allocators/arena.rs b/crates/swc_allocator/src/allocators/arena.rs index d5dcf539b5..3968b787d1 100644 --- a/crates/swc_allocator/src/allocators/arena.rs +++ b/crates/swc_allocator/src/allocators/arena.rs @@ -30,6 +30,7 @@ impl From<Bump> for Arena { #[cfg(feature = "nightly")] ...
1
12
0
c28d4942c513c4dad8bc69e1c6ca2679132b58f6
Donny/강동윤
2025-02-18T08:35:24
build(es): Select optimization level for each crates (#10046) **Description:** I used `ddt cargo bin-size select-per-crate --compare --features plugin --release`, the command added by https://github.com/swc-project/ddt/pull/46
diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 7c53597317..748fad7b9c 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -70,6 +70,80 @@ resolver = "2" # Strip debug symbols strip = "symbols" + [profile.release.package] + + [profile.release.package.std] + opt-level = 3 + + [profil...
1
74
0
32b58f0b21bba8c32ea21d3c03d068c7fe260669
Donny/강동윤
2025-02-17T00:36:58
test(hstr): Add tests (#10043)
diff --git a/crates/hstr/src/dynamic.rs b/crates/hstr/src/dynamic.rs index 54de15d807..1bbe29c50d 100644 --- a/crates/hstr/src/dynamic.rs +++ b/crates/hstr/src/dynamic.rs @@ -20,7 +20,7 @@ pub(crate) struct Metadata { } #[derive(Clone)] -pub(crate) struct Item(ThinArc<HeaderWithLength<Metadata>, u8>); +pub(crate) s...
3
42
1
2622e4e1d0263a6a10b6cd47cba3f4e50d697c32
Donny/강동윤
2025-02-14T03:49:43
perf(hstr): Skip interning if the text is long enough (#10035) **Description:** Almost all long strings are likely to differ, so there's no worth interning them. Those are mostly template literals in the case of SWC, but I didn't see any instance of very long text being identical to other instances. **Related issue:...
diff --git a/crates/hstr/src/dynamic.rs b/crates/hstr/src/dynamic.rs index 344a8238fb..54de15d807 100644 --- a/crates/hstr/src/dynamic.rs +++ b/crates/hstr/src/dynamic.rs @@ -113,6 +113,14 @@ pub(crate) trait Storage { impl Storage for &'_ mut AtomStore { #[inline(never)] fn insert_entry(self, text: Cow<str>...
1
8
0
7e21323b3bedc0552634da5d6c34f33fb2c5bad6
Donny/강동윤
2025-02-06T21:41:55
fix(es/minifier): Revert #10006 (#10007) **Description:** Invert #10006 because the analyzer should not give up analyzing the aliases because it uses the aliasing information to modify the `VarUsageInfo` of aliases.
diff --git a/crates/swc_ecma_minifier/src/program_data.rs b/crates/swc_ecma_minifier/src/program_data.rs index 4875464012..996516c7f3 100644 --- a/crates/swc_ecma_minifier/src/program_data.rs +++ b/crates/swc_ecma_minifier/src/program_data.rs @@ -118,9 +118,7 @@ pub(crate) struct VarUsageInfo { /// `infects_to`....
3
17
65
61ae579a1c7c588244317320da42a03541a7f801
Donny/강동윤
2025-02-05T01:45:33
feat(fast-ts): Support Uint8Array Input (#9879) **Related issue:** - https://github.com/swc-project/swc/issues/9851
diff --git a/Cargo.lock b/Cargo.lock index c85884672b..d53ea820b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3112,9 +3112,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.70" source = "registry+https://github.com...
5
49
53
ccb784deea5f1b8f9212e6e1e5e525a9ef4dcbe9
강동윤 (Donny)
2025-02-03T21:20:48
chore: Publish crates with `swc_core` `v13.0.2`
diff --git a/Cargo.lock b/Cargo.lock index 1e196a5e21..c85884672b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4744,7 +4744,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "13.0.1" +version = "13.0.2" dependencies = [ "anyhow", "binding_macros", @@ -6206,7 +6206,7 @@ dependencies = [ [[packag...
5
7
7
37e0ea5697c657582e132aa5fe86837c2e86cae6
Donny/강동윤
2025-01-29T22:52:26
feat: Add (experimental) nodejs interop crates (#9974) **Description:** I'm experimenting with various options.
diff --git a/Cargo.lock b/Cargo.lock index 47e3d6b62f..113b663e64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2886,6 +2886,7 @@ dependencies = [ "once_cell", "serde", "serde_json", + "tokio", ] [[package]] @@ -6012,6 +6013,27 @@ dependencies = [ "swc_visit", ] +[[package]] +name = "swc_interop_babel" +v...
8
223
0
6f781d8fd49f40bab300907eee8227a0a9d434b9
Donny/강동윤
2025-01-26T20:33:25
refactor(hstr): Remove needless operations (#9964) **Description:** We don't have an atom store merging API, so we don't need this code.
diff --git a/crates/hstr/src/dynamic.rs b/crates/hstr/src/dynamic.rs index 9ba21bc1d3..f9140e9440 100644 --- a/crates/hstr/src/dynamic.rs +++ b/crates/hstr/src/dynamic.rs @@ -2,9 +2,7 @@ use std::{ borrow::Cow, fmt::Debug, hash::{BuildHasherDefault, Hash, Hasher}, - num::NonZeroU32, ptr::NonNull,...
2
3
26
5b5c87e72480638ae382d519980302702e333305
Donny/강동윤
2025-01-21T16:25:25
refactor(es/minifier): Make `minify-all` example sequential (#9912) **Description:** While profiling performance, I found that what I want is the time used by the main thread because that's the time the user will see.
diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs index e1d82c99c9..7bb4bd01df 100644 --- a/crates/swc_ecma_minifier/examples/minify-all.rs +++ b/crates/swc_ecma_minifier/examples/minify-all.rs @@ -22,7 +22,7 @@ use swc_ecma_transforms_base::{ fixer::{fi...
1
5
7
2d87b897e6f62e07aee3b0741d3e961190986763
Donny/강동윤
2025-01-19T15:50:46
chore(es/minifier): Print slow files from `minify-all` example (#9899) **Description:** I got ``` 1970 files Total size after minification: 46586141 Max duration (per file): 1.861938125s Total run: Took 2.089914291s ``` This means that one single file is time-consuming, and we should optimize for the lar...
diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs index b2a1f1b4ed..e1d82c99c9 100644 --- a/crates/swc_ecma_minifier/examples/minify-all.rs +++ b/crates/swc_ecma_minifier/examples/minify-all.rs @@ -2,7 +2,11 @@ extern crate swc_malloc; -use std::{env, pa...
1
24
3
134000fe93029c3af887726e5be6da1fd812e330
Donny/강동윤
2025-01-19T07:39:17
feat(es/minifier): Print total size from `minify-all` example (#9897) **Description:** I need this information to know if an optimization is worth the cost
diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs index 5c3b404bfb..b2a1f1b4ed 100644 --- a/crates/swc_ecma_minifier/examples/minify-all.rs +++ b/crates/swc_ecma_minifier/examples/minify-all.rs @@ -2,7 +2,7 @@ extern crate swc_malloc; -use std::{env, fs,...
1
14
6
aee2780ed6078126e9ec4da94c14af7044157e83
강동윤 (Donny)
2025-01-16T21:02:04
chore: Publish crates with `swc_core` `v10.2.5`
diff --git a/Cargo.lock b/Cargo.lock index 0c849e4300..02bbd3b4d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4680,7 +4680,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "10.2.4" +version = "10.2.5" dependencies = [ "anyhow", "binding_macros", @@ -6001,7 +6001,7 @@ dependencies = [ [[packag...
8
9
9
fbad1364984f8b951b884b61fd924b6ea8fafbda
Donny/강동윤
2025-01-16T16:54:57
refactor(es/minifier): Make `minify-all` profilable (#9888) **Description:** I modified it to minify 10 times so I can profile it.
diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs index 252000f47e..5c3b404bfb 100644 --- a/crates/swc_ecma_minifier/examples/minify-all.rs +++ b/crates/swc_ecma_minifier/examples/minify-all.rs @@ -26,10 +26,11 @@ fn main() { let files = expand_dirs(dirs...
2
8
7
197f0bc1962875a3528b0b051be0dbea16671bc8
Donny/강동윤
2025-01-15T14:55:50
refactor(es/minifier): Use `chili` for `minify-all` example (#9885)
diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs index 46baf222a5..252000f47e 100644 --- a/crates/swc_ecma_minifier/examples/minify-all.rs +++ b/crates/swc_ecma_minifier/examples/minify-all.rs @@ -6,7 +6,7 @@ use std::{env, fs, path::PathBuf, time::Instant};...
1
63
64
9657294ff159e920e829c1a727219427f19df46e
Donny/강동윤
2025-01-15T14:39:35
refactor(es/minifier): Add a way to profile minifier for real-world inputs (#9881) **Description:** I'll create a public repository that contains the inputs for the minifier using public next.js apps and some libraries
diff --git a/crates/swc_ecma_minifier/examples/minify-all.rs b/crates/swc_ecma_minifier/examples/minify-all.rs index e7ab881ddb..46baf222a5 100644 --- a/crates/swc_ecma_minifier/examples/minify-all.rs +++ b/crates/swc_ecma_minifier/examples/minify-all.rs @@ -26,6 +26,35 @@ fn main() { eprintln!("Using {} files", f...
1
30
25
92fd3d2487f8cb4d71a0786b69784bb8d3510960
Donny/강동윤
2025-01-15T07:48:54
chore: Remove some useless benchmarks (#9880) **Description:** I added this in the past because I wanted to know the performance implications of visitors and `&dyn`, but it's not required anymore, and those benchmarks are creating useless comments combined with codspeed.
diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 2a8e7bcaec..a3172f830b 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -34,7 +34,7 @@ swc_ecma_ast = { version = "5.0.1", path = "../swc_ecma_ast" } ...
2
1
244
46e3d77396a9211ddd79c7390349053c857a9c76
Donny/강동윤
2025-01-12T09:24:37
perf(es/utils): Optimize `maybe_par_idx_raw` (#9870) **Description:** I was not sure if two creates in parallel were faster than single create in the original thread at the moment of writing the function, but when I tried, single create was faster.
diff --git a/crates/swc_ecma_utils/src/parallel.rs b/crates/swc_ecma_utils/src/parallel.rs index 68f9ba8a26..1fadf4f8a4 100644 --- a/crates/swc_ecma_utils/src/parallel.rs +++ b/crates/swc_ecma_utils/src/parallel.rs @@ -86,27 +86,23 @@ where } let (na, nb) = nodes.split_at(len / 2); +...
1
5
9
a2b7105286cbdf2c697917a54fa363e9acb58856
Donny/강동윤
2025-01-06T14:48:53
build(swc_parallel): Fix build on CI (#9844)
diff --git a/crates/swc_parallel/src/lib.rs b/crates/swc_parallel/src/lib.rs index 99bdd98a51..54772b97eb 100644 --- a/crates/swc_parallel/src/lib.rs +++ b/crates/swc_parallel/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(feature = "parallel"), allow(unused_variables))] + use std::{cell::RefCell, mem::transmute}; #[d...
1
25
1
e8b2bc3d73ff1ed9913306a2ee052fe13c8a881f
강동윤 (Donny)
2025-01-06T09:28:51
chore: Fix clippy warnings
diff --git a/crates/swc_parallel/src/lib.rs b/crates/swc_parallel/src/lib.rs index ff60c8fe70..99bdd98a51 100644 --- a/crates/swc_parallel/src/lib.rs +++ b/crates/swc_parallel/src/lib.rs @@ -21,6 +21,7 @@ impl<'a> From<Scope<'a>> for MaybeScope<'a> { } impl<'a> MaybeScope<'a> { + #[allow(clippy::redundant_closur...
1
1
0
d47844b769984630b531421a8e9fc1d51548eab7
Donny/강동윤
2025-01-06T06:04:09
refactor(es/lints): Cleanup & prepare using `chili` (#9838) **Description:** Refactor linter code to remove clippy errors and make code cleaner so I can apply `chili` in another PR more easily. **Related issue:** - Follow-up of https://github.com/swc-project/swc/pull/9837
diff --git a/Cargo.toml b/Cargo.toml index 2871bf4def..1baee1e4a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,6 +61,7 @@ resolver = "2" cargo_metadata = "0.18.1" cfg-if = "1.0.0" changesets = "0.2.2" + chili = "=0.2.0" chrono ...
3
50
51
734ec2197f1baf73af0f3d1003595017b06a389b
Donny/강동윤
2025-01-03T10:44:31
perf(es/lints): Configure a benchmark for ES lints (#9833) **Description:** The lints are causing perf issues for turbopack.
diff --git a/Cargo.lock b/Cargo.lock index a247c55251..9f8642f88a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5107,9 +5107,13 @@ dependencies = [ name = "swc_ecma_lints" version = "6.0.0" dependencies = [ + "anyhow", "auto_impl", + "codspeed-criterion-compat", + "criterion", "dashmap 5.5.3", "parking_lot", + ...
3
132
4
bc4ec009a27b3375d2203e5c51143c8dc3723049
Donny/강동윤
2025-01-01T07:03:50
perf(es/minifier): Update `hstr` to `v0.2.14` (#9828) **Description:** ``` es/minifier/libs/es/minifier/libs/rspack time: [894.78 ms 896.98 ms 899.33 ms] change: [-3.5915% -3.2425% -2.9091%] (p = 0.00 < 0.05) Performance has improved. ``` **Re...
diff --git a/Cargo.lock b/Cargo.lock index c4107e6da1..a247c55251 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1945,9 +1945,9 @@ dependencies = [ [[package]] name = "hstr" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb0a5bb453eee36a8a2e1f0...
2
3
3
f8dff5602c129b2188eeeb6ee6ada051c5035166
Donny/강동윤
2025-01-01T00:39:01
perf(es/minifier): Improve parallelism and cache friendliness (#9813)
diff --git a/Cargo.lock b/Cargo.lock index 457988c310..c4107e6da1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1945,9 +1945,9 @@ dependencies = [ [[package]] name = "hstr" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae404c0c5d4e95d4858876ab...
5
23
16
46cbc8a631560778549a0d97c05f74720883ef9c
shray sharma
2024-12-14T00:03:48
chore: Typo (#9795)
diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index 0d525db893..30604a431a 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -13,7 +13,7 @@ use indexmap::IndexSet; use petgraph::{prelude::DiGraphMap, Direction}; #[derive(Debug, Parser)] -struct CliArs...
1
2
2
bd77f449cf7558e4de936560ceccafb136b7c02c
Donny/강동윤
2024-12-02T01:20:39
chore(ci): Fix `cargo deny` action (#9773)
diff --git a/Cargo.lock b/Cargo.lock index 0b11298a00..f36eafeb52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3674,9 +3674,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a5857...
1
2
2
91a9106624f999951b9eb0f424faedb131a4297a
Donny/강동윤
2024-11-02T13:52:16
perf(es/renamer): Modify parallel renaming threshold (#9706) **Related issue:** - #9601
diff --git a/crates/swc_ecma_transforms_base/src/rename/ops.rs b/crates/swc_ecma_transforms_base/src/rename/ops.rs index bd335e694b..16ef4755c0 100644 --- a/crates/swc_ecma_transforms_base/src/rename/ops.rs +++ b/crates/swc_ecma_transforms_base/src/rename/ops.rs @@ -180,13 +180,13 @@ where } fn visit_mut_ex...
1
6
6
8f45eaf837d023847c478e562265e141213ce231
LongYinan
2024-10-23T01:31:28
fix(bindings): Update napi to handle string with `\0` (#9665) - Closes https://github.com/swc-project/swc/issues/8868
diff --git a/Cargo.lock b/Cargo.lock index 1c93d09af7..02fdcc5063 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2427,9 +2427,9 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "napi" -version = "2.14.2" +version = "2.16.13" source = "registry+https://github.com/rus...
2
15
15
4cbe33c32f244e9c568d388f19c0f297bf3d74f1
Benny Powers - עם ישראל חי!
2024-10-20T09:41:09
fix(wasm-typescript): Fix option types of functions (#9662) **Description:** The types for the wasm-typescript functions are incorrect due to a typo. Without this fix: ``` Property 'TransformConfig' is missing in type '{ module: true; filename: any; sourceMap: • true; mode: "transform"; transform: { ver...
diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index 3ac51046b9..710595d94a 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -64,7 +64,7 @@ interface Options { module?: boolean; filename?: string; mode?: Mode; - trans...
1
1
1
7823b1028a4f9630b6f84a5da1eeacca584d1d83
강동윤 (Donny)
2024-10-01T08:44:37
chore: Bump crates
diff --git a/Cargo.lock b/Cargo.lock index 44af5cb4fc..7944d127b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3939,7 +3939,7 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "1.0.0" +version = "1.0.1" dependencies = [ "arbitrary", "bytecheck", diff --git a/crates/swc_atoms/Cargo.toml b/crates/swc...
2
2
2
8d18935c6d623f62b37e2d2e542e197471c12b1e
Donny/강동윤
2024-10-01T02:46:27
chore: Git tag while bumping crates (#9596)
diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index 397799f471..34c9b59bc6 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -90,7 +90,8 @@ fn run_bump(workspace_dir: &Path, dry_run: bool) -> Result<()> { update_changelog().with_context(|| "faile...
1
20
2
5581148d602dd581c701b814cc779c4f3615b85c
강동윤 (Donny)
2024-09-24T09:18:27
chore: Fix graph creation of `cargo bump`
diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index 8dfc97878c..397799f471 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -281,10 +281,11 @@ struct InternedGraph { impl InternedGraph { fn add_node(&mut self, name: String) -> usize { - le...
1
6
4
25d9e04a6c1aa4e6ff52dea96a977dcedac4a085
강동윤 (Donny)
2024-09-19T05:23:13
chore: Fix infinite recursion of releaser
diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index 93f16c1750..8dfc97878c 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -183,6 +183,8 @@ impl<'a> Bump<'a> { change_type: Option<&ChangeType>, is_breaking: bool, ) -> Result<()> {...
1
7
0
c6cc9b65880e5e2aa4fb26157ace45f6e8004c4a
강동윤 (Donny)
2024-09-19T04:03:20
chore: Run `yarn changelog` while bumping crates
diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index a24e924324..c2aa84f1d6 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -61,6 +61,12 @@ fn run_bump(workspace_dir: &Path, dry_run: bool) -> Result<()> { } } + { + // Update cha...
1
18
0
8c007c402f73c0839e45066eaa8a01b98edf2f94
Donny/강동윤
2024-08-20T19:37:30
fix(bindings/wasm): Fix typing (#9469) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9442
diff --git a/bindings/binding_minifier_wasm/src/types.rs b/bindings/binding_minifier_wasm/src/types.rs index 8949dba7fa..34adb51871 100644 --- a/bindings/binding_minifier_wasm/src/types.rs +++ b/bindings/binding_minifier_wasm/src/types.rs @@ -696,7 +696,8 @@ export type JscTarget = | "es2019" | "es2020" | "es2...
1
2
1
339f828774e1c163fc58c43fea056e974f618490
강동윤 (Donny)
2024-08-19T12:13:35
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index a0669e65f5..199eefbe34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4939,7 +4939,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.197.0" +version = "0.197.1" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -5094,7 +...
3
4
4
25edb1c41ea9a6cc46037508775831be2afbd0d9
강동윤 (Donny)
2024-08-19T10:30:48
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index 4c2b96e547..a0669e65f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3747,7 +3747,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "swc" -version = "0.284.0" +version = "0.284.1" dependencies = [ "ansi_term", "anyhow...
2
2
2
3171020803a478d3237ad6ac6ea86d8534771a5d
강동윤 (Donny)
2024-08-16T02:12:39
chore: Bump crates
diff --git a/Cargo.lock b/Cargo.lock index f11d260c21..53baf894ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -315,7 +315,7 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.75.0" +version = "0.76.0" dependencies = [ "anyhow", "console_error_panic_hook", @@ -1093,7 +1093,7 @@ checksum = "7e...
19
70
70
2cdab4102194444ed5796db55bdab06fb6b5b9ec
강동윤 (Donny)
2024-08-12T05:48:20
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index 69628d678f..2f7465dc0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5419,7 +5419,7 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.6.1" +version = "0.6.2" dependencies = [ "either", "new_debug_unreachable", diff --git a/crates/swc_visit/Cargo.toml b/c...
2
2
2
646420edaefbb3741bcfa45a92fe78e6bf4230b6
강동윤 (Donny)
2024-08-12T04:01:49
chore: Bump crates
diff --git a/Cargo.lock b/Cargo.lock index e297e28bb1..ed8a831a32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4241,7 +4241,7 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.143.2" +version = "0.143.3" dependencies = [ "serde", "swc_atoms", @@ -4998,7 +4998,7 @@ dependencies = [ [[packa...
5
8
8
679682ce36e35dd94bbc4b3406d3c8173db10b96
Donny/강동윤
2024-08-07T07:14:24
fix(es/minifier): Preserve function length (#9389) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9356
diff --git a/crates/swc_ecma_minifier/tests/exec.rs b/crates/swc_ecma_minifier/tests/exec.rs index 11f71aaca2..daf0d4021f 100644 --- a/crates/swc_ecma_minifier/tests/exec.rs +++ b/crates/swc_ecma_minifier/tests/exec.rs @@ -11345,3 +11345,8 @@ fn issue_9184_2() { "#, ); } + +#[test] +fn issue_9356() { + run_de...
3
5
19
27ffc530302a63dd6d84758660c19aec9cefb092
Donny/강동윤
2024-08-06T02:54:43
chore: Fix version bump command (#9381)
diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index 1170207e85..099a08fd0a 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -85,7 +85,7 @@ fn bump_crate(pkg_name: &str, change_type: Option<&ChangeType>, dry_run: bool) - let mut cmd = Command::new("c...
1
1
1
f0bc1d21e1f248d1e8e50ccbd3e5d0aadef9b6ee
강동윤 (Donny)
2024-07-23T09:48:57
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index adab8654ac..6758f310c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -315,7 +315,7 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.73.0" +version = "0.73.1" dependencies = [ "anyhow", "console_error_panic_hook", @@ -1093,7 +1093,7 @@ checksum = "7e...
29
56
56
76fe139334b64c9ba62a98dc5319523d21d633f4
Donny/강동윤
2024-07-20T01:26:10
perf(es/minifier): Pre-allocate collections (#9289) **Related issue:** - Inspiration: https://github.com/oxc-project/oxc/pull/4328
diff --git a/Cargo.lock b/Cargo.lock index 6d7422dd24..067d5eb8ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4481,6 +4481,7 @@ dependencies = [ "ryu-js", "serde", "serde_json", + "swc_allocator", "swc_atoms", "swc_common", "swc_config", diff --git a/crates/swc_allocator/src/collections.rs b/crates/swc_all...
16
127
52
88723dbf19a402c6395d34b71a5a8a712b4bf1bc
Donny/강동윤
2024-07-19T06:16:48
perf(allocator): Use `std` instead of `allocator-api2` (#9281) **Description:** `std` is faster.
diff --git a/Cargo.lock b/Cargo.lock index a5abd2d7e0..b578dcc05d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,9 +67,6 @@ name = "allocator-api2" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -depen...
8
152
57
a3020b2bc77d38fde772b98a14c80deb6c4a6911
Donny/강동윤
2024-07-19T04:59:20
perf: Enable LTO for benchmarks (#9279)
diff --git a/Cargo.toml b/Cargo.toml index 08e84c3ef6..792b2271a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -147,7 +147,7 @@ resolver = "2" wasmer-wasix = { version = "0.18.0", default-features = false } [profile.release] -# lto = true +lto = true # We use CARGO_PROFILE_RELEASE_LTO for productio...
1
2
2
a31fb58399cc60ad5052d77b5accd560200a4f3d
Donny/강동윤
2024-07-18T14:03:58
feat(allocator): Feature gate `nightly` via macros (#9274) **Description:** We can make swc faster without dropping support for stable rustc.
diff --git a/crates/swc_allocator/Cargo.toml b/crates/swc_allocator/Cargo.toml index 5ee7a7eeb3..8831e0ad43 100644 --- a/crates/swc_allocator/Cargo.toml +++ b/crates/swc_allocator/Cargo.toml @@ -15,16 +15,17 @@ version = "0.1.6" [features] default = ["scoped"] +nightly = [] rkyv = ["dep:rkyv"] -scoped = ...
6
120
67
93d9e44f1c7a3afea673f056d99001a026c0a6d3
Donny/강동윤
2024-07-18T01:12:26
fix(es/quote): Fix macro (#9270)
diff --git a/crates/swc_ecma_quote_macros/src/ast/class.rs b/crates/swc_ecma_quote_macros/src/ast/class.rs index decd01eab9..2018d90f6c 100644 --- a/crates/swc_ecma_quote_macros/src/ast/class.rs +++ b/crates/swc_ecma_quote_macros/src/ast/class.rs @@ -4,6 +4,7 @@ impl_struct!( Class, [ span, + ...
7
23
13
b9b233cacd9d326afb806d856c91e38474b237c2
Donny/강동윤
2024-07-17T10:56:36
refactor(es/codegen): Revert #9248 (#9266)
diff --git a/Cargo.lock b/Cargo.lock index af69594f86..ff1517477a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3841,7 +3841,6 @@ dependencies = [ "serde", "serde_json", "sourcemap", - "swc_allocator", "swc_atoms", "swc_common", "swc_config", @@ -4152,7 +4151,6 @@ dependencies = [ "serde", "serde_json", ...
16
14
34
efc396377ff95b0c464fe4bf793dc3da59abd36e
Donny/강동윤
2024-07-17T10:29:39
test(allocator): Merge test (#9267)
diff --git a/crates/swc_allocator/tests/apis.rs b/crates/swc_allocator/tests/alloction.rs similarity index 56% rename from crates/swc_allocator/tests/apis.rs rename to crates/swc_allocator/tests/alloction.rs index bf35cea53d..99934ea4a6 100644 --- a/crates/swc_allocator/tests/apis.rs +++ b/crates/swc_allocator/tests/al...
2
29
30
6ddbfa04db63bf3afbdec5d47f5bdbf7c7ea222f
pshu
2024-07-17T05:50:04
fix(es/minifier): Collect raw str values for new Tpl element (#9261) **Description:** Convert `raw` value to `cooked` for creating a new Tpl element. **Related issue:** - Closes https://github.com/swc-project/swc/issues/9184
diff --git a/crates/swc_ecma_minifier/src/compress/pure/strings.rs b/crates/swc_ecma_minifier/src/compress/pure/strings.rs index a3273251ee..ae089dd74e 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/strings.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/strings.rs @@ -121,13 +121,15 @@ impl Pure<'_> { ...
2
42
14
baeb9e2df92892f9486c72cdc787bca8c3858f30
Levi
2024-07-16T09:56:05
fix(es/minifier): Fix panic in bitwise logic and incorrect values (#9258) **Description:** This PR fixes all issues listed in #9256 as well as the following: `1.7976931348623157e+308 << 1.7976931348623157e+308` - swc currently does not transform this and leaves it as-is Anything involving low floating-point ...
diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs b/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs index f8d31f7083..837d215b87 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/expr/mod....
3
32
46
970f32398c6ff444540a31e1172a33b6155ed18b
Donny/강동윤
2024-07-15T23:21:01
perf(es/codegen): Use scoped allocator (#9248) **Description:** Main: <img width="711" alt="스크린샷 2024-07-15 오후 8 05 50" src="https://github.com/user-attachments/assets/508a29e8-744f-4017-a819-b7576e61d287"> new: <img width="711" alt="스크린샷 2024-07-15 오후 8 05 19" src="https://github.com/user-...
diff --git a/Cargo.lock b/Cargo.lock index dcc366fbd3..ca80e56ce4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3841,6 +3841,7 @@ dependencies = [ "serde", "serde_json", "sourcemap", + "swc_allocator", "swc_atoms", "swc_common", "swc_config", @@ -4151,6 +4152,7 @@ dependencies = [ "serde", "serde_json", ...
16
34
14
6e098aeeb5976292e43786f72bd91f1de50a9daa
Donny/강동윤
2024-07-15T19:02:52
refactor(allocator): Use RAII guard instead of `scope` (#9254) **Related issue:** - https://github.com/swc-project/swc/issues/9253
diff --git a/crates/swc_allocator/benches/bench.rs b/crates/swc_allocator/benches/bench.rs index 355e6f9392..8b1b103284 100644 --- a/crates/swc_allocator/benches/bench.rs +++ b/crates/swc_allocator/benches/bench.rs @@ -39,30 +39,30 @@ fn bench_alloc(c: &mut Criterion) { fn direct_alloc_scoped(b: &mut Bencher, time...
5
81
39
d8e8b04cd877bcf00157eeee9b7af0b4244a1827
Donny/강동윤
2024-07-15T15:25:00
fix(allocator): Remove wrong assertions and add tests (#9252)
diff --git a/crates/swc_allocator/src/alloc.rs b/crates/swc_allocator/src/alloc.rs index 91cd4397d0..caf934f661 100644 --- a/crates/swc_allocator/src/alloc.rs +++ b/crates/swc_allocator/src/alloc.rs @@ -23,6 +23,11 @@ pub struct Allocator { impl Allocator { /// Invokes `f` in a scope where the allocations are d...
3
43
7
e7ce94b5ee713dc76383c35d99dd6a707c90339c
Donny/강동윤
2024-07-15T12:51:42
test: Enable scoped API by default (#9247) **Description:** This PR is to profile real performance using codspeed
diff --git a/crates/swc_allocator/Cargo.toml b/crates/swc_allocator/Cargo.toml index e8a67404b1..499855a5c5 100644 --- a/crates/swc_allocator/Cargo.toml +++ b/crates/swc_allocator/Cargo.toml @@ -14,9 +14,10 @@ version = "0.1.5" [features] -rkyv = ["dep:rkyv"] -scoped = [] -serde = ["dep:serde", "dep:serde...
3
6
5
521161e17009e2025ed9b042579f8cd055e26816
CPunisher
2024-07-15T06:54:53
fix(es/minifier): Remove optimization for array pattern (#9241) **Description:** This could be an unsound optimization. The issue shows a bad case. **Related issue:** - Closes https://github.com/swc-project/swc/issues/8918
diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs b/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs index 6c248ec58e..e6adb60134 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/branch/mod.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/bra...
2
1
37
b6c046890f7a31a55d11dfae4cf9e11acffc9407
강동윤 (Donny)
2024-07-15T06:02:24
chore: Publish crates
diff --git a/Cargo.lock b/Cargo.lock index 2cbd3fe4c6..bd3ab59076 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4973,7 +4973,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_fast_ts_...
2
2
2
8231e3cd4f72ad120735f6a21d9616e98d61eed1
Donny/강동윤
2024-07-14T15:39:54
feat(es/typescript): Add `transform` mode back to fast TS strip (#9237)
diff --git a/Cargo.lock b/Cargo.lock index 3ad85d1560..2bd7c39b79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4982,7 +4982,10 @@ dependencies = [ "serde", "swc_common", "swc_ecma_ast", + "swc_ecma_codegen", "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_transforms_typescript", "swc_ecma_visit",...
6
198
83
8d5670e72bb930f18c5d1d4262caa80cae0be03a
Donny/강동윤
2024-07-14T15:37:38
refactor(allocator): Use `&` instead of a thread-local (#9235) **Description:** This is a part of https://github.com/swc-project/swc/pull/9230. I profiled the performance, and `thread_local` took too long to get the address of the thread-local variable. So, I inlined the reference into the allocator. # Benchm...
diff --git a/Cargo.lock b/Cargo.lock index 7a6dfd0859..3ad85d1560 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3710,6 +3710,7 @@ dependencies = [ "serde", "serde_derive", "swc_malloc", + "triomphe", ] [[package]] @@ -5876,9 +5877,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.11" +ver...
8
86
105
e343eb6de2747086f9873c6444964500e40b4936
Donny/강동윤
2024-07-14T04:27:41
feat(allocator): Implement `SwcAlloc` (#9232) **Related issue:** - This is a part of https://github.com/swc-project/swc/pull/9230
diff --git a/Cargo.lock b/Cargo.lock index 226a451392..de37a4f3b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,6 +62,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7...
15
1,259
113
bd4bef16fb6d21d97699d46649c8db6af1dd27df
Donny/강동윤
2024-07-12T12:34:42
test(es/base): Disable flaky benchmark (#9221)
diff --git a/crates/swc/benches/typescript.rs b/crates/swc/benches/typescript.rs index 8fb3c7dd38..8e0aff313f 100644 --- a/crates/swc/benches/typescript.rs +++ b/crates/swc/benches/typescript.rs @@ -13,7 +13,7 @@ use swc_common::{ use swc_compiler_base::PrintArgs; use swc_ecma_ast::{EsVersion, Program}; use swc_ecma...
1
24
23
602e0e5aa14ecb3a7bc20bfe77aac2badaa54bb2
Donny/강동윤
2024-07-12T03:55:05
fix(ci): Fix CI of `peff (#9216)
diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 8734dd5d00..5a67f30a24 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -1003,9 +1003,9 @@ impl Transform ...
1
4
4
b012d54df619fee92dbec47b89f3d4e0b683629d
강동윤 (Donny)
2024-07-12T03:43:48
chore: Fix for rebase
diff --git a/crates/swc_ecma_compat_es2015/src/template_literal.rs b/crates/swc_ecma_compat_es2015/src/template_literal.rs index d8b030d366..ab63cab518 100644 --- a/crates/swc_ecma_compat_es2015/src/template_literal.rs +++ b/crates/swc_ecma_compat_es2015/src/template_literal.rs @@ -5,12 +5,8 @@ use swc_atoms::JsWord; ...
4
7
20
a7d236c1628e5a972320113a2d452174e40b3fd2
강동윤 (Donny)
2024-07-10T12:50:16
chore: Fix for the rebase
diff --git a/crates/swc_css_parser/benches/compare.rs b/crates/swc_css_parser/benches/compare.rs index 89ae9f3f00..67298eb67e 100644 --- a/crates/swc_css_parser/benches/compare.rs +++ b/crates/swc_css_parser/benches/compare.rs @@ -1,10 +1,6 @@ extern crate swc_malloc; use codspeed_criterion_compat::{black_box, crit...
4
0
10
2aef14d34d22df41bd6f421633eadc50826217cc
Levi
2024-07-12T03:15:12
feat(es/utils): Support for arrays using `cast_to_number` (#9212) **Description:** This PR allows `ArrayLit`s to be converted to numbers in the `cast_to_number` function. This allows expressions using arrays to be converted to numbers. See some example expressions below that were previously not able to be comput...
diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs b/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs index b70c0743a1..ba3ad6f301 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/exp...
2
28
1
efb86368343e7d9909fec21cae8824edac5008e2
Donny/강동윤
2024-07-11T13:57:04
fix(es/modules): Fix lint issue (#9206) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9182
diff --git a/crates/swc_ecma_transforms_module/src/lib.rs b/crates/swc_ecma_transforms_module/src/lib.rs index 55c7da5163..7956a5409e 100644 --- a/crates/swc_ecma_transforms_module/src/lib.rs +++ b/crates/swc_ecma_transforms_module/src/lib.rs @@ -1,5 +1,4 @@ #![deny(clippy::all)] -#![deny(unused)] #![allow(clippy::ne...
1
0
1
be99ce0a570c41b3fd471c5d609bd63c25740b36
강동윤 (Donny)
2024-07-10T11:27:34
doc(allocator): Mention `oxc_allocator`
diff --git a/crates/swc_allocator/src/lib.rs b/crates/swc_allocator/src/lib.rs index 8ed0238693..5c6a391788 100644 --- a/crates/swc_allocator/src/lib.rs +++ b/crates/swc_allocator/src/lib.rs @@ -1,3 +1,7 @@ +//! Allocator for swc. +//! +//! API designed after [`oxc_allocator`](https://github.com/oxc-project/oxc/tree/72...
1
4
0
f3681cb34009824725d39d25b0cbf787ec1e8bd8
Donny/강동윤
2024-07-10T09:47:14
feat(allocator): Initialize package (#9195)
diff --git a/Cargo.lock b/Cargo.lock index 44db70f6a3..c6c3b4f5d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -403,9 +403,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c...
4
163
2
3a23b3d120a14ca514204ef80bf744bb483dcfd6
magic-akari
2024-07-10T07:00:11
perf(bindings/wasm): Shrink the size of the wasm file (#9191)
diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 8dcc3014dd..0ebbdcbd5f 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -16,11 +16,12 @@ resolver = "2" # lto = "fat" # debug = true -# opt-level = 'z' +opt-level = 'z' # Strip debug symbols strip = "symbols" +codegen-units = 1 [prof...
1
2
1
9904a53b7fc4c828c06071c19d08c27b5c1d9f42
Boshen
2024-07-08T11:18:29
chore(es): Bump `unicode-id-start` to `v1.2.0` (#9177) This bumps unicode support to unicode v15.1.0 The crate version is unpinned by removing the katana middle dot problem occured in unicode v15.1.0 See https://github.com/oxc-project/unicode-id-start/pull/3 relates https://github.com/swc-project/swc/issues/...
diff --git a/Cargo.lock b/Cargo.lock index cfd9ec0051..e5f9e0abfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5846,9 +5846,9 @@ checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" [[package]] name = "unicode-id-start" -version = "1.0.4" +version = "1.2.0" source = "registry+https://githu...
2
3
3
c7acb82c8ca20c0d0adfd6cecf715285127acd7f
SWC Bot
2024-07-07T00:36:16
chore: Bump crates
diff --git a/Cargo.lock b/Cargo.lock index 933d1f0f30..cfd9ec0051 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3827,7 +3827,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.96.9" +version = "0.96.10" dependencies = [ "anyhow", "binding_macros", @@ -5051,7 +5051,7 @@ dependencies = [ [[packa...
3
4
4
d099675d83c405ab8de7929b23d185ef4255f4e6
LongYinan
2024-07-07T00:34:34
chore: Upgrade `mimalloc` (#9173) mimalloc-rust hasn't been upgraded for a long time, switch back to `mimalloc` in this pr.
diff --git a/Cargo.lock b/Cargo.lock index be560198eb..933d1f0f30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -964,12 +964,6 @@ dependencies = [ "syn 2.0.55", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c95473...
3
17
24
8b66d5e89b3489da0339de33a439ba365a60d2ce
Donny/강동윤
2024-07-06T14:13:09
fix(es/parser): Revert #9141 (#9171) **Description:** Reverts https://github.com/swc-project/swc/issues/9141 because it caused an issue for https://github.com/toeverything/AFFiNE.
diff --git a/crates/swc_ecma_parser/src/parser/class_and_fn.rs b/crates/swc_ecma_parser/src/parser/class_and_fn.rs index 95d754e0d9..83573ecbcf 100644 --- a/crates/swc_ecma_parser/src/parser/class_and_fn.rs +++ b/crates/swc_ecma_parser/src/parser/class_and_fn.rs @@ -745,7 +745,7 @@ impl<I: Tokens> Parser<I> { ...
8
77
110
d86ca2d49ec72614ec8c2493a28f27267e6f8b8f
Donny/강동윤
2024-07-06T13:14:33
fix(es/testing): Fix `PluginCommentProxy` (#9170) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9169
diff --git a/crates/swc_plugin_proxy/src/comments/plugin_comments_proxy.rs b/crates/swc_plugin_proxy/src/comments/plugin_comments_proxy.rs index 3c7a2c5e76..353ebe97e0 100644 --- a/crates/swc_plugin_proxy/src/comments/plugin_comments_proxy.rs +++ b/crates/swc_plugin_proxy/src/comments/plugin_comments_proxy.rs @@ -77,68...
1
20
20
3638e97c8083a607a9ce295c7465501a7dc379f8
Donny/강동윤
2024-07-06T06:20:01
feat(es/testing): Improve comment testing story (#9150) **Description:** This PR makes `PluginCommentProxy` work by default in `test_fixture()`. This PR adds a scoped-local to `swc_common`, and uses it from `swc_ecma_transforms_testing`. It can't be tested in the main repository, though. We cannot enable `plugin...
diff --git a/crates/swc_common/src/comments.rs b/crates/swc_common/src/comments.rs index ac70c0be81..4364381904 100644 --- a/crates/swc_common/src/comments.rs +++ b/crates/swc_common/src/comments.rs @@ -690,3 +690,9 @@ pub trait CommentsExt: Comments { #[allow(deprecated)] impl<C> CommentsExt for C where C: Comment...
3
102
32
17aab3bf9ac7b08498736d4a53c43e7f4f293ced
SWC Bot
2024-07-06T04:48:20
chore: Bump crates
diff --git a/Cargo.lock b/Cargo.lock index afcc146e86..de60cae573 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1060,7 +1060,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "dbg-swc" -version = "0.96.6" +version = "0.96.7" dependencies = [ "anyhow", "clap 3....
2
2
2
b0f233f0a2c39c38c364617ff9cbf37e8eb2175f
강동윤 (Donny)
2024-07-06T00:33:36
chore: Bump `preset_env_base`
diff --git a/Cargo.lock b/Cargo.lock index c04928cc4a..494b2982d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2751,7 +2751,7 @@ dependencies = [ [[package]] name = "preset_env_base" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ahash 0.8.8", "anyhow", diff --git a/crates/preset_env_base/Cargo.toml b...
2
3
3
42b4caf5735bc0a025024cf968ef16cd06d9f0dc
Donny/강동윤
2024-07-05T08:44:27
fix(es/renamer): Remove `FastJsWord` (#9136) **Description:** Actually it was slower. ``` Starting recording with the Time Profiler template. Launching process: full-4ec72b7d24d0fcd8. Ctrl-C to stop the recording Gnuplot not found, using plotters backend Benchmarking es/minify/libraries/antd Benchmarking es...
diff --git a/crates/swc_ecma_transforms_base/src/rename/analyzer/reverse_map.rs b/crates/swc_ecma_transforms_base/src/rename/analyzer/reverse_map.rs index 1c497acca2..c76254338a 100644 --- a/crates/swc_ecma_transforms_base/src/rename/analyzer/reverse_map.rs +++ b/crates/swc_ecma_transforms_base/src/rename/analyzer/reve...
3
24
70
9d9fe6625bd4a7e05e9f29971e8f1a5c5e2470a8
Donny/강동윤
2024-07-05T00:49:43
refactor(es/parser): Improve readability (#9141)
diff --git a/crates/swc_ecma_parser/src/parser/class_and_fn.rs b/crates/swc_ecma_parser/src/parser/class_and_fn.rs index 83573ecbcf..95d754e0d9 100644 --- a/crates/swc_ecma_parser/src/parser/class_and_fn.rs +++ b/crates/swc_ecma_parser/src/parser/class_and_fn.rs @@ -745,7 +745,7 @@ impl<I: Tokens> Parser<I> { ...
8
110
77
e94e5e70c377fae13cd5575f7d4ce84d9d5f10f7
Donny/강동윤
2024-07-04T05:05:04
fix(es/loader): Exclude `.json` from default extension list (#9134) **Related issue:** - Closes #9121
diff --git a/crates/swc_ecma_loader/src/resolvers/node.rs b/crates/swc_ecma_loader/src/resolvers/node.rs index 078bfd3cdb..bc2d74fc74 100644 --- a/crates/swc_ecma_loader/src/resolvers/node.rs +++ b/crates/swc_ecma_loader/src/resolvers/node.rs @@ -109,7 +109,7 @@ pub struct NodeModulesResolver { ignore_node_modules...
1
1
1
dfee5f838b76dae012393e207902effa0a69dd0d
Donny/강동윤
2024-07-03T06:10:10
refactor(es/typescript): Extract type annotation proposal out (#9127) **Description:** The Node.js team wants a Wasm package that only implements type annotation proposals. So, we need to refactor our TypeScript transform to allow it. **Related issue:** - https://github.com/nodejs/loaders/issues/208#issuec...
diff --git a/bindings/binding_typescript_wasm/src/lib.rs b/bindings/binding_typescript_wasm/src/lib.rs index 304987a301..21fb9bcd41 100644 --- a/bindings/binding_typescript_wasm/src/lib.rs +++ b/bindings/binding_typescript_wasm/src/lib.rs @@ -11,11 +11,14 @@ use swc_core::{ parser::{ parse_file_as...
3
16
13
f409bc09d5613db8342e98552efc520f9c2c393c
Donny/강동윤
2024-07-03T01:40:16
build(bindings): Fix build of typescript binding (#9125)
diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 5c409250b7..b0294c1649 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -24,8 +24,11 @@ serde = { version = "1", features = ["derive"] } serde-wasm-b...
2
8
12
72021def15225c7355f80b72b16ab3bfd99f51ad
Donny/강동윤
2024-07-01T06:01:34
perf(es/lexer): Do not use `memchr::memmem` in parser (#9118) Reverts swc-project/swc#9096. I'm reverting this as this regressed performance in `linux-x86_64`.
diff --git a/Cargo.lock b/Cargo.lock index c32bb2cd81..12fe8f8615 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4455,7 +4455,6 @@ version = "0.146.7" dependencies = [ "criterion", "either", - "memchr", "new_debug_unreachable", "num-bigint", "num-traits", diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates...
3
25
23
8ef30cc08c86251bb8bebf66286949805e332b6c
Donny/강동윤
2024-06-25T14:02:38
perf(es/parser): Increase token context size (#9104) **Description:** Now, `TokenContext` is 1 byte, so we can increase the stack size for it. ``` Gnuplot not found, using plotters backend Benchmarking es/parser/colors Benchmarking es/parser/colors: Warming up for 3.0000 s Benchmarking es/parser/colors: Coll...
diff --git a/crates/swc_ecma_parser/src/lexer/state.rs b/crates/swc_ecma_parser/src/lexer/state.rs index f27b5bca1a..58e018f09c 100644 --- a/crates/swc_ecma_parser/src/lexer/state.rs +++ b/crates/swc_ecma_parser/src/lexer/state.rs @@ -656,7 +656,7 @@ impl State { } #[derive(Clone, Default)] -pub struct TokenContext...
1
1
1
c0602c81db55777be726cd8fe2fd074e34bd4d96
Donny/강동윤
2024-06-25T13:38:30
perf(es/parser): Add a check before numeric operations (#9105) **Description:** `c.is_ascii_uppercase()` was expensive than expected.
diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs index 3bc3545018..ba807a39ae 100644 --- a/crates/swc_ecma_parser/src/lexer/mod.rs +++ b/crates/swc_ecma_parser/src/lexer/mod.rs @@ -800,7 +800,7 @@ impl<'a> Lexer<'a> { loop { if let Some(c) = l....
1
1
1