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

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

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 39f08dcc3603ddf9273ed2e4238c45bb70d9a6d5..9325653f7fbf34e3f9cab61fdae4e3c9e59f0a4e 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -259,7 +259,7 @@ abstract class Enqueuer {
recentClasses.add(cls);
cls.ensureResolved(compiler);
cls.implementation.forEachMember(processInstantiatedClassMember);
- if (isResolutionQueue) {
+ if (isResolutionQueue && !cls.isSynthesized) {
compiler.resolver.checkClass(cls);
}
// We only tell the backend once that [cls] was instantiated, so
@@ -724,6 +724,7 @@ class ResolutionEnqueuer extends Enqueuer {
bool internalAddToWorkList(Element element) {
if (element.isErroneous) return false;
+
assert(invariant(element, element is AnalyzableElement,
message: 'Element $element is not analyzable.'));
if (hasBeenResolved(element)) return false;
@@ -734,7 +735,15 @@ class ResolutionEnqueuer extends Enqueuer {
compiler.world.registerUsedElement(element);
- queue.add(new ResolutionWorkItem(element, itemCompilationContextCreator()));
+ ResolutionWorkItem workItem;
+ if (compiler.serialization.isDeserialized(element)) {
+ workItem = compiler.serialization.createResolutionWorkItem(
+ element, itemCompilationContextCreator());
+ } else {
+ workItem = new ResolutionWorkItem(
+ element, itemCompilationContextCreator());
+ }
+ queue.add(workItem);
// Enable isolate support if we start using something from the isolate
// library, or timers for the async library. We exclude constant fields,

Powered by Google App Engine
This is Rietveld 408576698