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

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

Issue 16847006: Also deal with List.filled in the backend, not just the inferrer and list tracer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/list_tracer_node_type_test.dart
===================================================================
--- tests/compiler/dart2js/list_tracer_node_type_test.dart (revision 24217)
+++ tests/compiler/dart2js/list_tracer_node_type_test.dart (working copy)
@@ -29,7 +29,15 @@
}
""";
+const String TEST4 = r"""
+main() {
+ var a = new List.filled(42, null);
+ a[0] = 42;
+ return a[0] + 42;
+}
+""";
+
main() {
String generated = compileAll(TEST1);
// Check that we only do a null check on the receiver for
@@ -45,4 +53,8 @@
generated = compileAll(TEST3);
Expect.isFalse(generated.contains('if (typeof t1'));
Expect.isTrue(generated.contains('if (t1 == null)'));
+
+ generated = compileAll(TEST4);
+ Expect.isFalse(generated.contains('if (typeof t1'));
+ Expect.isTrue(generated.contains('if (t1 == null)'));
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/corelib/list_filled_type_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698