| Index: compiler/lib/implementation/array.dart
|
| diff --git a/compiler/lib/implementation/array.dart b/compiler/lib/implementation/array.dart
|
| index 701eae5fb0dc947c5036c658a752486ce2d7a6a2..e712576e9f2ba4894ecb8563434fd05610599e67 100644
|
| --- a/compiler/lib/implementation/array.dart
|
| +++ b/compiler/lib/implementation/array.dart
|
| @@ -22,15 +22,11 @@ class ListFactory<E> {
|
| } else if (length < 0) {
|
| throw new IllegalArgumentException("negative length $length");
|
| }
|
| - // TODO(floitsch): make list creation more efficient. Currently we allocate
|
| - // a new TypeToken at every allocation. Either we can optimize them away,
|
| - // or we need to find other ways to pass type-information from Dart to JS.
|
| - ListImplementation list = _new(new TypeToken<E>(), length);
|
| +
|
| + ListImplementation<E> list = new ListImplementation<E>(length);
|
| list._isFixed = isFixed;
|
| return list;
|
| }
|
| -
|
| - static ListImplementation _new(TypeToken typeToken, int length) native;
|
| }
|
|
|
|
|
| @@ -42,6 +38,8 @@ class ListImplementation<T> implements List<T> native "Array" {
|
| // and coerce to false.
|
| bool _isFixed;
|
|
|
| + ListImplementation(int length);
|
| +
|
| T operator[](int index) {
|
| if (0 <= index && index < length) {
|
| return _indexOperator(index);
|
|
|