| Index: vm/flow_graph_builder.cc
|
| ===================================================================
|
| --- vm/flow_graph_builder.cc (revision 9430)
|
| +++ vm/flow_graph_builder.cc (working copy)
|
| @@ -2511,8 +2511,8 @@
|
| }
|
|
|
| // 2. Process normal instructions.
|
| - Instruction* current = block_entry->successor();
|
| - while ((current != NULL) && !current->IsBlockEntry()) {
|
| + for (ForwardIterator it(block_entry); !it.Done(); it.Advance()) {
|
| + Instruction* current = it.Current();
|
| // Attach current environment to the instruction.
|
| // TODO(fschneider): Currently each instruction gets a full copy of the
|
| // enviroment. This should be optimized: Only instructions that can
|
| @@ -2568,7 +2568,7 @@
|
| if (bind->is_used()) {
|
| env->Add(CopyValue((*env)[index]));
|
| }
|
| - current = current->RemoveFromGraph();
|
| + it.RemoveCurrentFromGraph();
|
| } else {
|
| // Not a load or store.
|
| if (bind->is_used()) {
|
| @@ -2576,11 +2576,7 @@
|
| bind->set_ssa_temp_index(current_ssa_temp_index_++);
|
| env->Add(new UseVal(bind));
|
| }
|
| - current = current->successor();
|
| }
|
| - } else {
|
| - // Not a computation.
|
| - current = current->successor();
|
| }
|
| }
|
|
|
|
|