| 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 1ab19ec36e4760693a82839af6baf454e44bf46e..013ef4be68741a32f025b15a4e042afc1ef59ed0 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| @@ -290,20 +290,22 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| closeFunction();
|
| }
|
|
|
| - /// Maps the fields of a class to their SSA values.
|
| + /// Maps the instance fields of a class to their SSA values.
|
| Map<ir.Field, HInstruction> _collectFieldValues(ir.Class clazz) {
|
| final fieldValues = <ir.Field, HInstruction>{};
|
|
|
| for (var field in clazz.fields) {
|
| - if (field.initializer == null) {
|
| - fieldValues[field] = graph.addConstantNull(closedWorld);
|
| - } else {
|
| - // Gotta update the resolvedAst when we're looking at field values
|
| - // outside the constructor.
|
| - astAdapter.pushResolvedAst(field);
|
| - field.initializer.accept(this);
|
| - fieldValues[field] = pop();
|
| - astAdapter.popResolvedAstStack();
|
| + if (field.isInstanceMember) {
|
| + if (field.initializer == null) {
|
| + fieldValues[field] = graph.addConstantNull(closedWorld);
|
| + } else {
|
| + // Gotta update the resolvedAst when we're looking at field values
|
| + // outside the constructor.
|
| + astAdapter.pushResolvedAst(field);
|
| + field.initializer.accept(this);
|
| + fieldValues[field] = pop();
|
| + astAdapter.popResolvedAstStack();
|
| + }
|
| }
|
| }
|
|
|
|
|