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

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

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 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
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 import 'package:async_helper/async_helper.dart'; 5 import 'package:async_helper/async_helper.dart';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 7
8 import 'compiler_helper.dart'; 8 import 'compiler_helper.dart';
9 import 'type_mask_test_helper.dart'; 9 import 'type_mask_test_helper.dart';
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ..returnDynamic2() 59 ..returnDynamic2()
60 ..returnDynamic3() 60 ..returnDynamic3()
61 ..returnDynamic4(); 61 ..returnDynamic4();
62 } 62 }
63 """; 63 """;
64 64
65 void main() { 65 void main() {
66 Uri uri = new Uri(scheme: 'source'); 66 Uri uri = new Uri(scheme: 'source');
67 var compiler = compilerFor(TEST, uri); 67 var compiler = compilerFor(TEST, uri);
68 asyncTest(() => compiler.run(uri).then((_) { 68 asyncTest(() => compiler.run(uri).then((_) {
69 var commonMasks = compiler.commonMasks; 69 var commonMasks = compiler.closedWorld.commonMasks;
70 var typesInferrer = compiler.globalInference.typesInferrer; 70 var typesInferrer = compiler.globalInference.typesInferrerInternal;
71 71
72 checkReturnInClass(String className, String methodName, type) { 72 checkReturnInClass(String className, String methodName, type) {
73 var cls = findElement(compiler, className); 73 var cls = findElement(compiler, className);
74 var element = cls.lookupLocalMember(methodName); 74 var element = cls.lookupLocalMember(methodName);
75 Expect.equals( 75 Expect.equals(
76 type, 76 type,
77 simplify(typesInferrer.getReturnTypeOfElement(element), compiler), 77 simplify(typesInferrer.getReturnTypeOfElement(element), compiler),
78 methodName); 78 methodName);
79 } 79 }
80 80
(...skipping 15 matching lines...) Expand all
96 checkReturnInClass( 96 checkReturnInClass(
97 'B', 'returnDynamic1', const TypeMask.nonNullEmpty()); 97 'B', 'returnDynamic1', const TypeMask.nonNullEmpty());
98 checkReturnInClass( 98 checkReturnInClass(
99 'B', 'returnDynamic2', const TypeMask.nonNullEmpty()); 99 'B', 'returnDynamic2', const TypeMask.nonNullEmpty());
100 checkReturnInClass( 100 checkReturnInClass(
101 'B', 'returnDynamic3', const TypeMask.nonNullEmpty()); 101 'B', 'returnDynamic3', const TypeMask.nonNullEmpty());
102 checkReturnInClass( 102 checkReturnInClass(
103 'B', 'returnDynamic4', const TypeMask.nonNullEmpty()); 103 'B', 'returnDynamic4', const TypeMask.nonNullEmpty());
104 })); 104 }));
105 } 105 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698