Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart

Issue 853083005: Revert "Allow LetCont to bind multiple continuations." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart
diff --git a/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart b/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart
index a2a16d2e985495e2dc8d01517080422da98ce0fa..0725213cf5dbc1573bfc0e4ba1886eb90277322a 100644
--- a/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart
+++ b/tests/compiler/dart2js/backend_dart/opt_redundant_phi_test.dart
@@ -22,29 +22,23 @@ String READ_IN_LOOP_IN = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 42)))
(LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2 v3)
- (LetCont
- ((k1 ()
- (LetPrim (v4 (Constant (Null)))
- (InvokeContinuation return (v4))))
- (k2 ()
- (LetCont
- ((k3 (v5)
- (LetCont
- ((k4 (v6)
- (LetPrim (v7 (Constant (Int 1)))
- (LetCont
- ((k5 (v8)
- (InvokeContinuation* k0 (v2 v8))))
- (InvokeMethod v3 + (v7) k5)))))
- (InvokeStatic print (v5) k4))))
- (InvokeMethod v2 toString () k3))))
- (LetPrim (v9 (Constant (Int 2)))
- (LetCont
- ((k6 (v10)
- (Branch (IsTrue v10) k2 k1)))
- (InvokeMethod v3 < (v9) k6))))))
+ (LetCont* (k0 (v2 v3)
+ (LetCont (k1 ()
+ (LetPrim (v4 (Constant (Null)))
+ (InvokeContinuation return (v4))))
+ (LetCont (k2 ()
+ (LetCont (k3 (v5)
+ (LetCont (k4 (v6)
+ (LetPrim (v7 (Constant (Int 1)))
+ (LetCont (k5 (v8)
+ (InvokeContinuation* k0 (v2 v8)))
+ (InvokeMethod v3 + (v7) k5))))
+ (InvokeStatic print (v5) k4)))
+ (InvokeMethod v2 toString () k3)))
+ (LetPrim (v9 (Constant (Int 2)))
+ (LetCont (k6 (v10)
+ (Branch (IsTrue v10) k2 k1))
+ (InvokeMethod v3 < (v9) k6))))))
(InvokeContinuation k0 (v0 v1))))))
""";
@@ -52,29 +46,23 @@ String READ_IN_LOOP_OUT = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 42)))
(LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2)
- (LetCont
- ((k1 ()
- (LetPrim (v3 (Constant (Null)))
- (InvokeContinuation return (v3))))
- (k2 ()
- (LetCont
- ((k3 (v4)
- (LetCont
- ((k4 (v5)
- (LetPrim (v6 (Constant (Int 1)))
- (LetCont
- ((k5 (v7)
- (InvokeContinuation* k0 (v7))))
- (InvokeMethod v2 + (v6) k5)))))
- (InvokeStatic print (v4) k4))))
- (InvokeMethod v0 toString () k3))))
- (LetPrim (v8 (Constant (Int 2)))
- (LetCont
- ((k6 (v9)
- (Branch (IsTrue v9) k2 k1)))
- (InvokeMethod v2 < (v8) k6))))))
+ (LetCont* (k0 (v2)
+ (LetCont (k1 ()
+ (LetPrim (v3 (Constant (Null)))
+ (InvokeContinuation return (v3))))
+ (LetCont (k2 ()
+ (LetCont (k3 (v4)
+ (LetCont (k4 (v5)
+ (LetPrim (v6 (Constant (Int 1)))
+ (LetCont (k5 (v7)
+ (InvokeContinuation* k0 (v7)))
+ (InvokeMethod v2 + (v6) k5))))
+ (InvokeStatic print (v4) k4)))
+ (InvokeMethod v0 toString () k3)))
+ (LetPrim (v8 (Constant (Int 2)))
+ (LetCont (k6 (v9)
+ (Branch (IsTrue v9) k2 k1))
+ (InvokeMethod v2 < (v8) k6))))))
(InvokeContinuation k0 (v1))))))
""";
@@ -97,52 +85,40 @@ const String INNER_LOOP_IN = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 42)))
(LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2 v3)
- (LetCont
- ((k1 ()
- (LetCont
- ((k2 (v4)
- (LetCont
- ((k3 (v5)
- (LetPrim (v6 (Constant (Null)))
- (InvokeContinuation return (v6)))))
- (InvokeStatic print (v4) k3))))
- (InvokeMethod v2 toString () k2)))
- (k4 ()
- (LetPrim (v7 (Constant (Int 0)))
- (LetCont
- ((rec k5 (v8 v9 v10)
- (LetCont
- ((k6 ()
- (LetPrim (v11 (Constant (Int 1)))
- (LetCont
- ((k7 (v12)
- (InvokeContinuation* k0 (v8 v12))))
- (InvokeMethod v9 + (v11) k7))))
- (k8 ()
- (LetCont
- ((k9 (v13)
- (LetCont
- ((k10 (v14)
- (LetPrim (v15 (Constant (Int 1)))
- (LetCont
- ((k11 (v16)
- (InvokeContinuation* k5 (v8 v9 v16))))
- (InvokeMethod v10 + (v15) k11)))))
- (InvokeStatic print (v13) k10))))
- (InvokeMethod v9 toString () k9))))
- (LetPrim (v17 (Constant (Int 2)))
- (LetCont
- ((k12 (v18)
- (Branch (IsTrue v18) k8 k6)))
- (InvokeMethod v10 < (v17) k12))))))
- (InvokeContinuation k5 (v2 v3 v7))))))
- (LetPrim (v19 (Constant (Int 2)))
- (LetCont
- ((k13 (v20)
- (Branch (IsTrue v20) k4 k1)))
- (InvokeMethod v3 < (v19) k13))))))
+ (LetCont* (k0 (v2 v3)
+ (LetCont (k1 ()
+ (LetCont (k2 (v4)
+ (LetCont (k3 (v5)
+ (LetPrim (v6 (Constant (Null)))
+ (InvokeContinuation return (v6))))
+ (InvokeStatic print (v4) k3)))
+ (InvokeMethod v2 toString () k2)))
+ (LetCont (k4 ()
+ (LetPrim (v7 (Constant (Int 0)))
+ (LetCont* (k5 (v8 v9 v10)
+ (LetCont (k6 ()
+ (LetPrim (v11 (Constant (Int 1)))
+ (LetCont (k7 (v12)
+ (InvokeContinuation* k0 (v8 v12)))
+ (InvokeMethod v9 + (v11) k7))))
+ (LetCont (k8 ()
+ (LetCont (k9 (v13)
+ (LetCont (k10 (v14)
+ (LetPrim (v15 (Constant (Int 1)))
+ (LetCont (k11 (v16)
+ (InvokeContinuation* k5 (v8 v9 v16)))
+ (InvokeMethod v10 + (v15) k11))))
+ (InvokeStatic print (v13) k10)))
+ (InvokeMethod v9 toString () k9)))
+ (LetPrim (v17 (Constant (Int 2)))
+ (LetCont (k12 (v18)
+ (Branch (IsTrue v18) k8 k6))
+ (InvokeMethod v10 < (v17) k12))))))
+ (InvokeContinuation k5 (v2 v3 v7)))))
+ (LetPrim (v19 (Constant (Int 2)))
+ (LetCont (k13 (v20)
+ (Branch (IsTrue v20) k4 k1))
+ (InvokeMethod v3 < (v19) k13))))))
(InvokeContinuation k0 (v0 v1))))))
""";
@@ -150,52 +126,40 @@ const String INNER_LOOP_OUT = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 42)))
(LetPrim (v1 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v2)
- (LetCont
- ((k1 ()
- (LetCont
- ((k2 (v3)
- (LetCont
- ((k3 (v4)
- (LetPrim (v5 (Constant (Null)))
- (InvokeContinuation return (v5)))))
- (InvokeStatic print (v3) k3))))
- (InvokeMethod v0 toString () k2)))
- (k4 ()
- (LetPrim (v6 (Constant (Int 0)))
- (LetCont
- ((rec k5 (v7)
- (LetCont
- ((k6 ()
- (LetPrim (v8 (Constant (Int 1)))
- (LetCont
- ((k7 (v9)
- (InvokeContinuation* k0 (v9))))
- (InvokeMethod v2 + (v8) k7))))
- (k8 ()
- (LetCont
- ((k9 (v10)
- (LetCont
- ((k10 (v11)
- (LetPrim (v12 (Constant (Int 1)))
- (LetCont
- ((k11 (v13)
- (InvokeContinuation* k5 (v13))))
- (InvokeMethod v7 + (v12) k11)))))
- (InvokeStatic print (v10) k10))))
- (InvokeMethod v2 toString () k9))))
- (LetPrim (v14 (Constant (Int 2)))
- (LetCont
- ((k12 (v15)
- (Branch (IsTrue v15) k8 k6)))
- (InvokeMethod v7 < (v14) k12))))))
- (InvokeContinuation k5 (v6))))))
- (LetPrim (v16 (Constant (Int 2)))
- (LetCont
- ((k13 (v17)
- (Branch (IsTrue v17) k4 k1)))
- (InvokeMethod v2 < (v16) k13))))))
+ (LetCont* (k0 (v2)
+ (LetCont (k1 ()
+ (LetCont (k2 (v3)
+ (LetCont (k3 (v4)
+ (LetPrim (v5 (Constant (Null)))
+ (InvokeContinuation return (v5))))
+ (InvokeStatic print (v3) k3)))
+ (InvokeMethod v0 toString () k2)))
+ (LetCont (k4 ()
+ (LetPrim (v6 (Constant (Int 0)))
+ (LetCont* (k5 (v7)
+ (LetCont (k6 ()
+ (LetPrim (v8 (Constant (Int 1)))
+ (LetCont (k7 (v9)
+ (InvokeContinuation* k0 (v9)))
+ (InvokeMethod v2 + (v8) k7))))
+ (LetCont (k8 ()
+ (LetCont (k9 (v10)
+ (LetCont (k10 (v11)
+ (LetPrim (v12 (Constant (Int 1)))
+ (LetCont (k11 (v13)
+ (InvokeContinuation* k5 (v13)))
+ (InvokeMethod v7 + (v12) k11))))
+ (InvokeStatic print (v10) k10)))
+ (InvokeMethod v2 toString () k9)))
+ (LetPrim (v14 (Constant (Int 2)))
+ (LetCont (k12 (v15)
+ (Branch (IsTrue v15) k8 k6))
+ (InvokeMethod v7 < (v14) k12))))))
+ (InvokeContinuation k5 (v6)))))
+ (LetPrim (v16 (Constant (Int 2)))
+ (LetCont (k13 (v17)
+ (Branch (IsTrue v17) k4 k1))
+ (InvokeMethod v2 < (v16) k13))))))
(InvokeContinuation k0 (v1))))))
""";
@@ -212,28 +176,22 @@ const String INNER_LOOP_OUT = """
String BASIC_LOOP_IN = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((rec k0 (v1)
- (LetCont
- ((k1 ()
- (LetPrim (v2 (Constant (Null)))
- (InvokeContinuation return (v2))))
- (k2 ()
- (LetCont
- ((k3 (v3)
- (LetCont
- ((k4 (v4)
- (LetPrim (v5 (Constant (Int 1)))
- (LetCont
- ((k5 (v6)
- (InvokeContinuation* k0 (v6))))
- (InvokeMethod v1 + (v5) k5)))))
- (InvokeStatic print (v3) k4))))
- (InvokeMethod v1 toString () k3))))
+ (LetCont* (k0 (v1)
+ (LetCont (k1 ()
+ (LetPrim (v2 (Constant (Null)))
+ (InvokeContinuation return (v2))))
+ (LetCont (k2 ()
+ (LetCont (k3 (v3)
+ (LetCont (k4 (v4)
+ (LetPrim (v5 (Constant (Int 1)))
+ (LetCont (k5 (v6)
+ (InvokeContinuation* k0 (v6)))
+ (InvokeMethod v1 + (v5) k5))))
+ (InvokeStatic print (v3) k4)))
+ (InvokeMethod v1 toString () k3)))
(LetPrim (v7 (Constant (Int 2)))
- (LetCont
- ((k6 (v8)
- (Branch (IsTrue v8) k2 k1)))
+ (LetCont (k6 (v8)
+ (Branch (IsTrue v8) k2 k1))
(InvokeMethod v1 < (v7) k6))))))
(InvokeContinuation k0 (v0)))))
""";
@@ -246,9 +204,8 @@ String BASIC_LOOP_OUT = BASIC_LOOP_IN;
String SCOPING_IN = """
(FunctionDefinition main () return ()
- (LetCont
- ((k0 (v1)
- (InvokeStatic print (v1) return)))
+ (LetCont (k0 (v1)
+ (InvokeStatic print (v1) return))
(LetPrim (v0 (Constant (Int 0)))
(LetPrim (v2 (Constant (Null)))
(InvokeContinuation k0 (v0))))))
@@ -257,9 +214,8 @@ String SCOPING_IN = """
String SCOPING_OUT = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((k0 ()
- (InvokeStatic print (v0) return)))
+ (LetCont (k0 ()
+ (InvokeStatic print (v0) return))
(LetPrim (v1 (Constant (Null)))
(InvokeContinuation k0 ())))))
""";
@@ -270,9 +226,8 @@ String SCOPING_OUT = """
String NEVER_INVOKED_IN = """
(FunctionDefinition main () return ()
(LetPrim (v0 (Constant (Int 0)))
- (LetCont
- ((k0 (v1)
- (InvokeStatic print (v1) return)))
+ (LetCont (k0 (v1)
+ (InvokeStatic print (v1) return))
(InvokeContinuation return (v0)))))
""";

Powered by Google App Engine
This is Rietveld 408576698