| 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 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); | 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); |
| 10 | 10 |
| (...skipping 2662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2673 void registerBackendInstantiation(ClassElement element, Registry registry) { | 2673 void registerBackendInstantiation(ClassElement element, Registry registry) { |
| 2674 backend.registerBackendUse(element); | 2674 backend.registerBackendUse(element); |
| 2675 element.ensureResolved(backend.compiler); | 2675 element.ensureResolved(backend.compiler); |
| 2676 registry.registerInstantiation(element.rawType); | 2676 registry.registerInstantiation(element.rawType); |
| 2677 } | 2677 } |
| 2678 | 2678 |
| 2679 void onAssert(Send node, Registry registry) { | 2679 void onAssert(Send node, Registry registry) { |
| 2680 registerBackendStaticInvocation(backend.assertMethod, registry); | 2680 registerBackendStaticInvocation(backend.assertMethod, registry); |
| 2681 } | 2681 } |
| 2682 | 2682 |
| 2683 void onAsyncForIn(AsyncForIn node, Registry registry) { | |
| 2684 registerBackendStaticInvocation(backend.getStreamIteratorConstructor(), | |
| 2685 registry); | |
| 2686 } | |
| 2687 | |
| 2688 void onStringInterpolation(Registry registry) { | 2683 void onStringInterpolation(Registry registry) { |
| 2689 assert(registry.isForResolution); | 2684 assert(registry.isForResolution); |
| 2690 registerBackendStaticInvocation( | 2685 registerBackendStaticInvocation( |
| 2691 backend.getStringInterpolationHelper(), registry); | 2686 backend.getStringInterpolationHelper(), registry); |
| 2692 } | 2687 } |
| 2693 | 2688 |
| 2694 void onCatchStatement(Registry registry) { | 2689 void onCatchStatement(Registry registry) { |
| 2695 assert(registry.isForResolution); | 2690 assert(registry.isForResolution); |
| 2696 registerBackendStaticInvocation(backend.getExceptionUnwrapper(), registry); | 2691 registerBackendStaticInvocation(backend.getExceptionUnwrapper(), registry); |
| 2697 registerBackendInstantiation( | 2692 registerBackendInstantiation( |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2869 } | 2864 } |
| 2870 } | 2865 } |
| 2871 | 2866 |
| 2872 /// Records that [constant] is used by the element behind [registry]. | 2867 /// Records that [constant] is used by the element behind [registry]. |
| 2873 class Dependency { | 2868 class Dependency { |
| 2874 final ConstantValue constant; | 2869 final ConstantValue constant; |
| 2875 final Element annotatedElement; | 2870 final Element annotatedElement; |
| 2876 | 2871 |
| 2877 const Dependency(this.constant, this.annotatedElement); | 2872 const Dependency(this.constant, this.annotatedElement); |
| 2878 } | 2873 } |
| OLD | NEW |