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

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

Issue 1325004: Avoid calling ToRegister(register) when result is in register already, and re... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | test/mjsunit/codegen-coverage.js » ('j') | 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 4259)
+++ src/ia32/virtual-frame-ia32.cc (working copy)
@@ -1040,18 +1040,23 @@
PrepareForCall(0, 0);
if (!cgen()->allocator()->is_used(eax) ||
(value.is_register() && value.reg().is(eax))) {
- value.ToRegister(eax); // No effect if value is in eax already.
+ if (!cgen()->allocator()->is_used(eax)) {
+ value.ToRegister(eax);
+ }
MoveResultsToRegisters(&key, &receiver, ecx, edx);
value.Unuse();
} else if (!cgen()->allocator()->is_used(ecx) ||
(key.is_register() && key.reg().is(ecx))) {
- // Receiver and/or key are in eax.
- key.ToRegister(ecx);
+ if (!cgen()->allocator()->is_used(ecx)) {
+ key.ToRegister(ecx);
+ }
MoveResultsToRegisters(&value, &receiver, eax, edx);
key.Unuse();
} else if (!cgen()->allocator()->is_used(edx) ||
(receiver.is_register() && receiver.reg().is(edx))) {
- receiver.ToRegister(edx);
+ if (!cgen()->allocator()->is_used(edx)) {
+ receiver.ToRegister(edx);
+ }
MoveResultsToRegisters(&key, &value, ecx, eax);
receiver.Unuse();
} else {
« no previous file with comments | « no previous file | test/mjsunit/codegen-coverage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698