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

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

Issue 10898003: Remove List.copyFrom from VM and from tests. It was removed from the List interface in r941. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment, fix error. Created 8 years, 3 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/array.dart ('k') | tests/co19/co19-dart2js.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) 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 const UnsupportedOperationException( 7 throw const UnsupportedOperationException(
8 "GrowableObjectArray can only be allocated by the VM"); 8 "GrowableObjectArray can only be allocated by the VM");
9 } 9 }
10 10
11 void copyFrom(List src, int srcStart, int dstStart, int count) {
12 Arrays.copy(src, srcStart, this, dstStart, count);
13 }
14
15 void setRange(int start, int length, List<T> from, [int startFrom = 0]) { 11 void setRange(int start, int length, List<T> from, [int startFrom = 0]) {
16 if (length < 0) { 12 if (length < 0) {
17 throw new IllegalArgumentException("negative length $length"); 13 throw new IllegalArgumentException("negative length $length");
18 } 14 }
19 Arrays.copy(from, startFrom, this, start, length); 15 Arrays.copy(from, startFrom, this, start, length);
20 } 16 }
21 17
22 void removeRange(int start, int length) { 18 void removeRange(int start, int length) {
23 if (length == 0) { 19 if (length == 0) {
24 return; 20 return;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 T next() { 228 T next() {
233 if (!hasNext()) { 229 if (!hasNext()) {
234 throw const NoMoreElementsException(); 230 throw const NoMoreElementsException();
235 } 231 }
236 return _array[_pos++]; 232 return _array[_pos++];
237 } 233 }
238 234
239 final GrowableObjectArray<T> _array; 235 final GrowableObjectArray<T> _array;
240 int _pos; 236 int _pos;
241 } 237 }
OLDNEW
« no previous file with comments | « runtime/lib/array.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698