mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(semantic): comment why extra CFG enabled check (#4274)
Add a comment referencing conclusions of #4273.
This commit is contained in:
parent
f9d3f2ef55
commit
639fd48227
1 changed files with 3 additions and 0 deletions
|
|
@ -268,6 +268,9 @@ impl<'a> SemanticBuilder<'a> {
|
|||
|
||||
#[inline]
|
||||
fn record_ast_node(&mut self) {
|
||||
// The `self.cfg.is_some()` check here could be removed, since `ast_node_records` is empty
|
||||
// if CFG is disabled. But benchmarks showed removing the extra check is a perf regression.
|
||||
// <https://github.com/oxc-project/oxc/pull/4273>
|
||||
if self.cfg.is_some() {
|
||||
if let Some(record) = self.ast_node_records.last_mut() {
|
||||
if *record == AstNodeId::dummy() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue