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

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

Issue 27777003: - Undo broken manual commit due to repeated gcl failures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « no previous file | 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) 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 5
6 // TODO(srdjan): Use shared array implementation. 6 // TODO(srdjan): Use shared array implementation.
7 class _List<E> implements List<E> { 7 class _List<E> implements List<E> {
8 static final int _classId = (new _List(0))._cid; 8 static final int _classId = (new _List(0))._cid;
9 9
10 factory _List(length) native "List_allocate"; 10 factory _List(length) native "List_allocate";
(...skipping 18 matching lines...) Expand all
29 throw new UnsupportedError( 29 throw new UnsupportedError(
30 "Cannot add to a non-extendable array"); 30 "Cannot add to a non-extendable array");
31 } 31 }
32 32
33 void insertAll(int index, Iterable<E> iterable) { 33 void insertAll(int index, Iterable<E> iterable) {
34 throw new UnsupportedError( 34 throw new UnsupportedError(
35 "Cannot add to a non-extendable array"); 35 "Cannot add to a non-extendable array");
36 } 36 }
37 37
38 void setAll(int index, Iterable<E> iterable) { 38 void setAll(int index, Iterable<E> iterable) {
39 if (index < 0 || index > length) { 39 IterableMixinWorkaround.setAllList(this, index, iterable);
40 throw new RangeError.range(index, 0, length);
41 }
42 for (var element in iterable) {
43 [index++] = element;
44 }
45 } 40 }
46 41
47 E removeAt(int index) { 42 E removeAt(int index) {
48 throw new UnsupportedError( 43 throw new UnsupportedError(
49 "Cannot remove element of a non-extendable array"); 44 "Cannot remove element of a non-extendable array");
50 } 45 }
51 46
52 bool remove(Object element) { 47 bool remove(Object element) {
53 throw new UnsupportedError( 48 throw new UnsupportedError(
54 "Cannot remove element of a non-extendable array"); 49 "Cannot remove element of a non-extendable array");
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 } 560 }
566 _position = _length; 561 _position = _length;
567 _current = null; 562 _current = null;
568 return false; 563 return false;
569 } 564 }
570 565
571 E get current { 566 E get current {
572 return _current; 567 return _current;
573 } 568 }
574 } 569 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698