From aa0ba238720f9dc0024b1ce1796d70d90fea4d1c Mon Sep 17 00:00:00 2001 From: IWANABETHATGUY Date: Sat, 7 Sep 2024 12:02:34 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20snap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../integration/snapshots/argument_map.snap | 3 +- .../snapshots/argument_map.snap.new | 39 --- .../tests/integration/snapshots/class.snap | 3 +- .../integration/snapshots/class.snap.new | 39 --- .../integration/snapshots/do_while_break.snap | 4 +- .../snapshots/do_while_break.snap.new | 96 ------- .../tests/integration/snapshots/for_in.snap | 3 +- .../integration/snapshots/for_in.snap.new | 69 ----- .../snapshots/function_as_expression.snap | 44 +-- .../snapshots/function_as_expression.snap.new | 258 ------------------ .../snapshots/function_in_finally.snap | 4 +- .../snapshots/function_in_finally.snap.new | 66 ----- .../snapshots/if_stmt_in_for_in.snap | 3 +- .../snapshots/if_stmt_in_for_in.snap.new | 142 ---------- .../parenthesized_and_sequence_expr.snap | 6 +- .../parenthesized_and_sequence_expr.snap.new | 59 ---- .../yield_as_statement_and_expression.snap | 3 +- ...yield_as_statement_and_expression.snap.new | 40 --- 18 files changed, 40 insertions(+), 841 deletions(-) delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/argument_map.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/class.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/for_in.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap.new delete mode 100644 crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap.new diff --git a/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap b/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap index 8efbe03ef451a0..32cd82da9d8524 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap @@ -17,6 +17,7 @@ bb2: { bb3: { statement + return } bb4: { @@ -27,7 +28,7 @@ digraph { 0 [ label = "" ] 1 [ label = "" ] 2 [ label = "" ] - 3 [ label = "ExpressionStatement" ] + 3 [ label = "ExpressionStatement\nreturn" ] 4 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap.new b/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap.new deleted file mode 100644 index 034c7bf959cd0c..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/argument_map.snap.new +++ /dev/null @@ -1,39 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/argument_map.js ---- -bb0: { - -} - -bb1: { - -} - -bb2: { - -} - -bb3: { - statement - return -} - -bb4: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "" ] - 2 [ label = "" ] - 3 [ label = "ExpressionStatement\nreturn" ] - 4 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 0 [ label = "Error(Implicit)" ] - 1 -> 4 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/class.snap b/crates/oxc_semantic/tests/integration/snapshots/class.snap index a2e523c101260b..6b178e25c28235 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/class.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/class.snap @@ -17,6 +17,7 @@ bb2: { bb3: { statement + return } bb4: { @@ -27,7 +28,7 @@ digraph { 0 [ label = "" ] 1 [ label = "" ] 2 [ label = "" ] - 3 [ label = "ExpressionStatement" ] + 3 [ label = "ExpressionStatement\nreturn" ] 4 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/class.snap.new b/crates/oxc_semantic/tests/integration/snapshots/class.snap.new deleted file mode 100644 index 5ca25ed45a1c13..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/class.snap.new +++ /dev/null @@ -1,39 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/class.js ---- -bb0: { - -} - -bb1: { - -} - -bb2: { - -} - -bb3: { - statement - return -} - -bb4: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "" ] - 2 [ label = "" ] - 3 [ label = "ExpressionStatement\nreturn" ] - 4 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 0 [ label = "Error(Implicit)" ] - 1 -> 4 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap b/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap index ae5a163fa42c75..351989899ae011 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap @@ -49,7 +49,7 @@ bb10: { } bb11: { - + return } bb12: { @@ -68,7 +68,7 @@ digraph { 8 [ label = "unreachable" ] 9 [ label = "Condition(true)" ] 10 [ label = "" ] - 11 [ label = "" ] + 11 [ label = "return" ] 12 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap.new b/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap.new deleted file mode 100644 index 3bb701da9967b1..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/do_while_break.snap.new +++ /dev/null @@ -1,96 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/do_while_break.js ---- -bb0: { - -} - -bb1: { - statement -} - -bb2: { - -} - -bb3: { - statement -} - -bb4: { - -} - -bb5: { - statement -} - -bb6: { - statement -} - -bb7: { - statement - break -} - -bb8: { - unreachable -} - -bb9: { - condition -} - -bb10: { - -} - -bb11: { - return -} - -bb12: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "VariableDeclaration" ] - 2 [ label = "" ] - 3 [ label = "TryStatement" ] - 4 [ label = "" ] - 5 [ label = "BlockStatement" ] - 6 [ label = "DoWhileStatement" ] - 7 [ label = "BlockStatement\nbreak" ] - 8 [ label = "unreachable" ] - 9 [ label = "Condition(true)" ] - 10 [ label = "" ] - 11 [ label = "return" ] - 12 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 5 -> 2 [ label = "Error(Implicit)" ] - 5 -> 4 [ label = "Finalize" ] - 6 -> 2 [ label = "Error(Implicit)" ] - 4 -> 6 [ label = "Normal" ] - 7 -> 2 [ label = "Error(Implicit)" ] - 8 -> 2 [ label = "Error(Implicit)" , style = "dotted" ] - 7 -> 8 [ label = "Unreachable" , style = "dotted" ] - 9 -> 2 [ label = "Error(Implicit)" , style = "dotted" ] - 10 -> 2 [ label = "Error(Implicit)" ] - 6 -> 7 [ label = "Normal" ] - 8 -> 9 [ label = "Normal" , style = "dotted" ] - 9 -> 10 [ label = "Normal" , style = "dotted" ] - 9 -> 7 [ label = "Backedge" , style = "dotted" ] - 7 -> 10 [ label = "Jump" ] - 11 -> 2 [ label = "Error(Implicit)" ] - 3 -> 5 [ label = "Normal" ] - 10 -> 11 [ label = "Join" ] - 12 -> 0 [ label = "Error(Implicit)" ] - 1 -> 12 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/for_in.snap b/crates/oxc_semantic/tests/integration/snapshots/for_in.snap index 92f50f16ba64b5..1264b6ab3756a0 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/for_in.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/for_in.snap @@ -34,6 +34,7 @@ bb6: { bb7: { statement + return } bb8: { @@ -48,7 +49,7 @@ digraph { 4 [ label = "Condition(test)" ] 5 [ label = "" ] 6 [ label = "ExpressionStatement" ] - 7 [ label = "ExpressionStatement" ] + 7 [ label = "ExpressionStatement\nreturn" ] 8 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/for_in.snap.new b/crates/oxc_semantic/tests/integration/snapshots/for_in.snap.new deleted file mode 100644 index 095cee023a1ca5..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/for_in.snap.new +++ /dev/null @@ -1,69 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/for_in.js ---- -bb0: { - -} - -bb1: { - -} - -bb2: { - -} - -bb3: { - statement - statement -} - -bb4: { - condition -} - -bb5: { - -} - -bb6: { - statement -} - -bb7: { - statement - return -} - -bb8: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "" ] - 2 [ label = "" ] - 3 [ label = "ForStatement\nVariableDeclaration" ] - 4 [ label = "Condition(test)" ] - 5 [ label = "" ] - 6 [ label = "ExpressionStatement" ] - 7 [ label = "ExpressionStatement\nreturn" ] - 8 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 2 [ label = "Error(Implicit)" ] - 5 -> 2 [ label = "Error(Implicit)" ] - 6 -> 2 [ label = "Error(Implicit)" ] - 7 -> 2 [ label = "Error(Implicit)" ] - 3 -> 4 [ label = "Normal" ] - 4 -> 6 [ label = "Jump" ] - 6 -> 5 [ label = "Backedge" ] - 5 -> 4 [ label = "Backedge" ] - 4 -> 7 [ label = "Normal" ] - 8 -> 0 [ label = "Error(Implicit)" ] - 1 -> 8 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap b/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap index e2c2872a6294c6..689aa2305108cf 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap @@ -16,7 +16,7 @@ bb2: { } bb3: { - + return } bb4: { @@ -28,7 +28,7 @@ bb5: { } bb6: { - + return } bb7: { @@ -40,7 +40,7 @@ bb8: { } bb9: { - + return } bb10: { @@ -52,7 +52,7 @@ bb11: { } bb12: { - + return } bb13: { @@ -64,7 +64,7 @@ bb14: { } bb15: { - + return } bb16: { @@ -76,7 +76,7 @@ bb17: { } bb18: { - + return } bb19: { @@ -88,7 +88,7 @@ bb20: { } bb21: { - + return } bb22: { @@ -100,7 +100,7 @@ bb23: { } bb24: { - + return } bb25: { @@ -120,7 +120,7 @@ bb28: { } bb29: { - + return } bb30: { @@ -140,7 +140,7 @@ bb33: { } bb34: { - + return } bb35: { @@ -152,7 +152,7 @@ bb36: { } bb37: { - + return } bb38: { @@ -163,41 +163,41 @@ digraph { 0 [ label = "" ] 1 [ label = "ExpressionStatement" ] 2 [ label = "" ] - 3 [ label = "" ] + 3 [ label = "return" ] 4 [ label = "ExpressionStatement" ] 5 [ label = "" ] - 6 [ label = "" ] + 6 [ label = "return" ] 7 [ label = "" ] 8 [ label = "" ] - 9 [ label = "" ] + 9 [ label = "return" ] 10 [ label = "ExpressionStatement" ] 11 [ label = "" ] - 12 [ label = "" ] + 12 [ label = "return" ] 13 [ label = "ExpressionStatement" ] 14 [ label = "" ] - 15 [ label = "" ] + 15 [ label = "return" ] 16 [ label = "ExpressionStatement" ] 17 [ label = "" ] - 18 [ label = "" ] + 18 [ label = "return" ] 19 [ label = "ExpressionStatement" ] 20 [ label = "" ] - 21 [ label = "" ] + 21 [ label = "return" ] 22 [ label = "ExpressionStatement" ] 23 [ label = "" ] - 24 [ label = "" ] + 24 [ label = "return" ] 25 [ label = "" ] 26 [ label = "" ] 27 [ label = "ExpressionStatement" ] 28 [ label = "" ] - 29 [ label = "" ] + 29 [ label = "return" ] 30 [ label = "" ] 31 [ label = "" ] 32 [ label = "ExpressionStatement" ] 33 [ label = "" ] - 34 [ label = "" ] + 34 [ label = "return" ] 35 [ label = "ExpressionStatement" ] 36 [ label = "" ] - 37 [ label = "" ] + 37 [ label = "return" ] 38 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap.new b/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap.new deleted file mode 100644 index c2fb6508eb93c7..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/function_as_expression.snap.new +++ /dev/null @@ -1,258 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/function_as_expression.js ---- -bb0: { - -} - -bb1: { - statement -} - -bb2: { - -} - -bb3: { - return -} - -bb4: { - statement -} - -bb5: { - -} - -bb6: { - return -} - -bb7: { - -} - -bb8: { - -} - -bb9: { - return -} - -bb10: { - statement -} - -bb11: { - -} - -bb12: { - return -} - -bb13: { - statement -} - -bb14: { - -} - -bb15: { - return -} - -bb16: { - statement -} - -bb17: { - -} - -bb18: { - return -} - -bb19: { - statement -} - -bb20: { - -} - -bb21: { - return -} - -bb22: { - statement -} - -bb23: { - -} - -bb24: { - return -} - -bb25: { - -} - -bb26: { - -} - -bb27: { - statement -} - -bb28: { - -} - -bb29: { - return -} - -bb30: { - -} - -bb31: { - -} - -bb32: { - statement -} - -bb33: { - -} - -bb34: { - return -} - -bb35: { - statement -} - -bb36: { - -} - -bb37: { - return -} - -bb38: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "ExpressionStatement" ] - 2 [ label = "" ] - 3 [ label = "return" ] - 4 [ label = "ExpressionStatement" ] - 5 [ label = "" ] - 6 [ label = "return" ] - 7 [ label = "" ] - 8 [ label = "" ] - 9 [ label = "return" ] - 10 [ label = "ExpressionStatement" ] - 11 [ label = "" ] - 12 [ label = "return" ] - 13 [ label = "ExpressionStatement" ] - 14 [ label = "" ] - 15 [ label = "return" ] - 16 [ label = "ExpressionStatement" ] - 17 [ label = "" ] - 18 [ label = "return" ] - 19 [ label = "ExpressionStatement" ] - 20 [ label = "" ] - 21 [ label = "return" ] - 22 [ label = "ExpressionStatement" ] - 23 [ label = "" ] - 24 [ label = "return" ] - 25 [ label = "" ] - 26 [ label = "" ] - 27 [ label = "ExpressionStatement" ] - 28 [ label = "" ] - 29 [ label = "return" ] - 30 [ label = "" ] - 31 [ label = "" ] - 32 [ label = "ExpressionStatement" ] - 33 [ label = "" ] - 34 [ label = "return" ] - 35 [ label = "ExpressionStatement" ] - 36 [ label = "" ] - 37 [ label = "return" ] - 38 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 0 [ label = "Error(Implicit)" ] - 1 -> 4 [ label = "Normal" ] - 6 -> 5 [ label = "Error(Implicit)" ] - 4 -> 6 [ label = "NewFunction" ] - 7 -> 0 [ label = "Error(Implicit)" ] - 4 -> 7 [ label = "Normal" ] - 9 -> 8 [ label = "Error(Implicit)" ] - 7 -> 9 [ label = "NewFunction" ] - 10 -> 0 [ label = "Error(Implicit)" ] - 7 -> 10 [ label = "Normal" ] - 12 -> 11 [ label = "Error(Implicit)" ] - 10 -> 12 [ label = "NewFunction" ] - 13 -> 0 [ label = "Error(Implicit)" ] - 10 -> 13 [ label = "Normal" ] - 15 -> 14 [ label = "Error(Implicit)" ] - 13 -> 15 [ label = "NewFunction" ] - 16 -> 0 [ label = "Error(Implicit)" ] - 13 -> 16 [ label = "Normal" ] - 18 -> 17 [ label = "Error(Implicit)" ] - 16 -> 18 [ label = "NewFunction" ] - 19 -> 0 [ label = "Error(Implicit)" ] - 16 -> 19 [ label = "Normal" ] - 21 -> 20 [ label = "Error(Implicit)" ] - 19 -> 21 [ label = "NewFunction" ] - 22 -> 0 [ label = "Error(Implicit)" ] - 19 -> 22 [ label = "Normal" ] - 24 -> 23 [ label = "Error(Implicit)" ] - 22 -> 24 [ label = "NewFunction" ] - 25 -> 0 [ label = "Error(Implicit)" ] - 22 -> 25 [ label = "Normal" ] - 26 -> 0 [ label = "Error(Implicit)" ] - 27 -> 0 [ label = "Error(Implicit)" ] - 25 -> 26 [ label = "Normal" ] - 25 -> 27 [ label = "Normal" ] - 26 -> 27 [ label = "Normal" ] - 29 -> 28 [ label = "Error(Implicit)" ] - 27 -> 29 [ label = "NewFunction" ] - 30 -> 0 [ label = "Error(Implicit)" ] - 27 -> 30 [ label = "Normal" ] - 31 -> 0 [ label = "Error(Implicit)" ] - 32 -> 0 [ label = "Error(Implicit)" ] - 30 -> 31 [ label = "Normal" ] - 30 -> 32 [ label = "Normal" ] - 31 -> 32 [ label = "Normal" ] - 34 -> 33 [ label = "Error(Implicit)" ] - 32 -> 34 [ label = "NewFunction" ] - 35 -> 0 [ label = "Error(Implicit)" ] - 32 -> 35 [ label = "Normal" ] - 37 -> 36 [ label = "Error(Implicit)" ] - 35 -> 37 [ label = "NewFunction" ] - 38 -> 0 [ label = "Error(Implicit)" ] - 35 -> 38 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap b/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap index 789ca61d83e4d6..9e70ca944a886c 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap @@ -29,7 +29,7 @@ bb5: { } bb6: { - + return } bb7: { @@ -47,7 +47,7 @@ digraph { 3 [ label = "BlockStatement\nExpressionStatement" ] 4 [ label = "" ] 5 [ label = "" ] - 6 [ label = "" ] + 6 [ label = "return" ] 7 [ label = "ExpressionStatement" ] 8 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap.new b/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap.new deleted file mode 100644 index 7f01b64cb54d61..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/function_in_finally.snap.new +++ /dev/null @@ -1,66 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/function_in_finally.js ---- -bb0: { - -} - -bb1: { - statement -} - -bb2: { - -} - -bb3: { - statement - statement -} - -bb4: { - -} - -bb5: { - -} - -bb6: { - return -} - -bb7: { - statement -} - -bb8: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "TryStatement" ] - 2 [ label = "" ] - 3 [ label = "BlockStatement\nExpressionStatement" ] - 4 [ label = "" ] - 5 [ label = "" ] - 6 [ label = "return" ] - 7 [ label = "ExpressionStatement" ] - 8 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Finalize" ] - 4 -> 0 [ label = "Error(Implicit)" ] - 2 -> 4 [ label = "Normal" ] - 6 -> 5 [ label = "Error(Implicit)" ] - 4 -> 6 [ label = "NewFunction" ] - 7 -> 0 [ label = "Error(Implicit)" ] - 4 -> 7 [ label = "Normal" ] - 8 -> 0 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "Normal" ] - 7 -> 8 [ label = "Join" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap b/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap index dd6f6f7965b8fd..26275f987c40a6 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap @@ -76,6 +76,7 @@ bb15: { bb16: { statement + return } bb17: { @@ -99,7 +100,7 @@ digraph { 13 [ label = "unreachable" ] 14 [ label = "" ] 15 [ label = "ExpressionStatement\nExpressionStatement" ] - 16 [ label = "ExpressionStatement" ] + 16 [ label = "ExpressionStatement\nreturn" ] 17 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap.new b/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap.new deleted file mode 100644 index 81d6bcb810cbf5..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/if_stmt_in_for_in.snap.new +++ /dev/null @@ -1,142 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/if_stmt_in_for_in.js ---- -bb0: { - -} - -bb1: { - -} - -bb2: { - -} - -bb3: { - statement - statement -} - -bb4: { - -} - -bb5: { - iteration -} - -bb6: { - statement - statement -} - -bb7: { - condition -} - -bb8: { - statement - statement - break -} - -bb9: { - unreachable -} - -bb10: { - statement -} - -bb11: { - condition -} - -bb12: { - statement - statement - continue -} - -bb13: { - unreachable -} - -bb14: { - -} - -bb15: { - statement - statement -} - -bb16: { - statement - return -} - -bb17: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "" ] - 2 [ label = "" ] - 3 [ label = "ForInStatement\nVariableDeclaration" ] - 4 [ label = "" ] - 5 [ label = "Iteration(IdentifierReference(array) in expr)" ] - 6 [ label = "BlockStatement\nIfStatement" ] - 7 [ label = "Condition(if cond)" ] - 8 [ label = "BlockStatement\nExpressionStatement\nbreak" ] - 9 [ label = "unreachable" ] - 10 [ label = "IfStatement" ] - 11 [ label = "Condition(else cond)" ] - 12 [ label = "BlockStatement\nExpressionStatement\ncontinue" ] - 13 [ label = "unreachable" ] - 14 [ label = "" ] - 15 [ label = "ExpressionStatement\nExpressionStatement" ] - 16 [ label = "ExpressionStatement\nreturn" ] - 17 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 2 [ label = "Error(Implicit)" ] - 5 -> 2 [ label = "Error(Implicit)" ] - 6 -> 2 [ label = "Error(Implicit)" ] - 7 -> 2 [ label = "Error(Implicit)" ] - 8 -> 2 [ label = "Error(Implicit)" ] - 9 -> 2 [ label = "Error(Implicit)" , style = "dotted" ] - 8 -> 9 [ label = "Unreachable" , style = "dotted" ] - 10 -> 2 [ label = "Error(Implicit)" ] - 11 -> 2 [ label = "Error(Implicit)" ] - 12 -> 2 [ label = "Error(Implicit)" ] - 13 -> 2 [ label = "Error(Implicit)" , style = "dotted" ] - 12 -> 13 [ label = "Unreachable" , style = "dotted" ] - 14 -> 2 [ label = "Error(Implicit)" ] - 10 -> 11 [ label = "Normal" ] - 13 -> 14 [ label = "Normal" , style = "dotted" ] - 11 -> 12 [ label = "Jump" ] - 10 -> 14 [ label = "Normal" ] - 15 -> 2 [ label = "Error(Implicit)" ] - 6 -> 7 [ label = "Normal" ] - 9 -> 15 [ label = "Normal" , style = "dotted" ] - 7 -> 8 [ label = "Jump" ] - 6 -> 10 [ label = "Normal" ] - 14 -> 15 [ label = "Normal" ] - 16 -> 2 [ label = "Error(Implicit)" ] - 3 -> 4 [ label = "Normal" ] - 4 -> 5 [ label = "Normal" ] - 5 -> 6 [ label = "Jump" ] - 15 -> 5 [ label = "Backedge" ] - 5 -> 16 [ label = "Normal" ] - 8 -> 16 [ label = "Jump" ] - 12 -> 5 [ label = "Jump" ] - 17 -> 0 [ label = "Error(Implicit)" ] - 1 -> 17 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap b/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap index a00ff8203e75ad..abd7e5813dd112 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap @@ -17,6 +17,7 @@ bb2: { bb3: { statement + return } bb4: { @@ -29,6 +30,7 @@ bb5: { bb6: { statement + return } bb7: { @@ -39,10 +41,10 @@ digraph { 0 [ label = "" ] 1 [ label = "" ] 2 [ label = "" ] - 3 [ label = "ExpressionStatement" ] + 3 [ label = "ExpressionStatement\nreturn" ] 4 [ label = "" ] 5 [ label = "" ] - 6 [ label = "ExpressionStatement" ] + 6 [ label = "ExpressionStatement\nreturn" ] 7 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap.new b/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap.new deleted file mode 100644 index 158e29012a2bfc..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/parenthesized_and_sequence_expr.snap.new +++ /dev/null @@ -1,59 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/parenthesized_and_sequence_expr.js ---- -bb0: { - -} - -bb1: { - -} - -bb2: { - -} - -bb3: { - statement - return -} - -bb4: { - -} - -bb5: { - -} - -bb6: { - statement - return -} - -bb7: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "" ] - 2 [ label = "" ] - 3 [ label = "ExpressionStatement\nreturn" ] - 4 [ label = "" ] - 5 [ label = "" ] - 6 [ label = "ExpressionStatement\nreturn" ] - 7 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 0 [ label = "Error(Implicit)" ] - 1 -> 4 [ label = "Normal" ] - 6 -> 5 [ label = "Error(Implicit)" ] - 4 -> 6 [ label = "NewFunction" ] - 7 -> 0 [ label = "Error(Implicit)" ] - 4 -> 7 [ label = "Normal" ] -} diff --git a/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap b/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap index 4b58d7c99b8e45..24dfcaf36ad4f4 100644 --- a/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap +++ b/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap @@ -18,6 +18,7 @@ bb2: { bb3: { statement statement + return } bb4: { @@ -28,7 +29,7 @@ digraph { 0 [ label = "" ] 1 [ label = "VariableDeclaration" ] 2 [ label = "" ] - 3 [ label = "ExpressionStatement\nExpressionStatement" ] + 3 [ label = "ExpressionStatement\nExpressionStatement\nreturn" ] 4 [ label = "" ] 1 -> 0 [ label = "Error(Implicit)" ] 3 -> 2 [ label = "Error(Implicit)" ] diff --git a/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap.new b/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap.new deleted file mode 100644 index cb9f92501345a8..00000000000000 --- a/crates/oxc_semantic/tests/integration/snapshots/yield_as_statement_and_expression.snap.new +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: crates/oxc_semantic/tests/integration/cfg.rs -assertion_line: 16 -expression: snapshot -input_file: crates/oxc_semantic/tests/integration/cfg_fixtures/yield_as_statement_and_expression.js ---- -bb0: { - -} - -bb1: { - statement -} - -bb2: { - -} - -bb3: { - statement - statement - return -} - -bb4: { - -} - -digraph { - 0 [ label = "" ] - 1 [ label = "VariableDeclaration" ] - 2 [ label = "" ] - 3 [ label = "ExpressionStatement\nExpressionStatement\nreturn" ] - 4 [ label = "" ] - 1 -> 0 [ label = "Error(Implicit)" ] - 3 -> 2 [ label = "Error(Implicit)" ] - 1 -> 3 [ label = "NewFunction" ] - 4 -> 0 [ label = "Error(Implicit)" ] - 1 -> 4 [ label = "Normal" ] -}