Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2527)

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 10806047: Fix crash during parallel moves. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.cc
===================================================================
--- runtime/vm/flow_graph_allocator.cc (revision 9788)
+++ runtime/vm/flow_graph_allocator.cc (working copy)
@@ -425,16 +425,16 @@
if (phi == NULL) continue;
Value* val = phi->InputAt(pred_idx);
- MoveOperands move = parallel_move->moves()[move_idx];
+ MoveOperands* move = parallel_move->MoveOperandsAt(move_idx);
if (val->IsUse()) {
const intptr_t virtual_register =
val->AsUse()->definition()->ssa_temp_index();
- Location* slot = move.src_slot();
- *slot = Location::RequiresRegister();
- GetLiveRange(virtual_register)->head()->AddUse(NULL, pos, slot);
+ move->set_src(Location::RequiresRegister());
+ GetLiveRange(
+ virtual_register)->head()->AddUse(NULL, pos, move->src_slot());
} else {
ASSERT(val->IsConstant());
- move.set_src(Location::Constant(val->AsConstant()->value()));
+ move->set_src(Location::Constant(val->AsConstant()->value()));
}
move_idx++;
}
@@ -555,12 +555,12 @@
BlockEntryInstr* pred = block->PredecessorAt(k);
ASSERT(pred->last_instruction()->IsGoto());
Instruction* move_instr = pred->last_instruction()->previous();
- ASSERT(move_instr->IsParallelMove());
+ ParallelMoveInstr* pmove = move_instr->AsParallelMove();
+ ASSERT(pmove != NULL);
- Location* slot =
- move_instr->AsParallelMove()->moves()[move_idx].dest_slot();
- *slot = Location::RequiresRegister();
- interval->AddUse(NULL, pos, slot);
+ MoveOperands* move_operands = pmove->MoveOperandsAt(move_idx);
+ move_operands->set_dest(Location::RequiresRegister());
+ interval->AddUse(NULL, pos, move_operands->dest_slot());
}
// All phi resolution moves are connected. Phi's live range is
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698