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

Unified Diff: sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 13261008: Check for cyclic reference in typedefs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 9 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: sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 125a355bc9e374777be6d0cc40cb69092374fcd2..4d37f2e007bb17b766ddc98ef33704395d7569c9 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -393,6 +393,8 @@ abstract class Enqueuer {
void forEach(f(WorkItem work));
+ void forEachPostProcessing(f(PostProcessing work)) {}
+
void logSummary(log(message)) {
_logSpecificSummary(log);
nativeEnqueuer.logSummary(log);
@@ -416,11 +418,14 @@ class ResolutionEnqueuer extends Enqueuer {
final Queue<ResolutionWorkItem> queue;
+ final Queue<PostProcessing> postQueue;
+
ResolutionEnqueuer(Compiler compiler,
ItemCompilationContext itemCompilationContextCreator())
: super('resolution enqueuer', compiler, itemCompilationContextCreator),
resolvedElements = new Map<Element, TreeElements>(),
- queue = new Queue<ResolutionWorkItem>();
+ queue = new Queue<ResolutionWorkItem>(),
+ postQueue = new Queue<PostProcessing>();
bool get isResolutionQueue => true;
@@ -521,6 +526,20 @@ class ResolutionEnqueuer extends Enqueuer {
}
}
+ void addPostProcessing(Element element, PostProcess process) {
+ if (queueIsClosed) {
+ throw new SpannableAssertionFailure(element,
+ "Resolution work list is closed.");
+ }
+ postQueue.add(new PostProcessing(element, process));
+ }
+
+ void forEachPostProcessing(f(PostProcessing work)) {
+ while (!postQueue.isEmpty) {
+ f(postQueue.removeFirst());
+ }
+ }
+
void registerJsCall(Send node, ResolverVisitor resolver) {
nativeEnqueuer.registerJsCall(node, resolver);
}

Powered by Google App Engine
This is Rietveld 408576698