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

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

Issue 104893007: Trace lists when they are stored into other lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/list_tracer_test.dart
===================================================================
--- tests/compiler/dart2js/list_tracer_test.dart (revision 30937)
+++ tests/compiler/dart2js/list_tracer_test.dart (working copy)
@@ -87,6 +87,8 @@
var listPassedAsNamedParameter = $listAllocation;
var listSetInNonFinalField = $listAllocation;
var listWithChangedLength = $listAllocation;
+var listStoredInList = $listAllocation;
+var listStoredInListButEscapes = $listAllocation;
foo(list) {
list[0] = aDouble;
@@ -175,6 +177,13 @@
listWithChangedLength[0] = anInt;
listWithChangedLength.length = 54;
+
+ a = [listStoredInList];
+ a[0][0] = 42;
+
+ a = [listStoredInListButEscapes];
+ a[0][0] = 42;
+ a.forEach((e) => print(e));
}
""";
}
@@ -224,6 +233,8 @@
checkType('listUsedWithNonOkSelector', typesTask.dynamicType);
checkType('listPassedAsOptionalParameter', typesTask.numType);
checkType('listPassedAsNamedParameter', typesTask.numType);
+ checkType('listStoredInList', typesTask.uint31Type);
+ checkType('listStoredInListButEscapes', typesTask.dynamicType);
if (!allocation.contains('filled')) {
checkType('listUnset', new TypeMask.nonNullEmpty());
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/type_graph_nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698