| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 typedef ItemCompilationContext ItemCompilationContextCreator(); | 7 typedef ItemCompilationContext ItemCompilationContextCreator(); |
| 8 | 8 |
| 9 class EnqueueTask extends CompilerTask { | 9 class EnqueueTask extends CompilerTask { |
| 10 final ResolutionEnqueuer resolution; | 10 final ResolutionEnqueuer resolution; |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 universe.closurizedMembers.add(element); | 600 universe.closurizedMembers.add(element); |
| 601 } | 601 } |
| 602 | 602 |
| 603 void registerIfGeneric(Element element, Registry registry) { | 603 void registerIfGeneric(Element element, Registry registry) { |
| 604 if (element.computeType(compiler).containsTypeVariables) { | 604 if (element.computeType(compiler).containsTypeVariables) { |
| 605 compiler.backend.registerGenericClosure(element, this, registry); | 605 compiler.backend.registerGenericClosure(element, this, registry); |
| 606 universe.genericClosures.add(element); | 606 universe.genericClosures.add(element); |
| 607 } | 607 } |
| 608 } | 608 } |
| 609 | 609 |
| 610 void registerClosure(FunctionElement element, Registry registry) { | 610 void registerClosure(LocalFunctionElement element, Registry registry) { |
| 611 universe.allClosures.add(element); | 611 universe.allClosures.add(element); |
| 612 registerIfGeneric(element, registry); | 612 registerIfGeneric(element, registry); |
| 613 } | 613 } |
| 614 | 614 |
| 615 void forEach(void f(WorkItem work)) { | 615 void forEach(void f(WorkItem work)) { |
| 616 do { | 616 do { |
| 617 while (queue.isNotEmpty) { | 617 while (queue.isNotEmpty) { |
| 618 // TODO(johnniwinther): Find an optimal process order. | 618 // TODO(johnniwinther): Find an optimal process order. |
| 619 filter.processWorkItem(f, queue.removeLast()); | 619 filter.processWorkItem(f, queue.removeLast()); |
| 620 } | 620 } |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 } | 885 } |
| 886 } | 886 } |
| 887 }); | 887 }); |
| 888 return true; | 888 return true; |
| 889 } | 889 } |
| 890 | 890 |
| 891 void processWorkItem(void f(WorkItem work), WorkItem work) { | 891 void processWorkItem(void f(WorkItem work), WorkItem work) { |
| 892 f(work); | 892 f(work); |
| 893 } | 893 } |
| 894 } | 894 } |
| OLD | NEW |