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

Side by Side Diff: lib/html/templates/immutable_list_mixin.darttemplate

Issue 10941047: Don't generate FooList if it behaves like List<Foo> exactly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
OLDNEW
1 // -- start List<$E> mixins. 1 // -- start List<$E> mixins.
2 // $E is the element type. 2 // $E is the element type.
3 3
4 // From Iterable<$E>: 4 // From Iterable<$E>:
5 5
6 Iterator<$E> iterator() { 6 Iterator<$E> iterator() {
7 // Note: NodeLists are not fixed size. And most probably length shouldn't 7 // Note: NodeLists are not fixed size. And most probably length shouldn't
8 // be cached in both iterator _and_ forEach method. For now caching it 8 // be cached in both iterator _and_ forEach method. For now caching it
9 // for consistency. 9 // for consistency.
10 return new _FixedSizeListIterator<$E>(this); 10 return new _FixedSizeListIterator<$E>(this);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (start === null) start = length - 1; 50 if (start === null) start = length - 1;
51 return _Lists.lastIndexOf(this, element, start); 51 return _Lists.lastIndexOf(this, element, start);
52 } 52 }
53 53
54 $E last() => this[length - 1]; 54 $E last() => this[length - 1];
55 55
56 $E removeLast() { 56 $E removeLast() {
57 throw const UnsupportedOperationException("Cannot removeLast on immutable Li st."); 57 throw const UnsupportedOperationException("Cannot removeLast on immutable Li st.");
58 } 58 }
59 59
60 // FIXME: implement these.
61 void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) { 60 void setRange(int start, int rangeLength, List<$E> from, [int startFrom]) {
62 throw const UnsupportedOperationException("Cannot setRange on immutable List ."); 61 throw const UnsupportedOperationException("Cannot setRange on immutable List .");
63 } 62 }
64 63
65 void removeRange(int start, int rangeLength) { 64 void removeRange(int start, int rangeLength) {
66 throw const UnsupportedOperationException("Cannot removeRange on immutable L ist."); 65 throw const UnsupportedOperationException("Cannot removeRange on immutable L ist.");
67 } 66 }
68 67
69 void insertRange(int start, int rangeLength, [$E initialValue]) { 68 void insertRange(int start, int rangeLength, [$E initialValue]) {
70 throw const UnsupportedOperationException("Cannot insertRange on immutable L ist."); 69 throw const UnsupportedOperationException("Cannot insertRange on immutable L ist.");
71 } 70 }
72 71
73 List<$E> getRange(int start, int rangeLength) => 72 List<$E> getRange(int start, int rangeLength) =>
74 _Lists.getRange(this, start, rangeLength, <$E>[]); 73 _Lists.getRange(this, start, rangeLength, <$E>[]);
75 74
76 // -- end List<$E> mixins. 75 // -- end List<$E> mixins.
OLDNEW
« lib/html/scripts/systemhtml.py ('K') | « lib/html/src/dart2js_Conversions.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698