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

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

Issue 1203423003: dart2js cps: Better fallthrough analysis and eliminate "return null". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update tests Created 5 years, 6 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/js_backend_cps_ir_control_flow_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
index 0e5808a2c846b4e96cf0788f1318272fe6398459..b6fc9ad354a9058b4f04c49cd009ce5abbd59141 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
@@ -60,13 +60,11 @@ function() {
L1:
while (P.identical(V.foo(true), true)) {
P.print(1);
- if (!P.identical(V.foo(false), true))
- i = V.foo(i);
- else
+ if (P.identical(V.foo(false), true))
break L1;
+ i = V.foo(i);
}
P.print(2);
- return null;
}"""),
const TestEntry("""
foo(a) => a;
@@ -82,7 +80,6 @@ main() {
function() {
V.foo(true) ? P.print(1) : P.print(2);
P.print(3);
- return null;
}"""),
const TestEntry("""
foo(a) => a;
@@ -106,7 +103,6 @@ function() {
P.print(2);
}
P.print(3);
- return null;
}"""),
const TestEntry("""
main() {
@@ -118,7 +114,6 @@ main() {
}""","""
function() {
P.print("good");
- return null;
}"""),
const TestEntry("""
foo() => 2;
@@ -132,7 +127,6 @@ main() {
function() {
V.foo();
P.print("good");
- return null;
}"""),
];

Powered by Google App Engine
This is Rietveld 408576698