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

Side by Side Diff: tests/compiler/dart2js/dictionary_types_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) 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 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 import 'memory_compiler.dart'; 7 import 'memory_compiler.dart';
8 import 'compiler_helper.dart' show findElement; 8 import 'compiler_helper.dart' show findElement;
9 9
10 var SOURCES = const { 10 var SOURCES = const {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 compileAndTest(source, checker, {createCode: false}) async { 136 compileAndTest(source, checker, {createCode: false}) async {
137 CompilationResult result = await runCompiler( 137 CompilationResult result = await runCompiler(
138 entryPoint: Uri.parse('memory:' + source), 138 entryPoint: Uri.parse('memory:' + source),
139 memorySourceFiles: SOURCES, 139 memorySourceFiles: SOURCES,
140 beforeRun: (compiler) { 140 beforeRun: (compiler) {
141 compiler.stopAfterTypeInference = !createCode; 141 compiler.stopAfterTypeInference = !createCode;
142 }); 142 });
143 var compiler = result.compiler; 143 var compiler = result.compiler;
144 var commonMasks = compiler.commonMasks; 144 var commonMasks = compiler.closedWorld.commonMasks;
145 var typesInferrer = compiler.globalInference.typesInferrer; 145 var typesInferrer = compiler.globalInference.typesInferrerInternal;
146 getType(String name) { 146 getType(String name) {
147 var element = findElement(compiler, name); 147 var element = findElement(compiler, name);
148 return typesInferrer.getTypeOfElement(element); 148 return typesInferrer.getTypeOfElement(element);
149 } 149 }
150 150
151 if (!createCode) { 151 if (!createCode) {
152 checker(commonMasks, getType, compiler); 152 checker(commonMasks, getType, compiler);
153 } else { 153 } else {
154 var element = compiler.mainFunction; 154 var element = compiler.mainFunction;
155 var code = compiler.backend.getGeneratedCode(element); 155 var code = compiler.backend.getGeneratedCode(element);
156 checker(code); 156 checker(code);
157 } 157 }
158 } 158 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/container_mask_equal_test.dart ('k') | tests/compiler/dart2js/expect_annotations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698