| 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 | 10 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 registerInstantiatedClass(element.enclosingElement); | 258 registerInstantiatedClass(element.enclosingElement); |
| 259 } | 259 } |
| 260 worklist.add(new WorkItem.toCompile(element)); | 260 worklist.add(new WorkItem.toCompile(element)); |
| 261 } | 261 } |
| 262 | 262 |
| 263 void registerStaticUse(Element element) { | 263 void registerStaticUse(Element element) { |
| 264 addToWorklist(element); | 264 addToWorklist(element); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void registerDynamicInvocation(SourceString methodName, Selector selector) { | 267 void registerDynamicInvocation(SourceString methodName, Selector selector) { |
| 268 assert(selector !== null); |
| 268 Set<Invocation> existing = universe.invokedNames[methodName]; | 269 Set<Invocation> existing = universe.invokedNames[methodName]; |
| 269 if (existing == null) { | 270 if (existing == null) { |
| 270 universe.invokedNames[methodName] = new Set.from(<Selector>[selector]); | 271 universe.invokedNames[methodName] = new Set.from(<Selector>[selector]); |
| 271 } else { | 272 } else { |
| 272 existing.add(selector); | 273 existing.add(selector); |
| 273 } | 274 } |
| 274 } | 275 } |
| 275 | 276 |
| 276 void registerDynamicGetter(SourceString methodName) { | 277 void registerDynamicGetter(SourceString methodName) { |
| 277 universe.invokedGetters.add(methodName); | 278 universe.invokedGetters.add(methodName); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 339 |
| 339 class CompilerCancelledException implements Exception { | 340 class CompilerCancelledException implements Exception { |
| 340 final String reason; | 341 final String reason; |
| 341 CompilerCancelledException(this.reason); | 342 CompilerCancelledException(this.reason); |
| 342 | 343 |
| 343 String toString() { | 344 String toString() { |
| 344 String banner = 'compiler cancelled'; | 345 String banner = 'compiler cancelled'; |
| 345 return (reason !== null) ? '$banner: $reason' : '$banner'; | 346 return (reason !== null) ? '$banner: $reason' : '$banner'; |
| 346 } | 347 } |
| 347 } | 348 } |
| OLD | NEW |