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

Side by Side Diff: runtime/lib/growable_array.dart

Issue 12401002: Make List.from and Iterable.toList default to not growable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« no previous file with comments | « runtime/lib/expando_patch.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class _GrowableObjectArray<T> implements List<T> { 5 class _GrowableObjectArray<T> implements List<T> {
6 factory _GrowableObjectArray._uninstantiable() { 6 factory _GrowableObjectArray._uninstantiable() {
7 throw new UnsupportedError( 7 throw new UnsupportedError(
8 "GrowableObjectArray can only be allocated by the VM"); 8 "GrowableObjectArray can only be allocated by the VM");
9 } 9 }
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 309 }
310 310
311 String toString() { 311 String toString() {
312 return Collections.collectionToString(this); 312 return Collections.collectionToString(this);
313 } 313 }
314 314
315 Iterator<T> get iterator { 315 Iterator<T> get iterator {
316 return new ListIterator<T>(this); 316 return new ListIterator<T>(this);
317 } 317 }
318 318
319 List<T> toList({ bool growable: false }) { 319 List<T> toList({ bool growable: true }) {
320 return new List<T>.from(this, growable: growable); 320 return new List<T>.from(this, growable: growable);
321 } 321 }
322 322
323 Set<T> toSet() { 323 Set<T> toSet() {
324 return new Set<T>.from(this); 324 return new Set<T>.from(this);
325 } 325 }
326 } 326 }
OLDNEW
« no previous file with comments | « runtime/lib/expando_patch.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698