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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.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 | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 9788)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -1110,8 +1110,9 @@
void ParallelMoveResolver::EmitMove(int index) {
- Location source = moves_[index].src();
- Location destination = moves_[index].dest();
+ MoveOperands* move = moves_[index];
+ const Location source = move->src();
+ const Location destination = move->dest();
ASSERT(destination.IsRegister());
if (source.IsRegister()) {
@@ -1120,30 +1121,31 @@
ASSERT(source.IsConstant());
__ LoadObject(destination.reg(), source.constant());
}
- moves_[index].Eliminate();
+ move->Eliminate();
}
void ParallelMoveResolver::EmitSwap(int index) {
- Location source = moves_[index].src();
- Location destination = moves_[index].dest();
+ MoveOperands* move = moves_[index];
+ const Location source = move->src();
+ const Location destination = move->dest();
ASSERT(source.IsRegister() && destination.IsRegister());
__ xchgl(destination.reg(), source.reg());
// The swap of source and destination has executed a move from source to
// destination.
- moves_[index].Eliminate();
+ move->Eliminate();
// Any unperformed (including pending) move with a source of either
// this move's source or destination needs to have their source
// changed to reflect the state of affairs after the swap.
for (int i = 0; i < moves_.length(); ++i) {
- MoveOperands other_move = moves_[i];
+ const MoveOperands& other_move = *moves_[i];
if (other_move.Blocks(source)) {
- moves_[i].set_src(destination);
+ moves_[i]->set_src(destination);
} else if (other_move.Blocks(destination)) {
- moves_[i].set_src(source);
+ moves_[i]->set_src(source);
}
}
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698