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

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

Issue 1335273003: dart2js cps: Remove code after calls that cannot return. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 years, 3 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
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
index 1665195824e2c4e45aab088ebae96264c57fafdb..877b3714f376f5d65d815b282a1144b04a5ee2f2 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
@@ -11,7 +11,8 @@ import 'js_backend_cps_ir.dart';
const List<TestEntry> tests = const [
const TestEntry("main() { return true ? 42 : 'foo'; }"),
const TestEntry("""
-foo() => foo();
+var x = 1;
+foo() => ++x > 10;
main() {
print(foo() ? "hello world" : "bad bad");
}""","""
@@ -19,16 +20,17 @@ function() {
P.print(V.foo() ? "hello world" : "bad bad");
}"""),
const TestEntry("""
-foo() { print('foo'); }
+var x = 1;
+foo() => ++x > 10;
main() {
print(foo() ? "hello world" : "bad bad");
}""","""
function() {
- V.foo();
- P.print("bad bad");
+ P.print(V.foo() ? "hello world" : "bad bad");
}"""),
const TestEntry("""
-get foo => foo;
+var x = 1;
+get foo => ++x > 10;
main() {
print(foo ? "hello world" : "bad bad");
}""","""
@@ -36,19 +38,28 @@ function() {
P.print(V.foo() ? "hello world" : "bad bad");
}"""),
const TestEntry("""
-get foo => foo;
+var x = 1;
+get foo => ++x > 10;
main() { print(foo && foo); }
""", """
function() {
P.print(V.foo() ? !!V.foo() : false);
}"""),
const TestEntry("""
-get foo => foo;
+var x = 1;
+get foo => ++x > 10;
main() { print(foo || foo); }
""","""
function() {
P.print(V.foo() ? true : !!V.foo());
}"""),
+const TestEntry("""
+get foo => foo;
+main() { print(foo || foo); }
+""","""
+function() {
+ V.foo();
+}"""),
// Needs interceptor calling convention
//const TestEntry("""
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698