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

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

Issue 1080003004: Optimize identical based on types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and update. Created 5 years, 7 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/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart ('k') | tests/standalone/standalone.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 bd4eec4e7c9bdad3bbf5ee302c33735b4dbf3660..486bcc76989bff977a7c6f41bcccfe5137cf19d1 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
@@ -16,7 +16,18 @@ main() {
print(foo() ? "hello world" : "bad bad");
}""",
"""function() {
- P.print(P.identical(V.foo(), true) ? "hello world" : "bad bad");
+ V.foo();
+ P.print("bad bad");
+ return null;
+}"""),
+ const TestEntry("""
+foo() => null;
+main() {
+ print(foo() ? "hello world" : "bad bad");
+}""",
+"""function() {
+ V.foo();
+ P.print("bad bad");
return null;
}"""),
const TestEntry("""
@@ -25,21 +36,25 @@ main() {
print(foo ? "hello world" : "bad bad");
}""",
"""function() {
- P.print(P.identical(V.foo(), true) ? "hello world" : "bad bad");
+ V.foo();
+ P.print("bad bad");
return null;
}"""),
const TestEntry("""
get foo => foo;
main() { print(foo && foo); }""",
"""function() {
- P.print(P.identical(V.foo(), true) && P.identical(V.foo(), true));
+ V.foo();
+ P.print(false);
return null;
}"""),
const TestEntry("""
get foo => foo;
main() { print(foo || foo); }""",
"""function() {
- P.print(P.identical(V.foo(), true) || P.identical(V.foo(), true));
+ V.foo();
+ V.foo();
+ P.print(false);
return null;
}"""),
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698