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

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

Issue 2894893002: Add ElementCodegenWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_representation_test; 5 library type_representation_test;
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 import 'type_test_helper.dart'; 9 import 'type_test_helper.dart';
10 import 'package:compiler/src/elements/resolution_types.dart'; 10 import 'package:compiler/src/elements/resolution_types.dart';
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 m7(int a, String b, [List<int> c, d]) {} 42 m7(int a, String b, [List<int> c, d]) {}
43 m8(int a, {String b}) {} 43 m8(int a, {String b}) {}
44 m9(int a, String b, {List<int> c, d}) {} 44 m9(int a, String b, {List<int> c, d}) {}
45 m10(void f(int a, [b])) {} 45 m10(void f(int a, [b])) {}
46 """).then((env) { 46 """).then((env) {
47 var closedWorldRefiner = env.compiler.closeResolution(); 47 var closedWorldRefiner = env.compiler.closeResolution();
48 var closedWorld = closedWorldRefiner.closedWorld; 48 var closedWorld = closedWorldRefiner.closedWorld;
49 env.compiler.enqueuer.createCodegenEnqueuer(closedWorld); 49 env.compiler.enqueuer.createCodegenEnqueuer(closedWorld);
50 env.compiler.backend.onCodegenStart( 50 env.compiler.backend.onCodegenStart(
51 closedWorld, 51 closedWorld,
52 new CodegenWorldBuilderImpl( 52 new ElementCodegenWorldBuilderImpl(
53 env.compiler.elementEnvironment,
53 env.compiler.backend.nativeBasicData, 54 env.compiler.backend.nativeBasicData,
54 closedWorld, 55 closedWorld,
55 env.compiler.backend.constants, 56 env.compiler.backend.constants,
56 const TypeMaskStrategy())); 57 const TypeMaskStrategy()));
57 TypeRepresentationGenerator typeRepresentation = 58 TypeRepresentationGenerator typeRepresentation =
58 new TypeRepresentationGenerator(env.compiler.backend.namer); 59 new TypeRepresentationGenerator(env.compiler.backend.namer);
59 60
60 Expression onVariable(ResolutionTypeVariableType variable) { 61 Expression onVariable(ResolutionTypeVariableType variable) {
61 return new VariableUse(variable.name); 62 return new VariableUse(variable.name);
62 } 63 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ' $named: {c: [$List_rep, $int_rep], d: null}}'); 278 ' $named: {c: [$List_rep, $int_rep], d: null}}');
278 279
279 // m10(void f(int a, [b])) {} 280 // m10(void f(int a, [b])) {}
280 expect( 281 expect(
281 env.getElement('m10').computeType(env.compiler.resolution), 282 env.getElement('m10').computeType(env.compiler.resolution),
282 '{$func: 1, $args:' 283 '{$func: 1, $args:'
283 ' [{$func: 1,' 284 ' [{$func: 1,'
284 ' $retvoid: true, $args: [$int_rep], $opt: [,]}]}'); 285 ' $retvoid: true, $args: [$int_rep], $opt: [,]}]}');
285 })); 286 }));
286 } 287 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698