| OLD | NEW |
| 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 Iterable<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 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 bool operator ==(other) { | 59 bool operator ==(other) { |
| 60 if (other is !Link<T>) return false; | 60 if (other is !Link<T>) return false; |
| 61 return other.isEmpty; | 61 return other.isEmpty; |
| 62 } | 62 } |
| 63 | 63 |
| 64 String toString() => "[]"; | 64 String toString() => "[]"; |
| 65 | 65 |
| 66 get length { | 66 get length { |
| 67 throw new UnsupportedError('get:length'); | 67 throw new UnsupportedError('get:length'); |
| 68 } | 68 } |
| 69 |
| 70 int slowLength() => 0; |
| 69 } | 71 } |
| 70 | 72 |
| 71 abstract class LinkBuilder<T> { | 73 abstract class LinkBuilder<T> { |
| 72 factory LinkBuilder() = LinkBuilderImplementation; | 74 factory LinkBuilder() = LinkBuilderImplementation; |
| 73 | 75 |
| 74 Link<T> toLink(); | 76 Link<T> toLink(); |
| 75 void addLast(T t); | 77 void addLast(T t); |
| 76 | 78 |
| 77 final int length; | 79 final int length; |
| 78 final bool isEmpty; | 80 final bool isEmpty; |
| 79 } | 81 } |
| OLD | NEW |