From 5da69fc774d3c89fbfe5cc070a2c5e4bc0cdcc21 Mon Sep 17 00:00:00 2001 From: bohan Date: Tue, 29 Jul 2025 17:54:41 +0800 Subject: [PATCH 1/2] refactor(hstr): use default inline strategy --- crates/hstr/src/dynamic.rs | 3 +-- crates/hstr/src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/hstr/src/dynamic.rs b/crates/hstr/src/dynamic.rs index 4e49ef17a1c5..891d1b7db548 100644 --- a/crates/hstr/src/dynamic.rs +++ b/crates/hstr/src/dynamic.rs @@ -174,7 +174,6 @@ trait Storage { } impl Storage for &'_ mut AtomStore { - #[inline(never)] fn insert_entry(self, text: &str, hash: u64) -> Item { // If the text is too long, interning is not worth it. if text.len() > 512 { @@ -203,7 +202,7 @@ impl Storage for &'_ mut AtomStore { } } -#[inline(never)] +#[inline(always)] fn calc_hash(text: &str) -> u64 { let mut hasher = FxHasher::default(); text.hash(&mut hasher); diff --git a/crates/hstr/src/lib.rs b/crates/hstr/src/lib.rs index f9cda1169cc0..6f2c842bcf33 100644 --- a/crates/hstr/src/lib.rs +++ b/crates/hstr/src/lib.rs @@ -252,7 +252,6 @@ impl Atom { } impl Atom { - #[inline(never)] fn get_hash(&self) -> u64 { match self.tag() { DYNAMIC_TAG => { @@ -270,7 +269,6 @@ impl Atom { } } - #[inline(never)] fn as_str(&self) -> &str { match self.tag() { DYNAMIC_TAG => unsafe { From 2a35c5a6f6e48131f3f7b37c7f05ee0d826f5e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 29 Jul 2025 21:22:06 +0900 Subject: [PATCH 2/2] Create fluffy-rats-play.md --- .changeset/fluffy-rats-play.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/fluffy-rats-play.md diff --git a/.changeset/fluffy-rats-play.md b/.changeset/fluffy-rats-play.md new file mode 100644 index 000000000000..1d283c7b5590 --- /dev/null +++ b/.changeset/fluffy-rats-play.md @@ -0,0 +1,6 @@ +--- +hstr: patch +swc_core: patch +--- + +refactor(hstr): use default inline strategy