Skip to content

Commit

Permalink
fix: remove redundent register.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa authored and Boshen committed May 10, 2024
1 parent a58beda commit 7e78502
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,6 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
/* cfg */

if let Some(break_target) = maybe_label {
/* cfg */
let break_label = self.cfg.new_register();
self.cfg.use_this_register = Some(break_label);
/* cfg */

self.visit_label_identifier(break_target);

/* cfg */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ digraph {
6 [ label = "Unreachable()\nbreak $0"]
7 [ label = "Unreachable()"]
8 [ label = ""]
9 [ label = "Unreachable()\nbreak $2"]
9 [ label = "Unreachable()\nbreak $1"]
10 [ label = "$return = <value>"]
11 [ label = ""]
12 [ label = "Unreachable()"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bb8: {

bb9: {
Unreachable()
break $2
break $1
}

bb10: {
Expand Down

0 comments on commit 7e78502

Please sign in to comment.