| 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 WorkItem { | 5 class WorkItem { |
| 6 final Element element; | 6 final Element element; |
| 7 TreeElements resolutionTree; | 7 TreeElements resolutionTree; |
| 8 Function run; | 8 Function run; |
| 9 Map<int, BailoutInfo> bailouts = null; | 9 Map<int, BailoutInfo> bailouts = null; |
| 10 bool allowSpeculativeOptimization = true; | 10 bool allowSpeculativeOptimization = true; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 if (element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { | 258 if (element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { |
| 259 registerInstantiatedClass(element.enclosingElement); | 259 registerInstantiatedClass(element.enclosingElement); |
| 260 } | 260 } |
| 261 worklist.add(new WorkItem.toCompile(element)); | 261 worklist.add(new WorkItem.toCompile(element)); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void registerStaticUse(Element element) { | 264 void registerStaticUse(Element element) { |
| 265 addToWorklist(element); | 265 addToWorklist(element); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void registerGetOfStaticFunction(FunctionElement element) { |
| 269 registerStaticUse(element); |
| 270 universe.staticFunctionsNeedingGetter.add(element); |
| 271 } |
| 272 |
| 268 void registerDynamicInvocation(SourceString methodName, Selector selector) { | 273 void registerDynamicInvocation(SourceString methodName, Selector selector) { |
| 269 assert(selector !== null); | 274 assert(selector !== null); |
| 270 Set<Invocation> existing = universe.invokedNames[methodName]; | 275 Set<Invocation> existing = universe.invokedNames[methodName]; |
| 271 if (existing == null) { | 276 if (existing == null) { |
| 272 universe.invokedNames[methodName] = new Set.from(<Selector>[selector]); | 277 universe.invokedNames[methodName] = new Set.from(<Selector>[selector]); |
| 273 } else { | 278 } else { |
| 274 existing.add(selector); | 279 existing.add(selector); |
| 275 } | 280 } |
| 276 } | 281 } |
| 277 | 282 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 345 |
| 341 class CompilerCancelledException implements Exception { | 346 class CompilerCancelledException implements Exception { |
| 342 final String reason; | 347 final String reason; |
| 343 CompilerCancelledException(this.reason); | 348 CompilerCancelledException(this.reason); |
| 344 | 349 |
| 345 String toString() { | 350 String toString() { |
| 346 String banner = 'compiler cancelled'; | 351 String banner = 'compiler cancelled'; |
| 347 return (reason !== null) ? '$banner: $reason' : '$banner'; | 352 return (reason !== null) ? '$banner: $reason' : '$banner'; |
| 348 } | 353 } |
| 349 } | 354 } |
| OLD | NEW |