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

Side by Side Diff: pkg/compiler/lib/src/util/link_implementation.dart

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Handle (bypass) external const constructors. Created 5 years, 5 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
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 while (!link.isEmpty) { 173 while (!link.isEmpty) {
174 list[index] = link.head; 174 list[index] = link.head;
175 link = link.tail; 175 link = link.tail;
176 index++; 176 index++;
177 } 177 }
178 lastLink = null; 178 lastLink = null;
179 head = null; 179 head = null;
180 return list; 180 return list;
181 } 181 }
182 182
183 void addLast(T t) { 183 Link<T> addLast(T t) {
184 length++; 184 length++;
185 LinkEntry<T> entry = new LinkEntry<T>(t, null); 185 LinkEntry<T> entry = new LinkEntry<T>(t, null);
186 if (head == null) { 186 if (head == null) {
187 head = entry; 187 head = entry;
188 } else { 188 } else {
189 lastLink.tail = entry; 189 lastLink.tail = entry;
190 } 190 }
191 lastLink = entry; 191 lastLink = entry;
192 return entry;
192 } 193 }
193 194
194 bool get isEmpty => length == 0; 195 bool get isEmpty => length == 0;
195 } 196 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/util/link.dart ('k') | tests/compiler/dart2js/analyze_unused_dart2js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698