| 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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 | 881 |
| 882 void forgetElement(Element element) { | 882 void forgetElement(Element element) { |
| 883 super.forgetElement(element); | 883 super.forgetElement(element); |
| 884 processedElements.remove(element); | 884 processedElements.remove(element); |
| 885 } | 885 } |
| 886 } | 886 } |
| 887 | 887 |
| 888 /// [Enqueuer] which is specific to code generation. | 888 /// [Enqueuer] which is specific to code generation. |
| 889 class CodegenEnqueuer extends Enqueuer { | 889 class CodegenEnqueuer extends Enqueuer { |
| 890 final Queue<CodegenWorkItem> queue; | 890 final Queue<CodegenWorkItem> queue; |
| 891 final Map<Element, js.Expression> generatedCode = | 891 final Map<Element, js.Expression> generatedCode = <Element, js.Expression>{}; |
| 892 new Map<Element, js.Expression>(); | |
| 893 | 892 |
| 894 final Set<Element> newlyEnqueuedElements; | 893 final Set<Element> newlyEnqueuedElements; |
| 895 | 894 |
| 896 final Set<DynamicUse> newlySeenSelectors; | 895 final Set<DynamicUse> newlySeenSelectors; |
| 897 | 896 |
| 898 bool enabledNoSuchMethod = false; | 897 bool enabledNoSuchMethod = false; |
| 899 | 898 |
| 900 CodegenEnqueuer(Compiler compiler, | 899 CodegenEnqueuer(Compiler compiler, |
| 901 ItemCompilationContext itemCompilationContextCreator(), | 900 ItemCompilationContext itemCompilationContextCreator(), |
| 902 EnqueuerStrategy strategy) | 901 EnqueuerStrategy strategy) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 @override | 1032 @override |
| 1034 void processStaticUse(Enqueuer enqueuer, StaticUse staticUse) { | 1033 void processStaticUse(Enqueuer enqueuer, StaticUse staticUse) { |
| 1035 enqueuer.registerStaticUseInternal(staticUse); | 1034 enqueuer.registerStaticUseInternal(staticUse); |
| 1036 } | 1035 } |
| 1037 | 1036 |
| 1038 @override | 1037 @override |
| 1039 void processDynamicUse(Enqueuer enqueuer, DynamicUse dynamicUse) { | 1038 void processDynamicUse(Enqueuer enqueuer, DynamicUse dynamicUse) { |
| 1040 enqueuer.handleUnseenSelectorInternal(dynamicUse); | 1039 enqueuer.handleUnseenSelectorInternal(dynamicUse); |
| 1041 } | 1040 } |
| 1042 } | 1041 } |
| OLD | NEW |