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

Side by Side Diff: tests/compiler/dart2js/closure_tracer_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:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 testStaticClosure2(); 147 testStaticClosure2();
148 testStaticClosure3(); 148 testStaticClosure3();
149 testStaticClosure4(); 149 testStaticClosure4();
150 } 150 }
151 '''; 151 ''';
152 152
153 void main() { 153 void main() {
154 Uri uri = new Uri(scheme: 'source'); 154 Uri uri = new Uri(scheme: 'source');
155 var compiler = compilerFor(TEST, uri); 155 var compiler = compilerFor(TEST, uri);
156 asyncTest(() => compiler.run(uri).then((_) { 156 asyncTest(() => compiler.run(uri).then((_) {
157 var commonMasks = compiler.commonMasks; 157 var commonMasks = compiler.closedWorld.commonMasks;
158 var typesInferrer = compiler.globalInference.typesInferrer; 158 var typesInferrer = compiler.globalInference.typesInferrerInternal;
159 159
160 checkType(String name, type) { 160 checkType(String name, type) {
161 var element = findElement(compiler, name); 161 var element = findElement(compiler, name);
162 var mask = typesInferrer.getReturnTypeOfElement(element); 162 var mask = typesInferrer.getReturnTypeOfElement(element);
163 Expect.equals(type.nullable(), simplify(mask, compiler), name); 163 Expect.equals(type.nullable(), simplify(mask, compiler), name);
164 } 164 }
165 165
166 checkType('testFunctionStatement', commonMasks.uint31Type); 166 checkType('testFunctionStatement', commonMasks.uint31Type);
167 checkType('testFunctionExpression', commonMasks.uint31Type); 167 checkType('testFunctionExpression', commonMasks.uint31Type);
168 checkType('testStoredInInstance', commonMasks.uint31Type); 168 checkType('testStoredInInstance', commonMasks.uint31Type);
169 checkType('testStoredInStatic', commonMasks.uint31Type); 169 checkType('testStoredInStatic', commonMasks.uint31Type);
170 checkType('testStoredInMapOfList', commonMasks.uint31Type); 170 checkType('testStoredInMapOfList', commonMasks.uint31Type);
171 checkType('testStoredInListOfList', commonMasks.uint31Type); 171 checkType('testStoredInListOfList', commonMasks.uint31Type);
172 checkType('testStoredInListOfListUsingInsert', commonMasks.uint31Type); 172 checkType('testStoredInListOfListUsingInsert', commonMasks.uint31Type);
173 checkType('testStoredInListOfListUsingAdd', commonMasks.uint31Type); 173 checkType('testStoredInListOfListUsingAdd', commonMasks.uint31Type);
174 checkType('testPassedInParameter', commonMasks.uint31Type); 174 checkType('testPassedInParameter', commonMasks.uint31Type);
175 checkType('testStaticClosure1', commonMasks.uint31Type); 175 checkType('testStaticClosure1', commonMasks.uint31Type);
176 checkType('testStaticClosure2', commonMasks.numType); 176 checkType('testStaticClosure2', commonMasks.numType);
177 checkType('testStaticClosure3', commonMasks.uint31Type); 177 checkType('testStaticClosure3', commonMasks.uint31Type);
178 checkType('testStaticClosure4', commonMasks.numType); 178 checkType('testStaticClosure4', commonMasks.numType);
179 })); 179 }));
180 } 180 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/call_site_simple_type_inferer_test.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698