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

Unified Diff: src/lithium.cc

Issue 6263005: Change the algorithm and generated code for parallel moves on IA32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Fix compilation on all platforms. Created 9 years, 11 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
Index: src/lithium.cc
diff --git a/src/lithium.cc b/src/lithium.cc
index e066e7da93fe0daa3247fefb2ea444046fae13c8..360a8bcb202ed0c370c392356818693d727ce1c4 100644
--- a/src/lithium.cc
+++ b/src/lithium.cc
@@ -39,18 +39,21 @@ bool LParallelMove::IsRedundant() const {
void LParallelMove::PrintDataTo(StringStream* stream) const {
+ bool first = true;
for (int i = move_operands_.length() - 1; i >= 0; --i) {
fschneider 2011/01/17 09:44:16 I'd also change the printint order to i=0..length-
Kevin Millikin (Chromium) 2011/01/17 10:13:09 I have no idea why it's backwards. I'll change it
if (!move_operands_[i].IsEliminated()) {
- LOperand* from = move_operands_[i].from();
- LOperand* to = move_operands_[i].to();
- if (from->Equals(to)) {
- to->PrintTo(stream);
+ LOperand* source = move_operands_[i].source();
+ LOperand* destination = move_operands_[i].destination();
+ if (!first) stream->Add(" ");
+ first = false;
+ if (source->Equals(destination)) {
+ destination->PrintTo(stream);
} else {
- to->PrintTo(stream);
+ destination->PrintTo(stream);
stream->Add(" = ");
William Hesse 2011/01/17 10:43:43 Why not use a "move arrow" "<-" rather than "=" wh
- from->PrintTo(stream);
+ source->PrintTo(stream);
}
- stream->Add("; ");
+ stream->Add(";");
}
}
}

Powered by Google App Engine
This is Rietveld 408576698