| 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 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3069 return transformed; | 3069 return transformed; |
| 3070 } | 3070 } |
| 3071 } | 3071 } |
| 3072 | 3072 |
| 3073 /// Records that [constant] is used by the element behind [registry]. | 3073 /// Records that [constant] is used by the element behind [registry]. |
| 3074 class Dependency { | 3074 class Dependency { |
| 3075 final ConstantValue constant; | 3075 final ConstantValue constant; |
| 3076 final Element annotatedElement; | 3076 final Element annotatedElement; |
| 3077 | 3077 |
| 3078 const Dependency(this.constant, this.annotatedElement); | 3078 const Dependency(this.constant, this.annotatedElement); |
| 3079 |
| 3080 String toString() => '$annotatedElement:${constant.toStructuredText()}'; |
| 3079 } | 3081 } |
| 3080 | 3082 |
| 3081 class JavaScriptImpactStrategy extends ImpactStrategy { | 3083 class JavaScriptImpactStrategy extends ImpactStrategy { |
| 3082 final Resolution resolution; | 3084 final Resolution resolution; |
| 3083 final DumpInfoTask dumpInfoTask; | 3085 final DumpInfoTask dumpInfoTask; |
| 3084 final bool supportDeferredLoad; | 3086 final bool supportDeferredLoad; |
| 3085 final bool supportDumpInfo; | 3087 final bool supportDumpInfo; |
| 3086 final bool supportSerialization; | 3088 final bool supportSerialization; |
| 3087 | 3089 |
| 3088 JavaScriptImpactStrategy(this.resolution, this.dumpInfoTask, | 3090 JavaScriptImpactStrategy(this.resolution, this.dumpInfoTask, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3114 | 3116 |
| 3115 @override | 3117 @override |
| 3116 void onImpactUsed(ImpactUseCase impactUse) { | 3118 void onImpactUsed(ImpactUseCase impactUse) { |
| 3117 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { | 3119 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { |
| 3118 // TODO(johnniwinther): Allow emptying when serialization has been | 3120 // TODO(johnniwinther): Allow emptying when serialization has been |
| 3119 // performed. | 3121 // performed. |
| 3120 resolution.emptyCache(); | 3122 resolution.emptyCache(); |
| 3121 } | 3123 } |
| 3122 } | 3124 } |
| 3123 } | 3125 } |
| OLD | NEW |