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

Unified Diff: lib/compiler/implementation/lib/coreimpl_patch.dart

Issue 10878077: Unify list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add issue number to TODO. Created 8 years, 4 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 | « lib/compiler/implementation/lib/coreimpl.dart ('k') | lib/compiler/implementation/lib/mockimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/coreimpl_patch.dart
diff --git a/lib/compiler/implementation/lib/coreimpl_patch.dart b/lib/compiler/implementation/lib/coreimpl_patch.dart
index 9eb3d798b60d446246dbcf4d06eb132e4e6e8b5c..c79fea38fdf19f0c46a62c892f8e1fde6fe60fe1 100644
--- a/lib/compiler/implementation/lib/coreimpl_patch.dart
+++ b/lib/compiler/implementation/lib/coreimpl_patch.dart
@@ -36,6 +36,22 @@ patch class StringImplementation {
}
+// Patch for List implementation.
+// TODO(ager): Split out into date_patch.dart and allow #source
+// in patch files?
+patch class ListImplementation<E> {
+ patch factory List([int length]) => Primitives.newList(length);
+
+ patch static List _from(Iterable other) {
+ List result = new List();
+ for (var element in other) {
+ result.add(element);
+ }
+ return result;
+ }
+}
+
+
// Patch for Date implementation.
// TODO(ager): Split out into date_patch.dart and allow #source
// in patch files?
« no previous file with comments | « lib/compiler/implementation/lib/coreimpl.dart ('k') | lib/compiler/implementation/lib/mockimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698