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

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

Issue 601080: Change KeyedLoadIC interface on ia32 to take receiver and name in registers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 | « src/ia32/stub-cache-ia32.cc ('k') | 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 3894)
+++ src/ia32/virtual-frame-ia32.cc (working copy)
@@ -924,10 +924,26 @@
Result VirtualFrame::CallKeyedLoadIC(RelocInfo::Mode mode) {
- // Key and receiver are on top of the frame. The IC expects them on
- // the stack. It does not drop them.
+ // Key and receiver are on top of the frame. Put them in eax and edx.
+ Result key = Pop();
+ Result receiver = Pop();
+ PrepareForCall(0, 0);
+
+ if (!key.is_register() || !key.reg().is(edx)) {
+ // Register edx is available for receiver.
+ receiver.ToRegister(edx);
+ key.ToRegister(eax);
+ } else if (!receiver.is_register() || !receiver.reg().is(eax)) {
+ // Register eax is available for key.
+ key.ToRegister(eax);
+ receiver.ToRegister(edx);
+ } else {
+ __ xchg(edx, eax);
+ }
+ key.Unuse();
+ receiver.Unuse();
+
Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
- PrepareForCall(2, 0); // Two stack args, neither callee-dropped.
return RawCallCodeObject(ic, mode);
}
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698