| Index: sdk/lib/core/list.dart
|
| diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
|
| index fb156af3401129174dc5ca06f8cca0a220869d29..199301b6775dd8b2894f2ee4365237e016aa7b64 100644
|
| --- a/sdk/lib/core/list.dart
|
| +++ b/sdk/lib/core/list.dart
|
| @@ -11,17 +11,29 @@ interface List<E> extends Collection<E>, Sequence<E>
|
| /**
|
| * Creates a list of the given [length].
|
| *
|
| - * If no [length] argument is supplied an extendable list of
|
| - * length 0 is created.
|
| + * The length of the returned list is not fixed.
|
| + */
|
| + List([int length = 0]);
|
| +
|
| + /**
|
| + * Creates a fixed-sized list of the given [length] where each entry is
|
| + * filled with [fill].
|
| + */
|
| + List.fixedLength(int length, {E fill: null});
|
| +
|
| + /**
|
| + * Creates an list of the given [length] where each entry is
|
| + * filled with [fill].
|
| *
|
| - * If a [length] argument is supplied, a fixed size list of that
|
| - * length is created.
|
| + * The length of the returned list is not fixed.
|
| */
|
| - List([int length]);
|
| + List.filled(int length, E fill);
|
|
|
| /**
|
| - * Creates a list with the elements of [other]. The order in
|
| + * Creates an list with the elements of [other]. The order in
|
| * the list will be the order provided by the iterator of [other].
|
| + *
|
| + * The length of the returned list is not fixed.
|
| */
|
| List.from(Iterable<E> other);
|
|
|
| @@ -167,7 +179,7 @@ interface List<E> extends Collection<E>, Sequence<E>
|
|
|
| /**
|
| * Inserts a new range into the list, starting from [start] to
|
| - * [:start + length - 1:]. The entries are filled with [initialValue].
|
| + * [:start + length - 1:]. The entries are filled with [fill].
|
| * Throws an [UnsupportedError] if the list is
|
| * not extendable.
|
| * If [length] is 0, this method does not do anything.
|
| @@ -177,16 +189,28 @@ interface List<E> extends Collection<E>, Sequence<E>
|
| * Throws an [RangeError] if [start] is negative or if
|
| * [start] is greater than the length of the list.
|
| */
|
| - void insertRange(int start, int length, [E initialValue]);
|
| + void insertRange(int start, int length, [E fill]);
|
| }
|
|
|
| class _ListImpl<E> {
|
| /**
|
| * Factory implementation of List().
|
| *
|
| - * Creates a list of the given [length].
|
| + * Creates an extendable list of the given [length].
|
| + */
|
| + external factory List([int length = 0]);
|
| +
|
| + /**
|
| + * Creates a fixed-sized list of the given [length] where each entry is
|
| + * filled with [fill].
|
| + */
|
| + external factory List.fixedLength(int length, {E fill: null});
|
| +
|
| + /**
|
| + * Creates an extendable list of the given [length] where each entry is
|
| + * filled with [fill].
|
| */
|
| - external factory List([int length]);
|
| + external factory List.filled(int length, E fill);
|
|
|
| /**
|
| * Factory implementation of List.from().
|
|
|