| 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 js_backend; | 5 part of js_backend; |
| 6 | 6 |
| 7 const VERBOSE_OPTIMIZER_HINTS = false; | 7 const VERBOSE_OPTIMIZER_HINTS = false; |
| 8 | 8 |
| 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); | 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); |
| (...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2731 } | 2731 } |
| 2732 break; | 2732 break; |
| 2733 case TypeUseKind.CATCH_TYPE: | 2733 case TypeUseKind.CATCH_TYPE: |
| 2734 onIsCheck(type, transformed); | 2734 onIsCheck(type, transformed); |
| 2735 break; | 2735 break; |
| 2736 case TypeUseKind.TYPE_LITERAL: | 2736 case TypeUseKind.TYPE_LITERAL: |
| 2737 backend.customElementsAnalysis.registerTypeLiteral(type); | 2737 backend.customElementsAnalysis.registerTypeLiteral(type); |
| 2738 if (type.isTypedef) { | 2738 if (type.isTypedef) { |
| 2739 backend.compiler.world.allTypedefs.add(type.element); | 2739 backend.compiler.world.allTypedefs.add(type.element); |
| 2740 } | 2740 } |
| 2741 if (type.isTypeVariable) { | 2741 if (type.isTypeVariable && type is! MethodTypeVariableType) { |
| 2742 // GENERIC_METHODS: The `is!` test above filters away method type |
| 2743 // variables, because they have the value `dynamic` with the |
| 2744 // incomplete support for generic methods offered with |
| 2745 // '--generic-method-syntax'. This must be revised in order to |
| 2746 // support generic methods fully. |
| 2742 ClassElement cls = type.element.enclosingClass; | 2747 ClassElement cls = type.element.enclosingClass; |
| 2743 backend.rti.registerClassUsingTypeVariableExpression(cls); | 2748 backend.rti.registerClassUsingTypeVariableExpression(cls); |
| 2744 registerBackendImpact(transformed, impacts.typeVariableExpression); | 2749 registerBackendImpact(transformed, impacts.typeVariableExpression); |
| 2745 } | 2750 } |
| 2746 hasTypeLiteral = true; | 2751 hasTypeLiteral = true; |
| 2747 break; | 2752 break; |
| 2748 } | 2753 } |
| 2749 } | 2754 } |
| 2750 | 2755 |
| 2751 if (hasAsCast) { | 2756 if (hasAsCast) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3055 | 3060 |
| 3056 @override | 3061 @override |
| 3057 void onImpactUsed(ImpactUseCase impactUse) { | 3062 void onImpactUsed(ImpactUseCase impactUse) { |
| 3058 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { | 3063 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { |
| 3059 // TODO(johnniwinther): Allow emptying when serialization has been | 3064 // TODO(johnniwinther): Allow emptying when serialization has been |
| 3060 // performed. | 3065 // performed. |
| 3061 resolution.emptyCache(); | 3066 resolution.emptyCache(); |
| 3062 } | 3067 } |
| 3063 } | 3068 } |
| 3064 } | 3069 } |
| OLD | NEW |