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

Side by Side Diff: sdk/lib/internal/list.dart

Issue 134893003: Add internal operation that converts a growable list to a fixed list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months 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
« sdk/lib/core/list.dart ('K') | « sdk/lib/core/list.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart._internal; 5 part of dart._internal;
6 6
7 /** 7 /**
8 * Mixin that throws on the length changing operations of [List]. 8 * Mixin that throws on the length changing operations of [List].
9 * 9 *
10 * Intended to mix-in on top of [ListMixin] for fixed-length lists. 10 * Intended to mix-in on top of [ListMixin] for fixed-length lists.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 class ReversedListIterable<E> extends ListIterable<E> { 300 class ReversedListIterable<E> extends ListIterable<E> {
301 Iterable<E> _source; 301 Iterable<E> _source;
302 ReversedListIterable(this._source); 302 ReversedListIterable(this._source);
303 303
304 int get length => _source.length; 304 int get length => _source.length;
305 305
306 E elementAt(int index) => _source.elementAt(_source.length - 1 - index); 306 E elementAt(int index) => _source.elementAt(_source.length - 1 - index);
307 } 307 }
308
309 external List makeListFixedLength(List growableList);
Ivan Posva 2014/02/06 16:57:00 Why is this not in the core library as a private w
Lasse Reichstein Nielsen 2014/02/07 12:55:25 Because I expect to call it from other libraries (
OLDNEW
« sdk/lib/core/list.dart ('K') | « sdk/lib/core/list.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698