Chromium Code Reviews| Index: lib/compiler/implementation/lib/core_patch.dart |
| diff --git a/lib/compiler/implementation/lib/core_patch.dart b/lib/compiler/implementation/lib/core_patch.dart |
| index d3f8e432c4dc6c1fa0f2b46a19af1b6bfe8ced43..31c94d74510e86b72be3baa6b33d59b46199bea1 100644 |
| --- a/lib/compiler/implementation/lib/core_patch.dart |
| +++ b/lib/compiler/implementation/lib/core_patch.dart |
| @@ -148,3 +148,17 @@ patch class _StopwatchImpl { |
| patch static int _frequency() => 1000; |
| patch static int _now() => Primitives.dateNow(); |
| } |
| + |
| + |
| +// Patch for List implementation. |
| +patch class _ListImpl<E> { |
|
Mads Ager (google)
2012/10/30 10:37:47
Is there any reason to have _ListImpl at this poin
Anders Johnsen
2012/10/30 11:53:38
The next move is to make List an 'abstract class',
|
| + patch factory List([int length]) => Primitives.newList(length); |
| + |
| + patch factory List.from(Iterable<E> other) { |
| + var result = new List(); |
| + for (var element in other) { |
| + result.add(element); |
| + } |
| + return result; |
| + } |
| +} |