| Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| index 0595586fd80bc40a2aed2417006b4d664fd1b434..a045bafb44854d67878217d856cfe0d29eb3fb63 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| @@ -63,10 +63,9 @@ class SsaBuilderTask extends CompilerTask {
|
| signature.forEachOptionalParameter((Element parameter) {
|
| // This ensures the default value will be computed.
|
| Constant constant =
|
| - compiler.constantHandler.getConstantForVariable(parameter);
|
| + backend.constantHandler.getConstantForVariable(parameter);
|
| backend.registerCompileTimeConstant(constant, work.resolutionTree);
|
| - compiler.constantHandler.addCompileTimeConstantForEmission(
|
| - constant);
|
| + backend.constantHandler.addCompileTimeConstantForEmission(constant);
|
| });
|
| }
|
| if (compiler.tracer.enabled) {
|
| @@ -1309,7 +1308,7 @@ class SsaBuilder extends ResolvedVisitor {
|
|
|
| HInstruction handleConstantForOptionalParameter(Element parameter) {
|
| Constant constant =
|
| - compiler.constantHandler.getConstantForVariable(parameter);
|
| + backend.constantHandler.getConstantForVariable(parameter);
|
| assert(invariant(parameter, constant != null,
|
| message: 'No constant computed for $parameter'));
|
| return graph.addConstant(constant, compiler);
|
| @@ -1348,7 +1347,8 @@ class SsaBuilder extends ResolvedVisitor {
|
| bool inTryStatement = false;
|
|
|
| Constant getConstantForNode(ast.Node node) {
|
| - Constant constant = elements.getConstant(node);
|
| + Constant constant =
|
| + backend.constantHandler.getConstantForNode(node, elements);
|
| assert(invariant(node, constant != null,
|
| message: 'No constant computed for $node'));
|
| return constant;
|
| @@ -1360,7 +1360,7 @@ class SsaBuilder extends ResolvedVisitor {
|
|
|
| bool isLazilyInitialized(VariableElement element) {
|
| Constant initialValue =
|
| - compiler.constantHandler.getConstantForVariable(element);
|
| + backend.constantHandler.getConstantForVariable(element);
|
| return initialValue == null;
|
| }
|
|
|
| @@ -2936,7 +2936,7 @@ class SsaBuilder extends ResolvedVisitor {
|
| if (element.isField() && !element.isAssignable()) {
|
| // A static final or const. Get its constant value and inline it if
|
| // the value can be compiled eagerly.
|
| - value = compiler.constantHandler.getConstantForVariable(element);
|
| + value = backend.constantHandler.getConstantForVariable(element);
|
| }
|
| if (value != null) {
|
| HConstant instruction = graph.addConstant(value, compiler);
|
| @@ -4340,7 +4340,7 @@ class SsaBuilder extends ResolvedVisitor {
|
| } else if (node.isConst()) {
|
| stack.add(addConstant(node));
|
| if (isSymbolConstructor) {
|
| - ConstructedConstant symbol = elements.getConstant(node);
|
| + ConstructedConstant symbol = getConstantForNode(node);
|
| StringConstant stringConstant = symbol.fields.single;
|
| String nameString = stringConstant.toDartString().slowToString();
|
| compiler.enqueuer.codegen.registerConstSymbol(nameString, elements);
|
|
|