Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart b/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
| index 2f9ea8414d63179db530781e952811e3671e5790..65358c6c4a3320db9d8bca23232da911aec43eb4 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart |
| @@ -81,11 +81,14 @@ class LinkEntry<T> extends Link<T> { |
| bool get isEmpty => false; |
| - List<T> toList() { |
| + List<T> toList({ bool growable: false }) { |
|
floitsch
2013/02/26 13:54:19
=> new List<T>.from(this, growable: growable);
Lasse Reichstein Nielsen
2013/02/26 15:26:00
Done.
|
| List<T> list = new List<T>(); |
| for (Link<T> link = this; !link.isEmpty; link = link.tail) { |
| list.addLast(link.head); |
| } |
| + if (!growable) { |
| + list = new List<T>.from(list); |
| + } |
| return list; |
| } |