Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_optimizer.cc (revision 10748) |
| +++ runtime/vm/flow_graph_optimizer.cc (working copy) |
| @@ -672,6 +672,12 @@ |
| if (changed) { |
| still_changing_ = true; |
| } |
| + // Propagate class ids. |
| + intptr_t cid = bind->computation()->ResultCid(); |
| + changed = bind->SetPropagatedCid(cid); |
| + if (changed) { |
| + still_changing_ = true; |
| + } |
| } |
| @@ -686,6 +692,19 @@ |
| if (changed) { |
| still_changing_ = true; |
| } |
| + if (phi->propagated_cid() == kDynamicCid) { |
|
regis
2012/08/15 22:46:54
So far, I have tried not to depend on the type of
srdjan
2012/08/16 00:34:46
Done.
|
| + return; |
| + } |
| + // Merge class ids: if any two inputs have different class ids than result |
|
regis
2012/08/15 22:46:54
s/than/then/
srdjan
2012/08/16 00:34:46
Done.
|
| + // is kDynamicCid. |
| + for (intptr_t i = 0; i < phi->InputCount(); i++) { |
| + intptr_t cid = phi->InputAt(i)->ResultCid(); |
| + ASSERT(cid != kIllegalCid); |
| + changed = phi->SetPropagatedCid(cid); |
|
regis
2012/08/15 22:46:54
This does not look right. You are not merging, but
srdjan
2012/08/16 00:34:46
Done.
|
| + if (changed) { |
| + still_changing_ = true; |
| + } |
| + } |
| } |