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

Side by Side Diff: tests/compiler/dart2js/link_helper.dart

Issue 690103004: Move dart2js from sdk/lib/_internal/compiler to pkg/compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library link_helper; 5 library link_helper;
6 6
7 import 'package:compiler/implementation/util/util.dart'; 7 import 'package:compiler/src/util/util.dart';
8 import 'package:compiler/implementation/util/util_implementation.dart'; 8 import 'package:compiler/src/util/util_implementation.dart';
9 9
10 Link LinkFromList(List list) { 10 Link LinkFromList(List list) {
11 switch (list.length) { 11 switch (list.length) {
12 case 0: 12 case 0:
13 return new Link(); 13 return new Link();
14 case 1: 14 case 1:
15 return new LinkEntry(list[0]); 15 return new LinkEntry(list[0]);
16 case 2: 16 case 2:
17 return new LinkEntry(list[0], new LinkEntry(list[1])); 17 return new LinkEntry(list[0], new LinkEntry(list[1]));
18 case 3: 18 case 3:
19 return new LinkEntry( 19 return new LinkEntry(
20 list[0], new LinkEntry(list[1], new LinkEntry(list[2]))); 20 list[0], new LinkEntry(list[1], new LinkEntry(list[2])));
21 } 21 }
22 Link link = new Link(); 22 Link link = new Link();
23 for (int i = list.length; i > 0; i--) { 23 for (int i = list.length; i > 0; i--) {
24 link = link.prepend(list[i - 1]); 24 link = link.prepend(list[i - 1]);
25 } 25 }
26 return link; 26 return link;
27 } 27 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/least_upper_bound_test.dart ('k') | tests/compiler/dart2js/link_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698