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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/util/link_implementation.dart

Issue 12087052: Implement Types.isSubtype for FunctionType with optional and named parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased (again) Created 7 years, 10 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 // 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 part of util_implementation; 5 part of util_implementation;
6 6
7 class LinkIterator<T> implements Iterator<T> { 7 class LinkIterator<T> implements Iterator<T> {
8 T _current; 8 T _current;
9 Link<T> _link; 9 Link<T> _link;
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 Link<T> myElements = this; 100 Link<T> myElements = this;
101 while (!myElements.isEmpty && !other.isEmpty) { 101 while (!myElements.isEmpty && !other.isEmpty) {
102 if (myElements.head != other.head) { 102 if (myElements.head != other.head) {
103 return false; 103 return false;
104 } 104 }
105 myElements = myElements.tail; 105 myElements = myElements.tail;
106 other = other.tail; 106 other = other.tail;
107 } 107 }
108 return myElements.isEmpty && other.isEmpty; 108 return myElements.isEmpty && other.isEmpty;
109 } 109 }
110
111 int slowLength() => 1 + tail.slowLength();
110 } 112 }
111 113
112 class LinkBuilderImplementation<T> implements LinkBuilder<T> { 114 class LinkBuilderImplementation<T> implements LinkBuilder<T> {
113 LinkEntry<T> head = null; 115 LinkEntry<T> head = null;
114 LinkEntry<T> lastLink = null; 116 LinkEntry<T> lastLink = null;
115 int length = 0; 117 int length = 0;
116 118
117 LinkBuilderImplementation(); 119 LinkBuilderImplementation();
118 120
119 Link<T> toLink() { 121 Link<T> toLink() {
(...skipping 11 matching lines...) Expand all
131 if (head == null) { 133 if (head == null) {
132 head = entry; 134 head = entry;
133 } else { 135 } else {
134 lastLink.tail = entry; 136 lastLink.tail = entry;
135 } 137 }
136 lastLink = entry; 138 lastLink = entry;
137 } 139 }
138 140
139 bool get isEmpty => length == 0; 141 bool get isEmpty => length == 0;
140 } 142 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/util/link.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698