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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 123 } |
124 onRegisterInstantiatedClass(cls); | 124 onRegisterInstantiatedClass(cls); |
125 }); | 125 }); |
126 } | 126 } |
127 | 127 |
128 void registerInstantiatedClass(ClassElement cls, Registry registry) { | 128 void registerInstantiatedClass(ClassElement cls, Registry registry) { |
129 cls.ensureResolved(compiler); | 129 cls.ensureResolved(compiler); |
130 registerInstantiatedType(cls.rawType, registry); | 130 registerInstantiatedType(cls.rawType, registry); |
131 } | 131 } |
132 | 132 |
133 void registerTypeLiteral(Element element, Registry registry) { | 133 void registerTypeLiteral(DartType type, Registry registry) { |
134 registerInstantiatedClass(compiler.typeClass, registry); | 134 registerInstantiatedClass(compiler.typeClass, registry); |
135 compiler.backend.registerTypeLiteral(element, this, registry); | 135 compiler.backend.registerTypeLiteral(type, this, registry); |
136 } | 136 } |
137 | 137 |
138 bool checkNoEnqueuedInvokedInstanceMethods() { | 138 bool checkNoEnqueuedInvokedInstanceMethods() { |
139 task.measure(() { | 139 task.measure(() { |
140 // Run through the classes and see if we need to compile methods. | 140 // Run through the classes and see if we need to compile methods. |
141 for (ClassElement classElement in universe.instantiatedClasses) { | 141 for (ClassElement classElement in universe.instantiatedClasses) { |
142 for (ClassElement currentClass = classElement; | 142 for (ClassElement currentClass = classElement; |
143 currentClass != null; | 143 currentClass != null; |
144 currentClass = currentClass.superclass) { | 144 currentClass = currentClass.superclass) { |
145 processInstantiatedClass(currentClass); | 145 processInstantiatedClass(currentClass); |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 } | 766 } |
767 CodegenWorkItem workItem = new CodegenWorkItem( | 767 CodegenWorkItem workItem = new CodegenWorkItem( |
768 element, itemCompilationContextCreator()); | 768 element, itemCompilationContextCreator()); |
769 queue.add(workItem); | 769 queue.add(workItem); |
770 } | 770 } |
771 | 771 |
772 void _logSpecificSummary(log(message)) { | 772 void _logSpecificSummary(log(message)) { |
773 log('Compiled ${generatedCode.length} methods.'); | 773 log('Compiled ${generatedCode.length} methods.'); |
774 } | 774 } |
775 } | 775 } |
OLD | NEW |