| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index f89f0d287a5f10291ce2f0e0fb4b0d74ee58ae33..b5d00f9e22af0630731b8f86d455b9564dd16101 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -1233,6 +1233,12 @@ void FlowGraphOptimizer::InlineImplicitInstanceGetter(InstanceCallInstr* call) {
|
| field.Offset(),
|
| AbstractType::ZoneHandle(field.type()),
|
| field.is_final());
|
| + if (field.guarded_cid() != kIllegalCid) {
|
| + load->set_result_cid(field.GuardedCid());
|
| + load->set_field(&Field::ZoneHandle(field.raw()));
|
| + }
|
| + load->set_field_name(String::Handle(field.name()).ToCString());
|
| +
|
| // Discard the environment from the original instruction because the load
|
| // can't deoptimize.
|
| call->RemoveEnvironment();
|
| @@ -2016,6 +2022,17 @@ bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr,
|
| Definition::kEffect);
|
| needs_store_barrier = kNoStoreBarrier;
|
| }
|
| +
|
| + if (field.guarded_cid() != kDynamicCid) {
|
| + InsertBefore(instr,
|
| + new GuardFieldInstr(new Value(instr->ArgumentAt(1)),
|
| + field,
|
| + instr->deopt_id()),
|
| + instr->env(),
|
| + Definition::kEffect);
|
| + }
|
| +
|
| + // Field guard was detached.
|
| StoreInstanceFieldInstr* store = new StoreInstanceFieldInstr(
|
| field,
|
| new Value(instr->ArgumentAt(0)),
|
| @@ -3777,6 +3794,7 @@ void ConstantPropagator::VisitCheckStackOverflow(
|
|
|
| void ConstantPropagator::VisitCheckClass(CheckClassInstr* instr) { }
|
|
|
| +void ConstantPropagator::VisitGuardField(GuardFieldInstr* instr) { }
|
|
|
| void ConstantPropagator::VisitCheckSmi(CheckSmiInstr* instr) { }
|
|
|
|
|