| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 currentClass !== null; | 124 currentClass !== null; |
| 125 currentClass = currentClass.superclass) { | 125 currentClass = currentClass.superclass) { |
| 126 processInstantiatedClass(currentClass); | 126 processInstantiatedClass(currentClass); |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 }); | 129 }); |
| 130 return true; | 130 return true; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void processInstantiatedClass(ClassElement cls) { | 133 void processInstantiatedClass(ClassElement cls) { |
| 134 cls.members.forEach(processInstantiatedClassMember); | 134 cls.localMembers.forEach(processInstantiatedClassMember); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void registerFieldClosureInvocations() { | 137 void registerFieldClosureInvocations() { |
| 138 task.measure(() { | 138 task.measure(() { |
| 139 // Make sure that the closure understands a call with the given | 139 // Make sure that the closure understands a call with the given |
| 140 // selector. For a method-invocation of the form o.foo(a: 499), we | 140 // selector. For a method-invocation of the form o.foo(a: 499), we |
| 141 // need to make sure that closures can handle the optional argument if | 141 // need to make sure that closures can handle the optional argument if |
| 142 // there exists a field or getter 'foo'. | 142 // there exists a field or getter 'foo'. |
| 143 var names = universe.instantiatedClassInstanceFields; | 143 var names = universe.instantiatedClassInstanceFields; |
| 144 // TODO(ahe): Might be enough to use invokedGetters. | 144 // TODO(ahe): Might be enough to use invokedGetters. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 void onRegisterInstantiatedClass(ClassElement cls) { | 206 void onRegisterInstantiatedClass(ClassElement cls) { |
| 207 task.measure(() { | 207 task.measure(() { |
| 208 while (cls !== null) { | 208 while (cls !== null) { |
| 209 if (seenClasses.contains(cls)) return; | 209 if (seenClasses.contains(cls)) return; |
| 210 seenClasses.add(cls); | 210 seenClasses.add(cls); |
| 211 // TODO(ahe): Don't call resolveType, instead, call this method | 211 // TODO(ahe): Don't call resolveType, instead, call this method |
| 212 // when resolveType is called. | 212 // when resolveType is called. |
| 213 compiler.resolveClass(cls); | 213 compiler.resolveClass(cls); |
| 214 cls.members.forEach(processInstantiatedClassMember); | 214 cls.localMembers.forEach(processInstantiatedClassMember); |
| 215 cls = cls.superclass; | 215 cls = cls.superclass; |
| 216 } | 216 } |
| 217 }); | 217 }); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void registerNewSelector(SourceString name, | 220 void registerNewSelector(SourceString name, |
| 221 Selector selector, | 221 Selector selector, |
| 222 Map<SourceString, Set<Selector>> selectorsMap) { | 222 Map<SourceString, Set<Selector>> selectorsMap) { |
| 223 Set<Selector> selectors = | 223 Set<Selector> selectors = |
| 224 selectorsMap.putIfAbsent(name, () => new Set<Selector>()); | 224 selectorsMap.putIfAbsent(name, () => new Set<Selector>()); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 void registerIsCheck(Element element) { | 314 void registerIsCheck(Element element) { |
| 315 universe.isChecks.add(element); | 315 universe.isChecks.add(element); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void forEach(f(WorkItem work)) { | 318 void forEach(f(WorkItem work)) { |
| 319 while (!queue.isEmpty()) { | 319 while (!queue.isEmpty()) { |
| 320 f(queue.removeLast()); | 320 f(queue.removeLast()); |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 } | 323 } |
| OLD | NEW |