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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 if (!isResolutionQueue && | 81 if (!isResolutionQueue && |
| 82 element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { | 82 element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { |
| 83 registerInstantiatedClass(element.enclosingElement); | 83 registerInstantiatedClass(element.enclosingElement); |
| 84 } | 84 } |
| 85 if (elements === null) { | 85 if (elements === null) { |
| 86 elements = getCachedElements(element); | 86 elements = getCachedElements(element); |
| 87 } | 87 } |
| 88 queue.add(new WorkItem(element, elements)); | 88 queue.add(new WorkItem(element, elements)); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void eagerRecompile(Element element) { | |
|
ahe
2012/08/07 11:23:26
How is this "eager"?
Søren Gjesse
2012/08/08 10:36:02
It is eager in the sense that it is recompiled thr
ahe
2012/08/08 13:00:27
I find this name confusing. But I don't have a bet
| |
| 92 universe.generatedCode[element] = null; | |
| 93 universe.generatedBailoutCode[element] = null; | |
| 94 addToWorkList(element); | |
| 95 } | |
| 96 | |
| 91 bool canBeRecompiled(Element element) { | 97 bool canBeRecompiled(Element element) { |
| 92 // Only member functions can be recompiled. An exception to this is members | 98 // Only member functions can be recompiled. An exception to this is members |
| 93 // of closures. They are processed as part of the enclosing function and not | 99 // of closures. They are processed as part of the enclosing function and not |
| 94 // present as a separate element (the call to the closure will be a member | 100 // present as a separate element (the call to the closure will be a member |
| 95 // function). | 101 // function). |
| 96 return element.isMember() && !element.getEnclosingClass().isClosure(); | 102 return element.isMember() && !element.getEnclosingClass().isClosure(); |
| 97 } | 103 } |
| 98 | 104 |
| 99 void registerRecompilationCandidate(Element element, | 105 void registerRecompilationCandidate(Element element, |
| 100 [TreeElements elements]) { | 106 [TreeElements elements]) { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 314 void registerIsCheck(Element element) { | 320 void registerIsCheck(Element element) { |
| 315 universe.isChecks.add(element); | 321 universe.isChecks.add(element); |
| 316 } | 322 } |
| 317 | 323 |
| 318 void forEach(f(WorkItem work)) { | 324 void forEach(f(WorkItem work)) { |
| 319 while (!queue.isEmpty()) { | 325 while (!queue.isEmpty()) { |
| 320 f(queue.removeLast()); | 326 f(queue.removeLast()); |
| 321 } | 327 } |
| 322 } | 328 } |
| 323 } | 329 } |
| OLD | NEW |