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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 2935063002: Add ClosedWorld.elementEnvironment and remove Compiler.elementEnvironment (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
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 03168d0e269671af705f51a9c2f33305b7dfd9a4..aa3a5ba692f2c0be69316011b6ef91449c0c6465 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -88,7 +88,6 @@ abstract class Compiler {
DartTypes types;
FrontendStrategy frontendStrategy;
BackendStrategy backendStrategy;
- ElementEnvironment _elementEnvironment;
CompilerDiagnosticReporter _reporter;
CompilerResolution _resolution;
ParsingContext _parsingContext;
@@ -120,7 +119,6 @@ abstract class Compiler {
FunctionEntity mainFunction;
DiagnosticReporter get reporter => _reporter;
- ElementEnvironment get elementEnvironment => _elementEnvironment;
Resolution get resolution => _resolution;
ParsingContext get parsingContext => _parsingContext;
@@ -200,7 +198,6 @@ abstract class Compiler {
? new KernelBackendStrategy(this)
: new ElementBackendStrategy(this);
_resolution = createResolution();
- _elementEnvironment = frontendStrategy.elementEnvironment;
types = new Types(_resolution);
if (options.verbose) {
@@ -568,7 +565,8 @@ abstract class Compiler {
}
reporter.log('Resolving...');
- processQueue(resolutionEnqueuer, mainFunction, libraryLoader.libraries,
+ processQueue(frontendStrategy.elementEnvironment, resolutionEnqueuer,
+ mainFunction, libraryLoader.libraries,
onProgress: showResolutionProgress);
backend.onResolutionEnd();
resolutionEnqueuer.logSummary(reporter.log);
@@ -621,7 +619,8 @@ abstract class Compiler {
codegenEnqueuer.applyImpact(computeImpactForLibrary(library));
});
}
- processQueue(codegenEnqueuer, mainFunction, libraryLoader.libraries,
+ processQueue(closedWorld.elementEnvironment, codegenEnqueuer,
+ mainFunction, libraryLoader.libraries,
onProgress: showCodegenProgress);
codegenEnqueuer.logSummary(reporter.log);
@@ -744,8 +743,8 @@ abstract class Compiler {
});
}
- void processQueue(Enqueuer enqueuer, FunctionEntity mainMethod,
- Iterable<LibraryEntity> libraries,
+ void processQueue(ElementEnvironment elementEnvironment, Enqueuer enqueuer,
+ FunctionEntity mainMethod, Iterable<LibraryEntity> libraries,
{void onProgress(Enqueuer enqueuer)}) {
selfTask.measureSubtask("Compiler.processQueue", () {
enqueuer.open(impactStrategy, mainMethod, libraries);
@@ -1296,6 +1295,10 @@ class CompilerResolution implements Resolution {
ParsingContext get parsingContext => _compiler.parsingContext;
@override
+ ElementEnvironment get elementEnvironment =>
+ _compiler.frontendStrategy.elementEnvironment;
+
+ @override
CommonElements get commonElements =>
_compiler.frontendStrategy.commonElements;
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698