| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 return addToWorkList(member); | 207 return addToWorkList(member); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 void onRegisterInstantiatedClass(ClassElement cls) { | 212 void onRegisterInstantiatedClass(ClassElement cls) { |
| 213 task.measure(() { | 213 task.measure(() { |
| 214 while (cls !== null) { | 214 while (cls !== null) { |
| 215 if (seenClasses.contains(cls)) return; | 215 if (seenClasses.contains(cls)) return; |
| 216 seenClasses.add(cls); | 216 seenClasses.add(cls); |
| 217 // TODO(ahe): Don't call resolveType, instead, call this method | 217 cls.ensureResolved(compiler); |
| 218 // when resolveType is called. | |
| 219 compiler.resolveClass(cls); | |
| 220 cls.members.forEach(processInstantiatedClassMember); | 218 cls.members.forEach(processInstantiatedClassMember); |
| 221 cls = cls.superclass; | 219 cls = cls.superclass; |
| 222 } | 220 } |
| 223 }); | 221 }); |
| 224 } | 222 } |
| 225 | 223 |
| 226 void registerNewSelector(SourceString name, | 224 void registerNewSelector(SourceString name, |
| 227 Selector selector, | 225 Selector selector, |
| 228 Map<SourceString, Set<Selector>> selectorsMap) { | 226 Map<SourceString, Set<Selector>> selectorsMap) { |
| 229 Set<Selector> selectors = | 227 Set<Selector> selectors = |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 void forEach(f(WorkItem work)) { | 322 void forEach(f(WorkItem work)) { |
| 325 while (!queue.isEmpty()) { | 323 while (!queue.isEmpty()) { |
| 326 do { | 324 do { |
| 327 f(queue.removeLast()); | 325 f(queue.removeLast()); |
| 328 } while (!queue.isEmpty()); | 326 } while (!queue.isEmpty()); |
| 329 // TODO(ahe): we shouldn't register the field closure invocations here. | 327 // TODO(ahe): we shouldn't register the field closure invocations here. |
| 330 registerFieldClosureInvocations(); | 328 registerFieldClosureInvocations(); |
| 331 } | 329 } |
| 332 } | 330 } |
| 333 } | 331 } |
| OLD | NEW |