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

Unified Diff: src/ia32/virtual-frame-ia32.cc

Issue 113451: Polish code of VirtualFrame::MoveMemoryToRegister (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/virtual-frame-ia32.cc
===================================================================
--- src/ia32/virtual-frame-ia32.cc (revision 1962)
+++ src/ia32/virtual-frame-ia32.cc (working copy)
@@ -424,24 +424,26 @@
if (index != kIllegalIndex) {
FrameElement source = elements_[index];
FrameElement target = expected->elements_[index];
+ Register target_reg = { i };
+ ASSERT(expected->elements_[index].reg().is(target_reg));
switch (source.type()) {
case FrameElement::INVALID: // Fall through.
UNREACHABLE();
break;
case FrameElement::REGISTER:
- ASSERT(source.reg().is(target.reg()));
- continue; // Go to next iteration. Skips Use(target.reg()) below.
+ ASSERT(source.reg().is(target_reg));
+ continue; // Go to next iteration. Skips Use(target_reg) below.
break;
case FrameElement::MEMORY:
ASSERT(index <= stack_pointer_);
- __ mov(target.reg(), Operand(ebp, fp_relative(index)));
+ __ mov(target_reg, Operand(ebp, fp_relative(index)));
break;
case FrameElement::CONSTANT:
if (cgen_->IsUnsafeSmi(source.handle())) {
- cgen_->LoadUnsafeSmi(target.reg(), source.handle());
+ cgen_->LoadUnsafeSmi(target_reg, source.handle());
} else {
- __ Set(target.reg(), Immediate(source.handle()));
+ __ Set(target_reg, Immediate(source.handle()));
}
break;
@@ -461,21 +463,21 @@
Use(new_backing_reg, backing_index);
__ mov(new_backing_reg,
Operand(ebp, fp_relative(backing_index)));
- __ mov(target.reg(), new_backing_reg);
+ __ mov(target_reg, new_backing_reg);
} else {
- __ mov(target.reg(), Operand(ebp, fp_relative(backing_index)));
+ __ mov(target_reg, Operand(ebp, fp_relative(backing_index)));
}
} else {
- __ mov(target.reg(), backing.reg());
+ __ mov(target_reg, backing.reg());
}
}
}
// Ensure the proper sync state. If the source was memory no
// code needs to be emitted.
if (target.is_synced() && !source.is_synced()) {
- __ mov(Operand(ebp, fp_relative(index)), target.reg());
+ __ mov(Operand(ebp, fp_relative(index)), target_reg);
}
- Use(target.reg(), index);
+ Use(target_reg, index);
elements_[index] = target;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698