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

Side by Side Diff: test/dart_codegen/expect/collection/linked_list.dart

Issue 1010893004: Allow S->T <: dynamic->T (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase and address comments Created 5 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
« no previous file with comments | « test/dart_codegen/expect/c/c.dart ('k') | test/dart_codegen/expect/collection/list.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 part of dart.collection; 1 part of dart.collection;
2 class LinkedList<E extends LinkedListEntry<E>> extends IterableBase<E> implemen ts _LinkedListLink {int _modificationCount = 0; 2 class LinkedList<E extends LinkedListEntry<E>> extends IterableBase<E> implemen ts _LinkedListLink {int _modificationCount = 0;
3 int _length = 0; 3 int _length = 0;
4 _LinkedListLink _next; 4 _LinkedListLink _next;
5 _LinkedListLink _previous; 5 _LinkedListLink _previous;
6 LinkedList() { 6 LinkedList() {
7 _next = _previous = this; 7 _next = _previous = this;
8 } 8 }
9 void addFirst(E entry) { 9 void addFirst(E entry) {
10 _insertAfter(this, entry); 10 _insertAfter(this, entry);
11 } 11 }
12 void add(E entry) { 12 void add(E entry) {
13 _insertAfter(_previous, entry); 13 _insertAfter(_previous, entry);
14 } 14 }
15 void addAll(Iterable<E> entries) { 15 void addAll(Iterable<E> entries) {
16 entries.forEach((entry) => _insertAfter(_previous, DEVC$RT.cast(entry, dynamic , E, "CastGeneral", """line 65, column 56 of dart:collection/linked_list.dart: " "", entry is E, false))); 16 entries.forEach(((__x10) => DEVC$RT.wrap((void f(dynamic __u5)) {
17 void c(dynamic x0) => f(x0);
18 return f == null ? null : c;
19 }
20 , __x10, __t8, DEVC$RT.type((__t6<E> _) {
21 }
22 ), "WrapLiteral", """line 65, column 21 of dart:collection/linked_list.dart: " "", __x10 is __t6<E>))((entry) => _insertAfter(_previous, DEVC$RT.cast(entry, dy namic, E, "CastGeneral", """line 65, column 56 of dart:collection/linked_list.da rt: """, entry is E, false))));
17 } 23 }
18 bool remove(E entry) { 24 bool remove(E entry) {
19 if (entry._list != this) return false; 25 if (entry._list != this) return false;
20 _unlink(entry); 26 _unlink(entry);
21 return true; 27 return true;
22 } 28 }
23 Iterator<E> get iterator => new _LinkedListIterator<E>(this); 29 Iterator<E> get iterator => new _LinkedListIterator<E>(this);
24 int get length => _length; 30 int get length => _length;
25 void clear() { 31 void clear() {
26 _modificationCount++; 32 _modificationCount++;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (identical(_previous, _list)) return null; 132 if (identical(_previous, _list)) return null;
127 return DEVC$RT.cast(_previous, _LinkedListLink, E, "CastUser", """line 261, col umn 12 of dart:collection/linked_list.dart: """, _previous is E, false); 133 return DEVC$RT.cast(_previous, _LinkedListLink, E, "CastUser", """line 261, col umn 12 of dart:collection/linked_list.dart: """, _previous is E, false);
128 } 134 }
129 void insertAfter(E entry) { 135 void insertAfter(E entry) {
130 _list._insertAfter(this, entry); 136 _list._insertAfter(this, entry);
131 } 137 }
132 void insertBefore(E entry) { 138 void insertBefore(E entry) {
133 _list._insertAfter(_previous, entry); 139 _list._insertAfter(_previous, entry);
134 } 140 }
135 } 141 }
142 typedef void __t6<E>(E __u7);
143 typedef void __t8(dynamic __u9);
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/c/c.dart ('k') | test/dart_codegen/expect/collection/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698