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

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

Issue 10001008: Many type fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 8 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 | « lib/compiler/implementation/tree/unparser.dart ('k') | 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) 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 class LinkIterator<T> implements Iterator<T> { 5 class LinkIterator<T> implements Iterator<T> {
6 Link<T> current; 6 Link<T> current;
7 LinkIterator(Link<T> this.current); 7 LinkIterator(Link<T> this.current);
8 bool hasNext() => !current.isEmpty(); 8 bool hasNext() => !current.isEmpty();
9 T next() { 9 T next() {
10 T result = current.head; 10 T result = current.head;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 void printOn(StringBuffer buffer, [separatedBy]) { 56 void printOn(StringBuffer buffer, [separatedBy]) {
57 } 57 }
58 58
59 String toString() => "[]"; 59 String toString() => "[]";
60 60
61 Link<T> reverse() => this; 61 Link<T> reverse() => this;
62 62
63 Link<T> reversePrependAll(Link<T> from) { 63 Link<T> reversePrependAll(Link<T> from) {
64 if (from.isEmpty()) return this; 64 if (from.isEmpty()) return this;
65 return from.head.reversePrependAll(from.tail); 65 return this.prepend(from.head).reversePrependAll(from.tail);
66 } 66 }
67 67
68 List toList() => const []; 68 List toList() => const [];
69 69
70 bool isEmpty() => true; 70 bool isEmpty() => true;
71 71
72 void forEach(void f(T element)) {} 72 void forEach(void f(T element)) {}
73 } 73 }
74 74
75 class LinkEntry<T> implements Link<T> { 75 class LinkEntry<T> implements Link<T> {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 length++; 156 length++;
157 LinkEntry<T> entry = new LinkEntry<T>(t, null); 157 LinkEntry<T> entry = new LinkEntry<T>(t, null);
158 if (head === null) { 158 if (head === null) {
159 head = entry; 159 head = entry;
160 } else { 160 } else {
161 lastLink.tail = entry; 161 lastLink.tail = entry;
162 } 162 }
163 lastLink = entry; 163 lastLink = entry;
164 } 164 }
165 } 165 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/tree/unparser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698