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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 // add both to the list of helpers. | 612 // add both to the list of helpers. |
613 helpersUsed.add(element.implementation); | 613 helpersUsed.add(element.implementation); |
614 } | 614 } |
615 return element; | 615 return element; |
616 } | 616 } |
617 | 617 |
618 bool _isValidBackendUse(Element element) { | 618 bool _isValidBackendUse(Element element) { |
619 assert(invariant(element, element.isDeclaration, message: "")); | 619 assert(invariant(element, element.isDeclaration, message: "")); |
620 if (element == helpers.streamIteratorConstructor || | 620 if (element == helpers.streamIteratorConstructor || |
621 element == helpers.compiler.symbolConstructor || | 621 element == helpers.compiler.symbolConstructor || |
622 element == helpers.compiler.symbolValidatedConstructor || | 622 helpers.isSymbolValidatedConstructor(element) || |
623 element == helpers.syncCompleterConstructor || | 623 element == helpers.syncCompleterConstructor || |
624 element == coreClasses.symbolClass || | 624 element == coreClasses.symbolClass || |
625 element == helpers.objectNoSuchMethod) { | 625 element == helpers.objectNoSuchMethod) { |
626 // TODO(johnniwinther): These are valid but we could be more precise. | 626 // TODO(johnniwinther): These are valid but we could be more precise. |
627 return true; | 627 return true; |
628 } else if (element.implementationLibrary.isPatch || | 628 } else if (element.implementationLibrary.isPatch || |
629 // Needed to detect deserialized injected elements, that is | 629 // Needed to detect deserialized injected elements, that is |
630 // element declared in patch files. | 630 // element declared in patch files. |
631 (element.library.isPlatformLibrary && | 631 (element.library.isPlatformLibrary && |
632 element.sourcePosition.uri.path | 632 element.sourcePosition.uri.path |
(...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2976 | 2976 |
2977 @override | 2977 @override |
2978 void onImpactUsed(ImpactUseCase impactUse) { | 2978 void onImpactUsed(ImpactUseCase impactUse) { |
2979 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { | 2979 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { |
2980 // TODO(johnniwinther): Allow emptying when serialization has been | 2980 // TODO(johnniwinther): Allow emptying when serialization has been |
2981 // performed. | 2981 // performed. |
2982 resolution.emptyCache(); | 2982 resolution.emptyCache(); |
2983 } | 2983 } |
2984 } | 2984 } |
2985 } | 2985 } |
OLD | NEW |