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

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

Issue 8431028: Implement async file API on top of isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type mismatch. Created 9 years, 1 month 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/bin/file_impl.dart ('k') | tests/corelib/corelib.status » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 ListFactory<T> { 5 class ListFactory<T> {
6 6
7 factory List.from(Iterable<T> other) { 7 factory List.from(Iterable<T> other) {
8 GrowableObjectArray<T> list = new GrowableObjectArray<T>(); 8 GrowableObjectArray<T> list = new GrowableObjectArray<T>();
9 for (final e in other) { 9 for (final e in other) {
10 list.add(e); 10 list.add(e);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void _copyFromObjectArray(ObjectArray src, 59 void _copyFromObjectArray(ObjectArray src,
60 int srcStart, 60 int srcStart,
61 int dstStart, 61 int dstStart,
62 int count) 62 int count)
63 native "ObjectArray_copyFromObjectArray"; 63 native "ObjectArray_copyFromObjectArray";
64 64
65 void setRange(int start, int length, List<T> from, [int startFrom = 0]) { 65 void setRange(int start, int length, List<T> from, [int startFrom = 0]) {
66 if (length < 0) { 66 if (length < 0) {
67 throw new IllegalArgumentException("negative length $length"); 67 throw new IllegalArgumentException("negative length $length");
68 } 68 }
69 copyFrom(from, start, startFrom, count); 69 copyFrom(from, startFrom, start, length);
70 } 70 }
71 71
72 void removeRange(int start, int length) { 72 void removeRange(int start, int length) {
73 throw const UnsupportedOperationException( 73 throw const UnsupportedOperationException(
74 "Cannot remove range of a non-extendable array"); 74 "Cannot remove range of a non-extendable array");
75 } 75 }
76 76
77 void insertRange(int start, int length, [T initialValue = null]) { 77 void insertRange(int start, int length, [T initialValue = null]) {
78 throw const UnsupportedOperationException( 78 throw const UnsupportedOperationException(
79 "Cannot insert range in a non-extendable array"); 79 "Cannot insert range in a non-extendable array");
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 if (!hasNext()) { 307 if (!hasNext()) {
308 throw const NoMoreElementsException(); 308 throw const NoMoreElementsException();
309 } 309 }
310 return _array[_pos++]; 310 return _array[_pos++];
311 } 311 }
312 312
313 final List<T> _array; 313 final List<T> _array;
314 final int _length; // Cache array length for faster access. 314 final int _length; // Cache array length for faster access.
315 int _pos; 315 int _pos;
316 } 316 }
OLDNEW
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698