Index: pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart |
diff --git a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart |
index 11ff3c94415dfa6040d433b1d2c9c8e1aca0e321..807bcb95cedcb12c590189f40c2386ecb0c40a4c 100644 |
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart |
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart |
@@ -8,6 +8,8 @@ import '../dart_types.dart'; |
import '../elements/elements.dart'; |
import '../enqueue.dart' show Enqueuer; |
import '../universe/use.dart' show StaticUse; |
+import '../universe/world_impact.dart' |
+ show WorldImpact, StagedWorldImpactBuilder; |
import 'backend.dart'; |
/** |
@@ -130,6 +132,8 @@ class CustomElementsAnalysisJoin { |
final JavaScriptBackend backend; |
Compiler get compiler => backend.compiler; |
+ final StagedWorldImpactBuilder impactBuilder = new StagedWorldImpactBuilder(); |
+ |
// Classes that are candidates for needing constructors. Classes are moved to |
// [activeClasses] when we know they need constructors. |
final instantiatedClasses = new Set<ClassElement>(); |
@@ -171,13 +175,14 @@ class CustomElementsAnalysisJoin { |
// Force the generaton of the type constant that is the key to an entry |
// in the generated table. |
ConstantValue constant = makeTypeConstant(classElement); |
- backend.registerCompileTimeConstant( |
- constant, compiler.globalDependencies); |
+ backend.computeImpactForCompileTimeConstant( |
+ constant, impactBuilder, false); |
backend.addCompileTimeConstantForEmission(constant); |
} |
} |
activeClasses.addAll(newActiveClasses); |
instantiatedClasses.removeAll(newActiveClasses); |
+ enqueuer.applyImpact(null, impactBuilder.flush()); |
} |
TypeConstantValue makeTypeConstant(ClassElement element) { |