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

Unified Diff: tests/compiler/dart2js/simple_inferrer_callers_test.dart

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/simple_inferrer_callers_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_callers_test.dart b/tests/compiler/dart2js/simple_inferrer_callers_test.dart
index 6bf7e6afba2559ede6343b021eb385f014a054fd..e59b66d0179e14f8eed6cc3358e7382eda461481 100644
--- a/tests/compiler/dart2js/simple_inferrer_callers_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_callers_test.dart
@@ -7,6 +7,7 @@
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
+import 'package:compiler/src/common_elements.dart';
import 'package:compiler/src/inferrer/type_graph_inferrer.dart';
import 'package:compiler/src/world.dart' show ClosedWorld, ClosedWorldRefiner;
@@ -39,14 +40,19 @@ void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri, analyzeOnly: true);
asyncTest(() => compiler.run(uri).then((_) {
- ClosedWorldRefiner closedWorldRefiner = compiler.closeResolution();
+ ElementEnvironment elementEnvironment =
+ compiler.frontendStrategy.elementEnvironment;
+ ClosedWorldRefiner closedWorldRefiner =
+ compiler.closeResolution(elementEnvironment.mainFunction);
ClosedWorld closedWorld =
compiler.resolutionWorldBuilder.closedWorldForTesting;
var inferrer =
new MyInferrer(compiler, closedWorld, closedWorldRefiner);
compiler.globalInference.typesInferrerInternal = inferrer;
compiler.globalInference.runGlobalTypeInference(
- compiler.mainFunction, closedWorld, closedWorldRefiner);
+ closedWorld.elementEnvironment.mainFunction,
+ closedWorld,
+ closedWorldRefiner);
var mainElement = findElement(compiler, 'main');
var classA = findElement(compiler, 'A');
var fieldA = classA.lookupLocalMember('field');
« no previous file with comments | « tests/compiler/dart2js/serialization/native_data_test.dart ('k') | tests/compiler/dart2js/source_map_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698