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

Unified Diff: corelib/src/implementation/list.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 | « corelib/src/implementation/corelib_impl_sources.gypi ('k') | corelib/src/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/implementation/list.dart
diff --git a/corelib/src/implementation/list.dart b/corelib/src/implementation/list.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1018a8f0c317acbb7236cf4dd38ac95dc835b47f
--- /dev/null
+++ b/corelib/src/implementation/list.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * A [List] is an indexable collection with a length. It can be of
+ * fixed size or extendable.
+ */
+class ListImplementation<E> {
+ /**
+ * Factory implementation of List().
+ *
+ * Creates a list of the given [length].
+ */
+ external factory List([int length]);
+
+ /**
+ * Factory implementation of List.from().
+ *
+ * Creates a list with the elements of [other]. The order in
+ * the list will be the order provided by the iterator of [other].
+ */
+ factory List.from(Iterable<E> other) {
+ // TODO(ajohnsen): Make external once the vm can handle it, so we don't
+ // lose generic type information.
+ // Issue: #4727
+ return _from(other);
+ }
+
+ external static _from(Iterable<E> other);
+}
« no previous file with comments | « corelib/src/implementation/corelib_impl_sources.gypi ('k') | corelib/src/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698