| 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 universe; | 5 library universe; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import '../cache_strategy.dart'; | 9 import '../cache_strategy.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 } | 629 } |
| 630 switch (staticUse.kind) { | 630 switch (staticUse.kind) { |
| 631 case StaticUseKind.SUPER_FIELD_SET: | 631 case StaticUseKind.SUPER_FIELD_SET: |
| 632 case StaticUseKind.FIELD_SET: | 632 case StaticUseKind.FIELD_SET: |
| 633 fieldSetters.add(element); | 633 fieldSetters.add(element); |
| 634 break; | 634 break; |
| 635 case StaticUseKind.SUPER_TEAR_OFF: | 635 case StaticUseKind.SUPER_TEAR_OFF: |
| 636 methodsNeedingSuperGetter.add(element); | 636 methodsNeedingSuperGetter.add(element); |
| 637 break; | 637 break; |
| 638 case StaticUseKind.GENERAL: | 638 case StaticUseKind.GENERAL: |
| 639 case StaticUseKind.DIRECT_USE: |
| 639 case StaticUseKind.STATIC_TEAR_OFF: | 640 case StaticUseKind.STATIC_TEAR_OFF: |
| 640 case StaticUseKind.FIELD_GET: | 641 case StaticUseKind.FIELD_GET: |
| 641 case StaticUseKind.CONSTRUCTOR_INVOKE: | 642 case StaticUseKind.CONSTRUCTOR_INVOKE: |
| 642 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: | 643 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: |
| 643 case StaticUseKind.REDIRECTION: | 644 case StaticUseKind.REDIRECTION: |
| 644 break; | 645 break; |
| 645 case StaticUseKind.CLOSURE: | 646 case StaticUseKind.CLOSURE: |
| 646 allClosures.add(element); | 647 allClosures.add(element); |
| 647 break; | 648 break; |
| 648 case StaticUseKind.DIRECT_INVOKE: | 649 case StaticUseKind.DIRECT_INVOKE: |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 switch (staticUse.kind) { | 905 switch (staticUse.kind) { |
| 905 case StaticUseKind.STATIC_TEAR_OFF: | 906 case StaticUseKind.STATIC_TEAR_OFF: |
| 906 staticFunctionsNeedingGetter.add(element); | 907 staticFunctionsNeedingGetter.add(element); |
| 907 break; | 908 break; |
| 908 case StaticUseKind.SUPER_TEAR_OFF: | 909 case StaticUseKind.SUPER_TEAR_OFF: |
| 909 methodsNeedingSuperGetter.add(element); | 910 methodsNeedingSuperGetter.add(element); |
| 910 break; | 911 break; |
| 911 case StaticUseKind.SUPER_FIELD_SET: | 912 case StaticUseKind.SUPER_FIELD_SET: |
| 912 case StaticUseKind.FIELD_SET: | 913 case StaticUseKind.FIELD_SET: |
| 913 case StaticUseKind.GENERAL: | 914 case StaticUseKind.GENERAL: |
| 915 case StaticUseKind.DIRECT_USE: |
| 914 case StaticUseKind.CLOSURE: | 916 case StaticUseKind.CLOSURE: |
| 915 case StaticUseKind.FIELD_GET: | 917 case StaticUseKind.FIELD_GET: |
| 916 case StaticUseKind.CONSTRUCTOR_INVOKE: | 918 case StaticUseKind.CONSTRUCTOR_INVOKE: |
| 917 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: | 919 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: |
| 918 case StaticUseKind.REDIRECTION: | 920 case StaticUseKind.REDIRECTION: |
| 919 case StaticUseKind.DIRECT_INVOKE: | 921 case StaticUseKind.DIRECT_INVOKE: |
| 920 break; | 922 break; |
| 921 } | 923 } |
| 922 } | 924 } |
| 923 | 925 |
| 924 void forgetElement(Element element, Compiler compiler) { | 926 void forgetElement(Element element, Compiler compiler) { |
| 925 _directlyInstantiatedClasses.remove(element); | 927 _directlyInstantiatedClasses.remove(element); |
| 926 if (element is ClassElement) { | 928 if (element is ClassElement) { |
| 927 assert(invariant(element, element.thisType.isRaw, | 929 assert(invariant(element, element.thisType.isRaw, |
| 928 message: 'Generic classes not supported (${element.thisType}).')); | 930 message: 'Generic classes not supported (${element.thisType}).')); |
| 929 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); | 931 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); |
| 930 } | 932 } |
| 931 } | 933 } |
| 932 } | 934 } |
| OLD | NEW |