| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool internalAddToWorkList(Element element); | 85 bool internalAddToWorkList(Element element); |
| 86 | 86 |
| 87 void registerInstantiatedType(InterfaceType type, Registry registry, | 87 void registerInstantiatedType(InterfaceType type, Registry registry, |
| 88 {bool mirrorUsage: false}) { | 88 {bool mirrorUsage: false}) { |
| 89 task.measure(() { | 89 task.measure(() { |
| 90 ClassElement cls = type.element; | 90 ClassElement cls = type.element; |
| 91 registry.registerDependency(cls); | 91 registry.registerDependency(cls); |
| 92 cls.ensureResolved(compiler); | 92 cls.ensureResolved(compiler); |
| 93 universe.registerTypeInstantiation(type, byMirrors: mirrorUsage); | 93 universe.registerTypeInstantiation(type, byMirrors: mirrorUsage); |
| 94 processInstantiatedClass(cls); | 94 processInstantiatedClass(cls); |
| 95 compiler.backend.registerInstantiatedType(type, registry); |
| 95 }); | 96 }); |
| 96 } | 97 } |
| 97 | 98 |
| 98 void registerInstantiatedClass(ClassElement cls, Registry registry, | 99 void registerInstantiatedClass(ClassElement cls, Registry registry, |
| 99 {bool mirrorUsage: false}) { | 100 {bool mirrorUsage: false}) { |
| 100 cls.ensureResolved(compiler); | 101 cls.ensureResolved(compiler); |
| 101 registerInstantiatedType(cls.rawType, registry, mirrorUsage: mirrorUsage); | 102 registerInstantiatedType(cls.rawType, registry, mirrorUsage: mirrorUsage); |
| 102 } | 103 } |
| 103 | 104 |
| 104 bool checkNoEnqueuedInvokedInstanceMethods() { | 105 bool checkNoEnqueuedInvokedInstanceMethods() { |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 void processWorkItem(void f(WorkItem work), WorkItem work) { | 897 void processWorkItem(void f(WorkItem work), WorkItem work) { |
| 897 f(work); | 898 f(work); |
| 898 } | 899 } |
| 899 } | 900 } |
| 900 | 901 |
| 901 void removeFromSet(Map<String, Set<Element>> map, Element element) { | 902 void removeFromSet(Map<String, Set<Element>> map, Element element) { |
| 902 Set<Element> set = map[element.name]; | 903 Set<Element> set = map[element.name]; |
| 903 if (set == null) return; | 904 if (set == null) return; |
| 904 set.remove(element); | 905 set.remove(element); |
| 905 } | 906 } |
| OLD | NEW |