| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| index d070e6e5190c33b80a89616a3484b06b4668c014..cd8459bf4ee60f081d7f593247af762788b92185 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
|
| @@ -1710,7 +1710,10 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| // constant value instead.
|
| Element element = compiler.findRequiredElement(
|
| compiler.typedDataLibrary, const SourceString('fetchLength'));
|
| - Constant constant = compiler.constantHandler.compileConstant(element);
|
| + Constant constant =
|
| + compiler.constantHandler.getConstantForVariable(element);
|
| + assert(invariant(element, constant != null,
|
| + message: 'No constant computed for $element'));
|
| var jsConstant = backend.emitter.constantReference(constant);
|
| push(new js.Call(jsConstant, [pop()]), node);
|
| } else {
|
| @@ -1818,15 +1821,9 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| visitConstant(HConstant node) {
|
| assert(isGenerateAtUseSite(node));
|
| generateConstant(node.constant);
|
| - DartType type = node.constant.computeType(compiler);
|
| - if (node.constant is ConstructedConstant ||
|
| - node.constant is InterceptorConstant) {
|
| - ConstantHandler handler = compiler.constantHandler;
|
| - handler.registerCompileTimeConstant(node.constant, work.resolutionTree);
|
| - }
|
| - if (node.constant is! InterceptorConstant) {
|
| - world.registerInstantiatedClass(type.element, work.resolutionTree);
|
| - }
|
| +
|
| + backend.registerCompileTimeConstant(node.constant, work.resolutionTree);
|
| + compiler.constantHandler.addCompileTimeConstantForEmission(node.constant);
|
| }
|
|
|
| visitNot(HNot node) {
|
|
|