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

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

Issue 140068: Implement code generation for conditional expressions and regexp... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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
« src/x64/register-allocator-x64.cc ('K') | « src/x64/register-allocator-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/virtual-frame-x64.cc
===================================================================
--- src/x64/virtual-frame-x64.cc (revision 2241)
+++ src/x64/virtual-frame-x64.cc (working copy)
@@ -857,8 +857,37 @@
}
+Result VirtualFrame::CallStoreIC() {
+ // Name, value, and receiver are on top of the frame. The IC
+ // expects name in ecx, value in eax, and receiver on the stack. It
William Hesse 2009/06/22 19:14:23 rcx, value in rax,
Mads Ager (chromium) 2009/06/22 19:25:00 Done.
+ // does not drop the receiver.
+ Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
+ Result name = Pop();
+ Result value = Pop();
+ PrepareForCall(1, 0); // One stack arg, not callee-dropped.
+ if (value.is_register() && value.reg().is(rcx)) {
+ if (name.is_register() && name.reg().is(rax)) {
+ // Wrong registers.
+ __ xchg(rax, rcx);
+ } else {
+ // Register eax is free for value, which frees ecx for name.
William Hesse 2009/06/22 19:14:23 Register rax ... rcx
Mads Ager (chromium) 2009/06/22 19:25:00 Done.
+ value.ToRegister(rax);
+ name.ToRegister(rcx);
+ }
+ } else {
+ // Register ecx is free for name, which guarantees eax is free for
William Hesse 2009/06/22 19:14:23 rcx ... rax
Mads Ager (chromium) 2009/06/22 19:25:00 Done.
+ // value.
+ name.ToRegister(rcx);
+ value.ToRegister(rax);
+ }
+ name.Unuse();
+ value.Unuse();
+ return RawCallCodeObject(ic, RelocInfo::CODE_TARGET);
+}
+
+
#undef __
} } // namespace v8::internal
« src/x64/register-allocator-x64.cc ('K') | « src/x64/register-allocator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698