Index: pkg/compiler/lib/src/ssa/builder_kernel.dart |
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
index c05772eb6a5ec7278f612276169e05f60af7e3b5..4c3e52956ef8d01515794c580b893b868a748c65 100644 |
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
@@ -941,11 +941,20 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder { |
stack.add(graph.addConstant( |
astAdapter.getConstantFor(staticTarget.initializer), compiler)); |
} else { |
- push(new HStatic(astAdapter.getMember(staticTarget), |
- astAdapter.inferredTypeOf(staticTarget))); |
+ if (_isLazyStatic(staticTarget)) { |
+ push(new HLazyStatic(astAdapter.getField(staticTarget), |
+ astAdapter.inferredTypeOf(staticTarget))); |
+ } else { |
+ push(new HStatic(astAdapter.getMember(staticTarget), |
+ astAdapter.inferredTypeOf(staticTarget))); |
+ } |
} |
} |
+ bool _isLazyStatic(ir.Member target) { |
+ return astAdapter.isLazyStatic(target); |
+ } |
+ |
@override |
void visitStaticSet(ir.StaticSet staticSet) { |
staticSet.value.accept(this); |