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

Unified Diff: tests/compiler/dart2js/js_backend_cps_ir_control_flow.dart

Issue 735253003: Add CPS IR transformation to make the JavaScript backend specific semantics explicit in the tree. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/js_backend_cps_ir_control_flow.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_control_flow.dart b/tests/compiler/dart2js/js_backend_cps_ir_control_flow.dart
index e542451c942a60a3635df82f4031146d763c1e62..5d43b33690f8dddf9fee5250af3f4853cf8b9f54 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_control_flow.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_control_flow.dart
@@ -15,8 +15,9 @@ main() {
}
""", """
function() {
- while (true)
+ while (P.identical(true, true))
;
+ return null;
}"""),
const TestEntry("""
foo(a) => a;
@@ -34,16 +35,24 @@ main() {
}
""", """
function() {
- L0:
- while (true)
- while (true) {
- while (P.identical(V.foo(true), true))
- if (P.identical(V.foo(false), true)) {
- P.print(2);
- continue L0;
- }
- P.print(1);
- }
+ L2:
+ while (P.identical(true, true))
+ L1:
+ while (true) {
+ L0:
+ if (P.identical(true, true)) {
+ while (P.identical(V.foo(true), true))
+ if (!P.identical(V.foo(false), true))
+ ;
+ else
+ break L0;
+ P.print(1);
+ continue L1;
+ }
+ P.print(2);
+ continue L2;
+ }
+ return null;
}"""),
const TestEntry("""
foo(a) => a;
@@ -58,13 +67,13 @@ main() {
function() {
var i;
i = 0;
- L1:
+ L3:
while (true) {
if (P.identical(V.foo(true), true)) {
P.print(1);
if (!P.identical(V.foo(false), true)) {
i = V.foo(i);
- continue L1;
+ continue L3;
}
}
P.print(2);

Powered by Google App Engine
This is Rietveld 408576698