| 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 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2941 backend.registerConstSymbol(constSymbolName); | 2941 backend.registerConstSymbol(constSymbolName); |
| 2942 } | 2942 } |
| 2943 | 2943 |
| 2944 for (LocalFunctionElement closure in worldImpact.closures) { | 2944 for (LocalFunctionElement closure in worldImpact.closures) { |
| 2945 if (closure.computeType(backend.resolution).containsTypeVariables) { | 2945 if (closure.computeType(backend.resolution).containsTypeVariables) { |
| 2946 backend.compiler.enqueuer.resolution.universe | 2946 backend.compiler.enqueuer.resolution.universe |
| 2947 .closuresWithFreeTypeVariables.add(closure); | 2947 .closuresWithFreeTypeVariables.add(closure); |
| 2948 registerBackendImpact(transformed, impacts.computeSignature); | 2948 registerBackendImpact(transformed, impacts.computeSignature); |
| 2949 } | 2949 } |
| 2950 } | 2950 } |
| 2951 // TODO(johnniwinther): Remove this when dependency tracking is done on | |
| 2952 // the world impact itself. | |
| 2953 for (InterfaceType instantiatedType in worldImpact.instantiatedTypes) { | |
| 2954 transformed.registerInstantiatedType(instantiatedType); | |
| 2955 } | |
| 2956 for (Element element in worldImpact.staticUses) { | |
| 2957 transformed.registerStaticUse(element); | |
| 2958 } | |
| 2959 | |
| 2960 return transformed; | 2951 return transformed; |
| 2961 } | 2952 } |
| 2962 | 2953 |
| 2963 void registerBackendImpact(TransformedWorldImpact worldImpact, | 2954 void registerBackendImpact(TransformedWorldImpact worldImpact, |
| 2964 BackendImpact backendImpact) { | 2955 BackendImpact backendImpact) { |
| 2965 for (Element staticUse in backendImpact.staticUses) { | 2956 for (Element staticUse in backendImpact.staticUses) { |
| 2966 assert(staticUse != null); | 2957 assert(staticUse != null); |
| 2967 backend.registerBackendUse(staticUse); | 2958 backend.registerBackendUse(staticUse); |
| 2968 worldImpact.registerStaticUse(staticUse); | 2959 worldImpact.registerStaticUse(staticUse); |
| 2969 } | 2960 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3017 } | 3008 } |
| 3018 | 3009 |
| 3019 /// Records that [constant] is used by the element behind [registry]. | 3010 /// Records that [constant] is used by the element behind [registry]. |
| 3020 class Dependency { | 3011 class Dependency { |
| 3021 final ConstantValue constant; | 3012 final ConstantValue constant; |
| 3022 final Element annotatedElement; | 3013 final Element annotatedElement; |
| 3023 | 3014 |
| 3024 const Dependency(this.constant, this.annotatedElement); | 3015 const Dependency(this.constant, this.annotatedElement); |
| 3025 } | 3016 } |
| 3026 | 3017 |
| OLD | NEW |