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

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

Issue 14022007: Move Iterable implementation to collection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Merge to head. Created 7 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
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 org_dartlang_compiler_util; 5 part of org_dartlang_compiler_util;
6 6
7 class Link<T> extends Iterable<T> { 7 class Link<T> extends IterableBase<T> {
8 T get head => null; 8 T get head => null;
9 Link<T> get tail => null; 9 Link<T> get tail => null;
10 10
11 factory Link.fromList(List<T> list) { 11 factory Link.fromList(List<T> list) {
12 switch (list.length) { 12 switch (list.length) {
13 case 0: 13 case 0:
14 return new Link<T>(); 14 return new Link<T>();
15 case 1: 15 case 1:
16 return new LinkEntry<T>(list[0]); 16 return new LinkEntry<T>(list[0]);
17 case 2: 17 case 2:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 abstract class LinkBuilder<T> { 73 abstract class LinkBuilder<T> {
74 factory LinkBuilder() = LinkBuilderImplementation; 74 factory LinkBuilder() = LinkBuilderImplementation;
75 75
76 Link<T> toLink(); 76 Link<T> toLink();
77 void addLast(T t); 77 void addLast(T t);
78 78
79 final int length; 79 final int length;
80 final bool isEmpty; 80 final bool isEmpty;
81 } 81 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/types.dart ('k') | sdk/lib/_internal/compiler/implementation/util/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698