| Index: runtime/vm/flow_graph_type_propagator.cc
|
| diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
|
| index 782ea05234f7166d6e33c85c06cf6d12c7456799..d3cdc8418fb36da18f6e90f63ddd8fb341df80a6 100644
|
| --- a/runtime/vm/flow_graph_type_propagator.cc
|
| +++ b/runtime/vm/flow_graph_type_propagator.cc
|
| @@ -232,8 +232,17 @@ void FlowGraphTypePropagator::VisitCheckClass(CheckClassInstr* check) {
|
|
|
|
|
| void FlowGraphTypePropagator::VisitCheckClassId(CheckClassIdInstr* check) {
|
| - // Can't propagate the type/cid because it may cause illegal code motion and
|
| - // we don't track dependencies in all places via redefinitions.
|
| + if (!check->Dependencies().IsNone()) {
|
| + // TODO(vegorov): If check is affected by side-effect we can still propagate
|
| + // the type further but not the cid.
|
| + return;
|
| + }
|
| +
|
| + LoadClassIdInstr* load_cid =
|
| + check->value()->definition()->OriginalDefinition()->AsLoadClassId();
|
| + if (load_cid != NULL) {
|
| + SetCid(load_cid->object()->definition(), check->cid());
|
| + }
|
| }
|
|
|
|
|
|
|