Chromium Code Reviews| Index: lib/compiler/implementation/enqueue.dart |
| diff --git a/lib/compiler/implementation/enqueue.dart b/lib/compiler/implementation/enqueue.dart |
| index 5877a37710d6d744c8ba98e7f44bea46fe0ff109..3f6f753a267541aa6517d2a541e92feb16663f51 100644 |
| --- a/lib/compiler/implementation/enqueue.dart |
| +++ b/lib/compiler/implementation/enqueue.dart |
| @@ -20,6 +20,7 @@ class EnqueueTask extends CompilerTask { |
| class RecompilationQueue { |
| final Queue<WorkItem> queue; |
| final Set<Element> queueElements; |
| + int processed = 0; |
| RecompilationQueue() |
| : queue = new Queue<WorkItem>(), |
| @@ -41,6 +42,7 @@ class RecompilationQueue { |
| WorkItem next() { |
| WorkItem item = queue.removeLast(); |
| queueElements.remove(item.element); |
| + processed++; |
| return item; |
| } |
| } |
| @@ -74,7 +76,7 @@ class Enqueuer { |
| void addToWorkList(Element element, [TreeElements elements]) { |
| if (element.isForeign()) return; |
| - if (compiler.pass == 2) return; |
| + if (compiler.phase == Compiler.PHASE_RECOMPILING) return; |
| if (queueIsClosed) { |
| if (isResolutionQueue && getCachedElements(element) !== null) return; |
| compiler.internalErrorOnElement(element, "Work list is closed."); |
| @@ -95,7 +97,8 @@ class Enqueuer { |
| // present as a separate element (the call to the closure will be a member |
| // function). |
| var closure = const SourceString("Closure"); |
| - return element.isMember() && element.getEnclosingClass().name != closure; |
| + return element.isMember() && |
| + element.getEnclosingClass() != compiler.closureClass; |
|
Søren Gjesse
2012/06/18 07:00:29
Turned out that comparing with compiler.closureCla
ahe
2012/06/18 07:38:50
It MUST work. If it doesn't, then something is wro
Søren Gjesse
2012/06/18 07:44:10
Then something is wrong. Comparing with compiler.c
ahe
2012/06/18 07:55:00
I don't know. All I know is testing for names does
|
| } |
| void registerRecompilationCandidate(Element element, |