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

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

Issue 694353007: 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 type_test_helper; 5 library type_test_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import 'compiler_helper.dart' as mock; 9 import 'compiler_helper.dart' as mock;
10 import 'memory_compiler.dart' as memory; 10 import 'memory_compiler.dart' as memory;
11 import 'package:compiler/implementation/dart_types.dart'; 11 import 'package:compiler/src/dart_types.dart';
12 import 'package:compiler/implementation/dart2jslib.dart' 12 import 'package:compiler/src/dart2jslib.dart'
13 show Compiler; 13 show Compiler;
14 import 'package:compiler/implementation/elements/elements.dart' 14 import 'package:compiler/src/elements/elements.dart'
15 show Element, 15 show Element,
16 TypeDeclarationElement, 16 TypeDeclarationElement,
17 ClassElement; 17 ClassElement;
18 18
19 GenericType instantiate(TypeDeclarationElement element, 19 GenericType instantiate(TypeDeclarationElement element,
20 List<DartType> arguments) { 20 List<DartType> arguments) {
21 if (element.isClass) { 21 if (element.isClass) {
22 return new InterfaceType(element, arguments); 22 return new InterfaceType(element, arguments);
23 } else { 23 } else {
24 assert(element.isTypedef); 24 assert(element.isTypedef);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 namedParameters.forEach((String name, DartType type) { 134 namedParameters.forEach((String name, DartType type) {
135 namedParameterNames.add(name); 135 namedParameterNames.add(name);
136 namedParameterTypes.add(type); 136 namedParameterTypes.add(type);
137 }); 137 });
138 } 138 }
139 return new FunctionType.synthesized( 139 return new FunctionType.synthesized(
140 returnType, parameters, optionalParameters, 140 returnType, parameters, optionalParameters,
141 namedParameterNames, namedParameterTypes); 141 namedParameterNames, namedParameterTypes);
142 } 142 }
143 } 143 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/type_substitution_test.dart ('k') | tests/compiler/dart2js/type_variable_occurrence_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698