Skip to content

Commit

Permalink
perf(semantic): inline ast record functions
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jul 15, 2024
1 parent 8fad7db commit fbdd40f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,14 @@ impl<'a> SemanticBuilder<'a> {
}
}

#[inline]
fn record_ast_nodes(&mut self) {
if self.cfg.is_some() {
self.ast_node_records.push(AstNodeId::dummy());
}
}

#[inline]
#[allow(clippy::unnecessary_wraps)]
fn retrieve_recorded_ast_node(&mut self) -> Option<AstNodeId> {
if self.cfg.is_some() {
Expand All @@ -264,6 +266,7 @@ impl<'a> SemanticBuilder<'a> {
}
}

#[inline]
fn record_ast_node(&mut self) {
if self.cfg.is_some() {
if let Some(record) = self.ast_node_records.last_mut() {
Expand Down

0 comments on commit fbdd40f

Please sign in to comment.