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 class EnqueueTask extends CompilerTask { | 7 class EnqueueTask extends CompilerTask { |
8 final ResolutionEnqueuer resolution; | 8 final ResolutionEnqueuer resolution; |
9 final CodegenEnqueuer codegen; | 9 final CodegenEnqueuer codegen; |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 }); | 124 }); |
125 } | 125 } |
126 | 126 |
127 void registerInstantiatedClass(ClassElement cls, TreeElements elements) { | 127 void registerInstantiatedClass(ClassElement cls, TreeElements elements) { |
128 cls.ensureResolved(compiler); | 128 cls.ensureResolved(compiler); |
129 registerInstantiatedType(cls.rawType, elements); | 129 registerInstantiatedType(cls.rawType, elements); |
130 } | 130 } |
131 | 131 |
132 void registerTypeLiteral(Element element, TreeElements elements) { | 132 void registerTypeLiteral(Element element, TreeElements elements) { |
133 registerInstantiatedClass(compiler.typeClass, elements); | 133 registerInstantiatedClass(compiler.typeClass, elements); |
134 compiler.backend.registerTypeLiteral(element, elements); | 134 compiler.backend.registerTypeLiteral(element, this, elements); |
135 } | 135 } |
136 | 136 |
137 bool checkNoEnqueuedInvokedInstanceMethods() { | 137 bool checkNoEnqueuedInvokedInstanceMethods() { |
138 task.measure(() { | 138 task.measure(() { |
139 // Run through the classes and see if we need to compile methods. | 139 // Run through the classes and see if we need to compile methods. |
140 for (ClassElement classElement in universe.instantiatedClasses) { | 140 for (ClassElement classElement in universe.instantiatedClasses) { |
141 for (ClassElement currentClass = classElement; | 141 for (ClassElement currentClass = classElement; |
142 currentClass != null; | 142 currentClass != null; |
143 currentClass = currentClass.superclass) { | 143 currentClass = currentClass.superclass) { |
144 processInstantiatedClass(currentClass); | 144 processInstantiatedClass(currentClass); |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 while(!queue.isEmpty) { | 725 while(!queue.isEmpty) { |
726 // TODO(johnniwinther): Find an optimal process order for codegen. | 726 // TODO(johnniwinther): Find an optimal process order for codegen. |
727 f(queue.removeLast()); | 727 f(queue.removeLast()); |
728 } | 728 } |
729 } | 729 } |
730 | 730 |
731 void _logSpecificSummary(log(message)) { | 731 void _logSpecificSummary(log(message)) { |
732 log('Compiled ${generatedCode.length} methods.'); | 732 log('Compiled ${generatedCode.length} methods.'); |
733 } | 733 } |
734 } | 734 } |
OLD | NEW |