| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 typedef ItemCompilationContext ItemCompilationContextCreator(); | 7 typedef ItemCompilationContext ItemCompilationContextCreator(); |
| 8 | 8 |
| 9 class EnqueueTask extends CompilerTask { | 9 class EnqueueTask extends CompilerTask { |
| 10 final ResolutionEnqueuer resolution; | 10 final ResolutionEnqueuer resolution; |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 } | 509 } |
| 510 | 510 |
| 511 /** | 511 /** |
| 512 * Documentation wanted -- johnniwinther | 512 * Documentation wanted -- johnniwinther |
| 513 * | 513 * |
| 514 * Invariant: [element] must be a declaration element. | 514 * Invariant: [element] must be a declaration element. |
| 515 */ | 515 */ |
| 516 void registerStaticUse(Element element) { | 516 void registerStaticUse(Element element) { |
| 517 if (element == null) return; | 517 if (element == null) return; |
| 518 assert(invariant(element, element.isDeclaration)); | 518 assert(invariant(element, element.isDeclaration)); |
| 519 if (Elements.isStaticOrTopLevel(element) && element.isField) { |
| 520 universe.registerStaticFieldUse(element); |
| 521 } |
| 519 addToWorkList(element); | 522 addToWorkList(element); |
| 520 compiler.backend.registerStaticUse(element, this); | 523 compiler.backend.registerStaticUse(element, this); |
| 521 } | 524 } |
| 522 | 525 |
| 523 void registerGetOfStaticFunction(FunctionElement element) { | 526 void registerGetOfStaticFunction(FunctionElement element) { |
| 524 registerStaticUse(element); | 527 registerStaticUse(element); |
| 525 compiler.backend.registerGetOfStaticFunction(this); | 528 compiler.backend.registerGetOfStaticFunction(this); |
| 526 universe.staticFunctionsNeedingGetter.add(element); | 529 universe.staticFunctionsNeedingGetter.add(element); |
| 527 } | 530 } |
| 528 | 531 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 void processWorkItem(void f(WorkItem work), WorkItem work) { | 912 void processWorkItem(void f(WorkItem work), WorkItem work) { |
| 910 f(work); | 913 f(work); |
| 911 } | 914 } |
| 912 } | 915 } |
| 913 | 916 |
| 914 void removeFromSet(Map<String, Set<Element>> map, Element element) { | 917 void removeFromSet(Map<String, Set<Element>> map, Element element) { |
| 915 Set<Element> set = map[element.name]; | 918 Set<Element> set = map[element.name]; |
| 916 if (set == null) return; | 919 if (set == null) return; |
| 917 set.remove(element); | 920 set.remove(element); |
| 918 } | 921 } |
| OLD | NEW |