Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
|
Anders Johnsen
2012/08/27 13:56:45
Is this the time to start calling them list, e.g.
Mads Ager (google)
2012/08/27 14:02:42
Let's do a cleanup sweep to do that?
Anders Johnsen
2012/08/27 14:05:40
Roger!
| |
| 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. | |
| 4 | |
| 5 patch class ListImplementation<E> { | |
| 6 /* patch */ factory List([int length = null]) { | |
| 7 if (length === null) { | |
| 8 return new GrowableObjectArray<E>(); | |
| 9 } else { | |
| 10 return new ObjectArray<E>(length); | |
| 11 } | |
| 12 } | |
| 13 | |
| 14 /* patch */ static _from(Iterable other) { | |
| 15 GrowableObjectArray list = new GrowableObjectArray(); | |
| 16 for (final e in other) { | |
| 17 list.add(e); | |
| 18 } | |
| 19 return list; | |
| 20 } | |
| 21 } | |
| OLD | NEW |