| 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 91b0977e722bdb92b70739138ee4b321fb4c70bb..9d55551f2f5eded483b81593aae9dde1810e3ceb 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| @@ -2957,7 +2957,16 @@ class SsaBuilder extends ResolvedVisitor {
|
| value = backend.constants.getConstantForVariable(element);
|
| }
|
| if (value != null) {
|
| - HConstant instruction = graph.addConstant(value, compiler);
|
| + HConstant instruction;
|
| + // Constants that are referred via a deferred prefix should be referred
|
| + // by reference.
|
| + PrefixElement prefix = compiler.deferredLoadTask
|
| + .deferredPrefixElement(send, elements);
|
| + if (prefix != null) {
|
| + instruction = graph.addDeferredConstant(value, prefix, compiler);
|
| + } else {
|
| + instruction = graph.addConstant(value, compiler);
|
| + }
|
| stack.add(instruction);
|
| // The inferrer may have found a better type than the constant
|
| // handler in the case of lists, because the constant handler
|
|
|