| Index: pkg/compiler/lib/src/util/link_implementation.dart
|
| diff --git a/pkg/compiler/lib/src/util/link_implementation.dart b/pkg/compiler/lib/src/util/link_implementation.dart
|
| index 74d9f231fa8c3495f5460be462b992c4ce43c3e6..973ef50a9c983638b88d1f48a81e6dc78693962e 100644
|
| --- a/pkg/compiler/lib/src/util/link_implementation.dart
|
| +++ b/pkg/compiler/lib/src/util/link_implementation.dart
|
| @@ -169,6 +169,7 @@ class LinkBuilderImplementation<T> implements LinkBuilder<T> {
|
| Link<T> link = head;
|
| lastLink = null;
|
| head = null;
|
| + length = 0;
|
| return link;
|
| }
|
|
|
| @@ -184,6 +185,7 @@ class LinkBuilderImplementation<T> implements LinkBuilder<T> {
|
| }
|
| lastLink = null;
|
| head = null;
|
| + length = 0;
|
| return list;
|
| }
|
|
|
| @@ -200,4 +202,17 @@ class LinkBuilderImplementation<T> implements LinkBuilder<T> {
|
| }
|
|
|
| bool get isEmpty => length == 0;
|
| +
|
| + T get first {
|
| + if (head != null) {
|
| + return head.head;
|
| + }
|
| + throw new StateError("no elements");
|
| + }
|
| +
|
| + void clear() {
|
| + head = null;
|
| + lastLink = null;
|
| + length = 0;
|
| + }
|
| }
|
|
|