| 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 '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../compiler.dart' show Compiler; | 10 import '../compiler.dart' show Compiler; |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 case StaticUseKind.SUPER_FIELD_SET: | 366 case StaticUseKind.SUPER_FIELD_SET: |
| 367 case StaticUseKind.FIELD_SET: | 367 case StaticUseKind.FIELD_SET: |
| 368 fieldSetters.add(element); | 368 fieldSetters.add(element); |
| 369 break; | 369 break; |
| 370 case StaticUseKind.SUPER_TEAR_OFF: | 370 case StaticUseKind.SUPER_TEAR_OFF: |
| 371 methodsNeedingSuperGetter.add(element); | 371 methodsNeedingSuperGetter.add(element); |
| 372 break; | 372 break; |
| 373 case StaticUseKind.GENERAL: | 373 case StaticUseKind.GENERAL: |
| 374 case StaticUseKind.STATIC_TEAR_OFF: | 374 case StaticUseKind.STATIC_TEAR_OFF: |
| 375 case StaticUseKind.FIELD_GET: | 375 case StaticUseKind.FIELD_GET: |
| 376 case StaticUseKind.CONSTRUCTOR_INVOKE: |
| 377 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: |
| 376 break; | 378 break; |
| 377 case StaticUseKind.CLOSURE: | 379 case StaticUseKind.CLOSURE: |
| 378 allClosures.add(element); | 380 allClosures.add(element); |
| 379 break; | 381 break; |
| 380 } | 382 } |
| 381 } | 383 } |
| 382 | 384 |
| 383 void forgetElement(Element element, Compiler compiler) { | 385 void forgetElement(Element element, Compiler compiler) { |
| 384 allClosures.remove(element); | 386 allClosures.remove(element); |
| 385 slowDirectlyNestedClosures(element).forEach(compiler.forgetElement); | 387 slowDirectlyNestedClosures(element).forEach(compiler.forgetElement); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 staticFunctionsNeedingGetter.add(element); | 642 staticFunctionsNeedingGetter.add(element); |
| 641 break; | 643 break; |
| 642 case StaticUseKind.SUPER_TEAR_OFF: | 644 case StaticUseKind.SUPER_TEAR_OFF: |
| 643 methodsNeedingSuperGetter.add(element); | 645 methodsNeedingSuperGetter.add(element); |
| 644 break; | 646 break; |
| 645 case StaticUseKind.SUPER_FIELD_SET: | 647 case StaticUseKind.SUPER_FIELD_SET: |
| 646 case StaticUseKind.FIELD_SET: | 648 case StaticUseKind.FIELD_SET: |
| 647 case StaticUseKind.GENERAL: | 649 case StaticUseKind.GENERAL: |
| 648 case StaticUseKind.CLOSURE: | 650 case StaticUseKind.CLOSURE: |
| 649 case StaticUseKind.FIELD_GET: | 651 case StaticUseKind.FIELD_GET: |
| 652 case StaticUseKind.CONSTRUCTOR_INVOKE: |
| 653 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: |
| 650 break; | 654 break; |
| 651 } | 655 } |
| 652 } | 656 } |
| 653 | 657 |
| 654 void forgetElement(Element element, Compiler compiler) { | 658 void forgetElement(Element element, Compiler compiler) { |
| 655 _directlyInstantiatedClasses.remove(element); | 659 _directlyInstantiatedClasses.remove(element); |
| 656 if (element is ClassElement) { | 660 if (element is ClassElement) { |
| 657 assert(invariant(element, element.thisType.isRaw, | 661 assert(invariant(element, element.thisType.isRaw, |
| 658 message: 'Generic classes not supported (${element.thisType}).')); | 662 message: 'Generic classes not supported (${element.thisType}).')); |
| 659 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); | 663 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); |
| 660 } | 664 } |
| 661 } | 665 } |
| 662 } | 666 } |
| OLD | NEW |