From 6f58abc1d8873e7b3ebac0dda26372581d453640 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Tue, 15 Jul 2025 04:51:57 +0000 Subject: [PATCH] perf(semantic): inline `SemanticBuilder::pop_ast_node` (#12280) --- crates/oxc_semantic/src/builder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/oxc_semantic/src/builder.rs b/crates/oxc_semantic/src/builder.rs index f9c6a8cacab3d..be5bde8827f21 100644 --- a/crates/oxc_semantic/src/builder.rs +++ b/crates/oxc_semantic/src/builder.rs @@ -313,6 +313,7 @@ impl<'a> SemanticBuilder<'a> { self.record_ast_node(); } + #[inline] fn pop_ast_node(&mut self) { self.current_node_id = self.nodes.parent_id(self.current_node_id); } @@ -353,6 +354,7 @@ impl<'a> SemanticBuilder<'a> { } /// Is the current scope in strict mode? + #[inline] pub(crate) fn strict_mode(&self) -> bool { self.current_scope_flags().is_strict_mode() }