Chromium Code Reviews| 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 library dart2js.enqueue; | 5 library dart2js.enqueue; |
| 6 | 6 |
| 7 import 'dart:collection' show | 7 import 'dart:collection' show |
| 8 Queue; | 8 Queue; |
| 9 | 9 |
| 10 import 'common.dart'; | 10 import 'common.dart'; |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 } | 718 } |
| 719 | 719 |
| 720 /// Log summary specific to the concrete enqueuer. | 720 /// Log summary specific to the concrete enqueuer. |
| 721 void _logSpecificSummary(log(message)); | 721 void _logSpecificSummary(log(message)); |
| 722 | 722 |
| 723 String toString() => 'Enqueuer($name)'; | 723 String toString() => 'Enqueuer($name)'; |
| 724 | 724 |
| 725 void forgetElement(Element element) { | 725 void forgetElement(Element element) { |
| 726 universe.forgetElement(element, compiler); | 726 universe.forgetElement(element, compiler); |
| 727 _processedClasses.remove(element); | 727 _processedClasses.remove(element); |
| 728 instanceMembersByName[element.name]?.remove(element); | |
| 729 instanceFunctionsByName[element.name]?.remove(element); | |
| 728 } | 730 } |
| 729 } | 731 } |
| 730 | 732 |
| 731 /// [Enqueuer] which is specific to resolution. | 733 /// [Enqueuer] which is specific to resolution. |
| 732 class ResolutionEnqueuer extends Enqueuer { | 734 class ResolutionEnqueuer extends Enqueuer { |
| 733 /// All declaration elements that have been processed by the resolver. | 735 /// All declaration elements that have been processed by the resolver. |
| 734 final Set<AstElement> processedElements; | 736 final Set<AstElement> processedElements; |
| 735 | 737 |
| 736 final Queue<ResolutionWorkItem> queue; | 738 final Queue<ResolutionWorkItem> queue; |
| 737 | 739 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 993 } | 995 } |
| 994 }); | 996 }); |
| 995 return true; | 997 return true; |
| 996 } | 998 } |
| 997 | 999 |
| 998 void processWorkItem(void f(WorkItem work), WorkItem work) { | 1000 void processWorkItem(void f(WorkItem work), WorkItem work) { |
| 999 f(work); | 1001 f(work); |
| 1000 } | 1002 } |
| 1001 } | 1003 } |
| 1002 | 1004 |
| 1003 void removeFromSet(Map<String, Set<Element>> map, Element element) { | 1005 void removeFromSet(Map<String, Set<Element>> map, Element element) { |
|
ahe
2016/01/18 06:33:05
It's possible to remove this method now that we ha
| |
| 1004 Set<Element> set = map[element.name]; | 1006 Set<Element> set = map[element.name]; |
| 1005 if (set == null) return; | 1007 if (set == null) return; |
| 1006 set.remove(element); | 1008 set.remove(element); |
| 1007 } | 1009 } |
| 1008 | 1010 |
| 1009 /// Strategy used by the enqueuer to populate the world. | 1011 /// Strategy used by the enqueuer to populate the world. |
| 1010 // TODO(johnniwinther): Merge this interface with [QueueFilter]. | 1012 // TODO(johnniwinther): Merge this interface with [QueueFilter]. |
| 1011 class EnqueuerStrategy { | 1013 class EnqueuerStrategy { |
| 1012 const EnqueuerStrategy(); | 1014 const EnqueuerStrategy(); |
| 1013 | 1015 |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 1032 @override | 1034 @override |
| 1033 void processStaticUse(Enqueuer enqueuer, StaticUse staticUse) { | 1035 void processStaticUse(Enqueuer enqueuer, StaticUse staticUse) { |
| 1034 enqueuer.registerStaticUseInternal(staticUse); | 1036 enqueuer.registerStaticUseInternal(staticUse); |
| 1035 } | 1037 } |
| 1036 | 1038 |
| 1037 @override | 1039 @override |
| 1038 void processDynamicUse(Enqueuer enqueuer, DynamicUse dynamicUse) { | 1040 void processDynamicUse(Enqueuer enqueuer, DynamicUse dynamicUse) { |
| 1039 enqueuer.handleUnseenSelectorInternal(dynamicUse); | 1041 enqueuer.handleUnseenSelectorInternal(dynamicUse); |
| 1040 } | 1042 } |
| 1041 } | 1043 } |
| OLD | NEW |