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

Side by Side Diff: lib/core/list.dart

Issue 11189141: Move ListImplementation from coreimpl to core, as a private member. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reintroduced type. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/lib/coreimpl_patch.dart ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * A [List] is an indexable collection with a length. It can be of 6 * A [List] is an indexable collection with a length. It can be of
7 * fixed size or extendable. 7 * fixed size or extendable.
8 */ 8 */
9 interface List<E> extends Collection<E>, Sequence<E> 9 interface List<E> extends Collection<E>, Sequence<E>
10 default ListImplementation<E> { 10 default _ListImpl<E> {
11 /** 11 /**
12 * Creates a list of the given [length]. 12 * Creates a list of the given [length].
13 * 13 *
14 * If no [length] argument is supplied an extendable list of 14 * If no [length] argument is supplied an extendable list of
15 * length 0 is created. 15 * length 0 is created.
16 * 16 *
17 * If a [length] argument is supplied, a fixed size list of that 17 * If a [length] argument is supplied, a fixed size list of that
18 * length is created. 18 * length is created.
19 */ 19 */
20 List([int length]); 20 List([int length]);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 * not extendable. 167 * not extendable.
168 * If [length] is 0, this method does not do anything. 168 * If [length] is 0, this method does not do anything.
169 * If [start] is the length of the list, this method inserts the 169 * If [start] is the length of the list, this method inserts the
170 * range at the end of the list. 170 * range at the end of the list.
171 * Throws an [ArgumentError] if [length] is negative. 171 * Throws an [ArgumentError] if [length] is negative.
172 * Throws an [IndexOutOfRangeException] if [start] is negative or if 172 * Throws an [IndexOutOfRangeException] if [start] is negative or if
173 * [start] is greater than the length of the list. 173 * [start] is greater than the length of the list.
174 */ 174 */
175 void insertRange(int start, int length, [E initialValue]); 175 void insertRange(int start, int length, [E initialValue]);
176 } 176 }
177
178 class _ListImpl<E> {
179 /**
180 * Factory implementation of List().
181 *
182 * Creates a list of the given [length].
183 */
184 external factory List([int length]);
185
186 /**
187 * Factory implementation of List.from().
188 *
189 * Creates a list with the elements of [other]. The order in
190 * the list will be the order provided by the iterator of [other].
191 */
192 external factory List.from(Iterable<E> other);
193 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/coreimpl_patch.dart ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698