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

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

Issue 1376863004: Avoid eager enqueueing from resolution (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix deferred+mirrors bug. Created 5 years, 2 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/compiler.dart ('k') | pkg/compiler/lib/src/dart_backend/dart_backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_backend/backend.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
index c2057a711413413b0db3a5bcb49a2465657edab9..85427b14e81738fd717766325a6c79534860d19c 100644
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend.dart
@@ -183,7 +183,7 @@ class DartBackend extends Backend {
int totalSize = outputter.assembleProgram(
libraries: compiler.libraryLoader.libraries,
instantiatedClasses: compiler.resolverWorld.directlyInstantiatedClasses,
- resolvedElements: compiler.enqueuer.resolution.resolvedElements,
+ resolvedElements: compiler.enqueuer.resolution.processedElements,
usedTypeLiterals: usedTypeLiterals,
postProcessElementAst: postProcessElementAst,
computeElementAst: computeElementAst,
@@ -346,6 +346,24 @@ class DartResolutionCallbacks extends ResolutionCallbacks {
DartResolutionCallbacks(this.backend);
+ @override
+ WorldImpact transformImpact(ResolutionWorldImpact worldImpact) {
+ TransformedWorldImpact transformed =
+ new TransformedWorldImpact(worldImpact);
+ for (DartType typeLiteral in worldImpact.typeLiterals) {
+ onTypeLiteral(typeLiteral, transformed);
+ }
+ for (InterfaceType instantiatedType in worldImpact.instantiatedTypes) {
+ // TODO(johnniwinther): Remove this when dependency tracking is done on
+ // the world impact itself.
+ transformed.registerInstantiation(instantiatedType);
+ backend.registerInstantiatedType(
+ instantiatedType, backend.compiler.enqueuer.resolution, transformed);
+ }
+ return transformed;
+ }
+
+ @override
void onTypeLiteral(DartType type, Registry registry) {
if (type.isInterfaceType) {
backend.usedTypeLiterals.add(type.element);
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart_backend/dart_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698