| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Make sure that the closure understands a call with the given | 143 // Make sure that the closure understands a call with the given |
| 144 // selector. For a method-invocation of the form o.foo(a: 499), we | 144 // selector. For a method-invocation of the form o.foo(a: 499), we |
| 145 // need to make sure that closures can handle the optional argument if | 145 // need to make sure that closures can handle the optional argument if |
| 146 // there exists a field or getter 'foo'. | 146 // there exists a field or getter 'foo'. |
| 147 var names = universe.instantiatedClassInstanceFields; | 147 var names = universe.instantiatedClassInstanceFields; |
| 148 // TODO(ahe): Might be enough to use invokedGetters. | 148 // TODO(ahe): Might be enough to use invokedGetters. |
| 149 for (SourceString name in names) { | 149 for (SourceString name in names) { |
| 150 Set<Selector> invokedSelectors = universe.invokedNames[name]; | 150 Set<Selector> invokedSelectors = universe.invokedNames[name]; |
| 151 if (invokedSelectors != null) { | 151 if (invokedSelectors != null) { |
| 152 for (Selector selector in invokedSelectors) { | 152 for (Selector selector in invokedSelectors) { |
| 153 registerDynamicInvocation(Namer.CLOSURE_INVOCATION_NAME, selector); | 153 registerDynamicInvocation(compiler.namer.CLOSURE_INVOCATION_NAME, |
| 154 selector); |
| 154 } | 155 } |
| 155 } | 156 } |
| 156 } | 157 } |
| 157 }); | 158 }); |
| 158 } | 159 } |
| 159 | 160 |
| 160 void processInstantiatedClassMember(Element member) { | 161 void processInstantiatedClassMember(Element member) { |
| 161 if (universe.generatedCode.containsKey(member)) return; | 162 if (universe.generatedCode.containsKey(member)) return; |
| 162 if (resolvedElements[member] !== null) return; | 163 if (resolvedElements[member] !== null) return; |
| 163 | 164 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 void registerIsCheck(Element element) { | 325 void registerIsCheck(Element element) { |
| 325 universe.isChecks.add(element); | 326 universe.isChecks.add(element); |
| 326 } | 327 } |
| 327 | 328 |
| 328 void forEach(f(WorkItem work)) { | 329 void forEach(f(WorkItem work)) { |
| 329 while (!queue.isEmpty()) { | 330 while (!queue.isEmpty()) { |
| 330 f(queue.removeLast()); | 331 f(queue.removeLast()); |
| 331 } | 332 } |
| 332 } | 333 } |
| 333 } | 334 } |
| OLD | NEW |