Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1394923003: Use WorldImpact for element dependencies in deferred_load (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 } 2803 }
2804 } 2804 }
2805 2805
2806 class JavaScriptResolutionCallbacks extends ResolutionCallbacks { 2806 class JavaScriptResolutionCallbacks extends ResolutionCallbacks {
2807 final JavaScriptBackend backend; 2807 final JavaScriptBackend backend;
2808 2808
2809 JavaScriptResolutionCallbacks(this.backend); 2809 JavaScriptResolutionCallbacks(this.backend);
2810 2810
2811 BackendImpacts get impacts => backend.impacts; 2811 BackendImpacts get impacts => backend.impacts;
2812 2812
2813 WorldImpact transformImpact(ResolutionWorldImpact worldImpact) { 2813 WorldImpact transformImpact(ResolutionImpact worldImpact) {
2814 TransformedWorldImpact transformed = 2814 TransformedWorldImpact transformed =
2815 new TransformedWorldImpact(worldImpact); 2815 new TransformedWorldImpact(worldImpact);
2816 for (Feature feature in worldImpact.features) { 2816 for (Feature feature in worldImpact.features) {
2817 switch (feature) { 2817 switch (feature) {
2818 case Feature.ABSTRACT_CLASS_INSTANTIATION: 2818 case Feature.ABSTRACT_CLASS_INSTANTIATION:
2819 registerBackendImpact( 2819 registerBackendImpact(
2820 transformed, impacts.abstractClassInstantiation); 2820 transformed, impacts.abstractClassInstantiation);
2821 break; 2821 break;
2822 case Feature.ASSERT: 2822 case Feature.ASSERT:
2823 registerBackendImpact(transformed, impacts.assertWithoutMessage); 2823 registerBackendImpact(transformed, impacts.assertWithoutMessage);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 } 3017 }
3018 3018
3019 /// Records that [constant] is used by the element behind [registry]. 3019 /// Records that [constant] is used by the element behind [registry].
3020 class Dependency { 3020 class Dependency {
3021 final ConstantValue constant; 3021 final ConstantValue constant;
3022 final Element annotatedElement; 3022 final Element annotatedElement;
3023 3023
3024 const Dependency(this.constant, this.annotatedElement); 3024 const Dependency(this.constant, this.annotatedElement);
3025 } 3025 }
3026 3026
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698