| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index f56cdde24e4f88b1aa023129b57c3293307c1445..9fa3f62772860cb569544e4ee2cf996e3b10af5a 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -838,10 +838,8 @@ static bool IsMarked(BlockEntryInstr* block,
|
| void BlockEntryInstr::DiscoverBlocks(
|
| BlockEntryInstr* predecessor,
|
| GrowableArray<BlockEntryInstr*>* preorder,
|
| - GrowableArray<BlockEntryInstr*>* postorder,
|
| GrowableArray<intptr_t>* parent,
|
| - intptr_t variable_count,
|
| - intptr_t fixed_parameter_count) {
|
| + GrowableArray<BlockEntryEdge>* block_stack) {
|
| // If this block has a predecessor (i.e., is not the graph entry) we can
|
| // assume the preorder array is non-empty.
|
| ASSERT((predecessor == NULL) || !preorder->is_empty());
|
| @@ -885,20 +883,11 @@ void BlockEntryInstr::DiscoverBlocks(
|
| }
|
| set_last_instruction(last);
|
|
|
| - // Visit the block's successors in reverse so that they appear forwards
|
| - // the reverse postorder block ordering.
|
| + // Push the block's successors in reverse so that they are visited from left
|
| + // to right.
|
| for (intptr_t i = last->SuccessorCount() - 1; i >= 0; --i) {
|
| - last->SuccessorAt(i)->DiscoverBlocks(this,
|
| - preorder,
|
| - postorder,
|
| - parent,
|
| - variable_count,
|
| - fixed_parameter_count);
|
| + block_stack->Add(BlockEntryEdge(this, last->SuccessorAt(i)));
|
| }
|
| -
|
| - // 6. Assign postorder number and add the block entry to the list.
|
| - set_postorder_number(postorder->length());
|
| - postorder->Add(this);
|
| }
|
|
|
|
|
|
|