Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,8 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {

fn visit_function(&mut self, func: &Function<'a>, flags: ScopeFlags) {
/* cfg */
// We add a new basic block to the cfg before entering the node
// so that the correct cfg_ix is associated with the ast node.
let (before_function_graph_ix, error_harness, function_graph_ix) =
control_flow!(self, |cfg| {
let before_function_graph_ix = cfg.current_node_ix;
Expand All @@ -1607,8 +1609,6 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
});
/* cfg */

// We add a new basic block to the cfg before entering the node
// so that the correct cfg_ix is associated with the ast node.
let kind = AstKind::Function(self.alloc(func));
self.enter_node(kind);
self.function_stack.push(self.current_node_id);
Expand Down Expand Up @@ -1696,6 +1696,8 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {

fn visit_arrow_function_expression(&mut self, expr: &ArrowFunctionExpression<'a>) {
/* cfg */
// We add a new basic block to the cfg before entering the node
// so that the correct cfg_ix is associated with the ast node.
let (current_node_ix, error_harness, function_graph_ix) = control_flow!(self, |cfg| {
let current_node_ix = cfg.current_node_ix;
cfg.push_finalization_stack();
Expand All @@ -1706,8 +1708,6 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
});
/* cfg */

// We add a new basic block to the cfg before entering the node
// so that the correct cfg_ix is associated with the ast node.
let kind = AstKind::ArrowFunctionExpression(self.alloc(expr));
self.enter_node(kind);
self.function_stack.push(self.current_node_id);
Expand Down
Loading