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

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

Issue 2732663002: Late creation of CodegenEnqueuer (Closed)
Patch Set: Remove eager creation Created 3 years, 9 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.mirrors_handler; 5 library dart2js.mirrors_handler;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart'; 8 import '../common/resolution.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 Dependency dependency = 152 Dependency dependency =
153 new Dependency(constant, metadata.annotatedElement); 153 new Dependency(constant, metadata.annotatedElement);
154 metadataConstants.add(dependency); 154 metadataConstants.add(dependency);
155 backend.computeImpactForCompileTimeConstant( 155 backend.computeImpactForCompileTimeConstant(
156 dependency.constant, impactBuilder, 156 dependency.constant, impactBuilder,
157 forResolution: enqueuer.isResolutionQueue); 157 forResolution: enqueuer.isResolutionQueue);
158 } 158 }
159 159
160 // TODO(johnniwinther): We should have access to all recently processed 160 // TODO(johnniwinther): We should have access to all recently processed
161 // elements and process these instead. 161 // elements and process these instead.
162 processMetadata(compiler.enqueuer.resolution.processedEntities, 162 processMetadata(enqueuer.processedEntities,
163 registerMetadataConstant); 163 registerMetadataConstant);
164 } else { 164 } else {
165 for (Dependency dependency in metadataConstants) { 165 for (Dependency dependency in metadataConstants) {
166 backend.computeImpactForCompileTimeConstant( 166 backend.computeImpactForCompileTimeConstant(
167 dependency.constant, impactBuilder, 167 dependency.constant, impactBuilder,
168 forResolution: enqueuer.isResolutionQueue); 168 forResolution: enqueuer.isResolutionQueue);
169 } 169 }
170 metadataConstants.clear(); 170 metadataConstants.clear();
171 } 171 }
172 enqueuer.applyImpact(impactBuilder.flush()); 172 enqueuer.applyImpact(impactBuilder.flush());
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 /// Records that [constant] is used by the element behind [registry]. 413 /// Records that [constant] is used by the element behind [registry].
414 class Dependency { 414 class Dependency {
415 final ConstantValue constant; 415 final ConstantValue constant;
416 final Element annotatedElement; 416 final Element annotatedElement;
417 417
418 const Dependency(this.constant, this.annotatedElement); 418 const Dependency(this.constant, this.annotatedElement);
419 419
420 String toString() => '$annotatedElement:${constant.toStructuredText()}'; 420 String toString() => '$annotatedElement:${constant.toStructuredText()}';
421 } 421 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698