Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class EnqueueTask extends CompilerTask { | 5 class EnqueueTask extends CompilerTask { |
| 6 final Enqueuer codegen; | 6 final Enqueuer codegen; |
| 7 final Enqueuer resolution; | 7 final Enqueuer resolution; |
| 8 | 8 |
| 9 String get name => 'Enqueue'; | 9 String get name => 'Enqueue'; |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 if (isResolutionQueue && getCachedElements(element) !== null) return; | 89 if (isResolutionQueue && getCachedElements(element) !== null) return; |
| 90 compiler.internalErrorOnElement(element, "Work list is closed."); | 90 compiler.internalErrorOnElement(element, "Work list is closed."); |
| 91 } | 91 } |
| 92 if (!isResolutionQueue && | 92 if (!isResolutionQueue && |
| 93 element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { | 93 element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { |
| 94 registerInstantiatedClass(element.getEnclosingClass()); | 94 registerInstantiatedClass(element.getEnclosingClass()); |
| 95 } | 95 } |
| 96 if (elements === null) { | 96 if (elements === null) { |
| 97 elements = getCachedElements(element); | 97 elements = getCachedElements(element); |
| 98 } | 98 } |
| 99 | |
| 99 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); | 100 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); |
| 101 | |
| 102 if (!compiler.hasIsolateSupport() | |
|
kasperl
2012/08/24 05:03:14
You didn't add the comment? ... and you didn't cac
ngeoffray
2012/08/24 07:32:51
That's odd. I was pretty sure I did it and uploade
| |
| 103 && element.getLibrary().uri.toString() == 'dart:isolate') { | |
| 104 compiler.enableIsolateSupport(element.getLibrary()); | |
| 105 } | |
| 100 } | 106 } |
| 101 | 107 |
| 102 void eagerRecompile(Element element) { | 108 void eagerRecompile(Element element) { |
| 103 universe.generatedCode.remove(element); | 109 universe.generatedCode.remove(element); |
| 104 universe.generatedBailoutCode.remove(element); | 110 universe.generatedBailoutCode.remove(element); |
| 105 addToWorkList(element); | 111 addToWorkList(element); |
| 106 } | 112 } |
| 107 | 113 |
| 108 bool canBeRecompiled(Element element) { | 114 bool canBeRecompiled(Element element) { |
| 109 // Only member functions can be recompiled. An exception to this is members | 115 // Only member functions can be recompiled. An exception to this is members |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 void registerIsCheck(Element element) { | 335 void registerIsCheck(Element element) { |
| 330 universe.isChecks.add(element); | 336 universe.isChecks.add(element); |
| 331 } | 337 } |
| 332 | 338 |
| 333 void forEach(f(WorkItem work)) { | 339 void forEach(f(WorkItem work)) { |
| 334 while (!queue.isEmpty()) { | 340 while (!queue.isEmpty()) { |
| 335 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? | 341 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? |
| 336 } | 342 } |
| 337 } | 343 } |
| 338 } | 344 } |
| OLD | NEW |