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

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

Issue 177963002: Use List instead of Link in the type system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/util/link.dart
diff --git a/sdk/lib/_internal/compiler/implementation/util/link.dart b/sdk/lib/_internal/compiler/implementation/util/link.dart
index 0dda13ada540fcc537255899bc0b7e48a141f90d..e93deeb208075a0f1bd003dec13d0b519d8dfdd2 100644
--- a/sdk/lib/_internal/compiler/implementation/util/link.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/link.dart
@@ -8,25 +8,6 @@ class Link<T> {
T get head => null;
Link<T> get tail => null;
- factory Link.fromList(List<T> list) {
- switch (list.length) {
- case 0:
- return new Link<T>();
- case 1:
- return new LinkEntry<T>(list[0]);
- case 2:
- return new LinkEntry<T>(list[0], new LinkEntry<T>(list[1]));
- case 3:
- return new LinkEntry<T>(
- list[0], new LinkEntry<T>(list[1], new LinkEntry<T>(list[2])));
- }
- Link link = new Link<T>();
- for (int i = list.length ; i > 0; i--) {
- link = link.prepend(list[i - 1]);
- }
- return link;
- }
-
const Link();
Link<T> prepend(T element) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/typechecker.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