| Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| index 8b84164da0896717dcda1a727256fb4c7a793361..86333da6aefa5eb09a5014b6ed2849cf40533e98 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| @@ -3141,10 +3141,18 @@ class TypePropagationVisitor implements Visitor {
|
| AbstractConstantValue object = getValue(node.object.definition);
|
| if (object.isNothing || object.isNullConstant) {
|
| setValue(node, nothing);
|
| - } else {
|
| - node.objectIsNotNull = object.isDefinitelyNotNull;
|
| - setValue(node, lattice.fromMask(typeSystem.getFieldType(node.field)));
|
| + return;
|
| + }
|
| + node.objectIsNotNull = object.isDefinitelyNotNull;
|
| + if (object.isConstant && object.constant.isConstructedObject) {
|
| + ConstructedConstantValue constructedConstant = object.constant;
|
| + ConstantValue value = constructedConstant.fields[node.field];
|
| + if (value != null) {
|
| + setValue(node, constantValue(value));
|
| + return;
|
| + }
|
| }
|
| + setValue(node, lattice.fromMask(typeSystem.getFieldType(node.field)));
|
| }
|
|
|
| void visitSetField(SetField node) {}
|
|
|