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

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

Issue 14052009: Improve optimization of operations on indexables by using more inferred type information and by dis… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix dartc warnings. Created 7 years, 8 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/simple_inferrer_relations_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_relations_test.dart b/tests/compiler/dart2js/simple_inferrer_relations_test.dart
index 205b01a9819b0da127cbef20a0594edb39864099..1488c107cdf089faa0db5e65ff62e6792ba9f779 100644
--- a/tests/compiler/dart2js/simple_inferrer_relations_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_relations_test.dart
@@ -40,9 +40,11 @@ class B extends A {
}
main() {
- var both = [new A(inscrutable(0) == 0 ? 42 : "fish"),
- new B(0, inscrutable(0) == 0 ? 2 : "horse")];
- if (both[1] == both[0]) {
+ var a = new A(inscrutable(0) == 0 ? 42 : "fish");
+ var b = new B(0, inscrutable(0) == 0 ? 2 : "horse");
+ var c = inscrutable(0) == 0 ? a : "kurt";
+ var d = inscrutable(0) == 0 ? b : "gert";
+ if (c == d) {
print("hestfisk");
}
}
@@ -50,7 +52,7 @@ main() {
void main() {
String generated = compileAll(TEST);
- if (!generated.contains(r'if ($.$eq(both[1], both[0]))')) {
+ if (!generated.contains(r'if ($.$eq(c, d))')) {
print(generated);
Expect.fail("missing elision of '=== true'");
}

Powered by Google App Engine
This is Rietveld 408576698