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

Unified Diff: src/x64/stub-cache-x64.cc

Issue 558069: Change StoreIC interface on x64 to pass receiver in rdx, not on stack. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/virtual-frame-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/stub-cache-x64.cc
===================================================================
--- src/x64/stub-cache-x64.cc (revision 3764)
+++ src/x64/stub-cache-x64.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -1354,25 +1354,22 @@
// ----------- S t a t e -------------
// -- rax : value
// -- rcx : name
+ // -- rdx : receiver
// -- rsp[0] : return address
- // -- rsp[8] : receiver
// -----------------------------------
Label miss;
- // Get the object from the stack.
- __ movq(rbx, Operand(rsp, 1 * kPointerSize));
-
// Check that the object isn't a smi.
- __ JumpIfSmi(rbx, &miss);
+ __ JumpIfSmi(rdx, &miss);
// Check that the map of the object hasn't changed.
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
+ __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),
Handle<Map>(object->map()));
__ j(not_equal, &miss);
// Perform global security token check if needed.
if (object->IsJSGlobalProxy()) {
- __ CheckAccessGlobalProxy(rbx, rdx, &miss);
+ __ CheckAccessGlobalProxy(rdx, rbx, &miss);
}
// Stub never generated for non-global objects that require access
@@ -1380,7 +1377,7 @@
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
__ pop(rbx); // remove the return address
- __ push(Operand(rsp, 0)); // receiver
+ __ push(rdx); // receiver
__ Push(Handle<AccessorInfo>(callback)); // callback info
__ push(rcx); // name
__ push(rax); // value
@@ -1408,21 +1405,18 @@
// ----------- S t a t e -------------
// -- rax : value
// -- rcx : name
+ // -- rdx : receiver
// -- rsp[0] : return address
- // -- rsp[8] : receiver
// -----------------------------------
Label miss;
- // Get the object from the stack.
- __ movq(rbx, Operand(rsp, 1 * kPointerSize));
-
// Generate store field code. Trashes the name register.
GenerateStoreField(masm(),
Builtins::StoreIC_ExtendStorage,
object,
index,
transition,
- rbx, rcx, rdx,
+ rdx, rcx, rbx,
&miss);
// Handle store cache miss.
@@ -1441,25 +1435,22 @@
// ----------- S t a t e -------------
// -- rax : value
// -- rcx : name
+ // -- rdx : receiver
// -- rsp[0] : return address
- // -- rsp[8] : receiver
// -----------------------------------
Label miss;
- // Get the object from the stack.
- __ movq(rbx, Operand(rsp, 1 * kPointerSize));
-
// Check that the object isn't a smi.
- __ JumpIfSmi(rbx, &miss);
+ __ JumpIfSmi(rdx, &miss);
// Check that the map of the object hasn't changed.
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
+ __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),
Handle<Map>(receiver->map()));
__ j(not_equal, &miss);
// Perform global security token check if needed.
if (receiver->IsJSGlobalProxy()) {
- __ CheckAccessGlobalProxy(rbx, rdx, &miss);
+ __ CheckAccessGlobalProxy(rdx, rbx, &miss);
}
// Stub never generated for non-global objects that require access
@@ -1467,7 +1458,7 @@
ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded());
__ pop(rbx); // remove the return address
- __ push(Operand(rsp, 0)); // receiver
+ __ push(rdx); // receiver
__ push(rcx); // name
__ push(rax); // value
__ push(rbx); // restore return address
@@ -1493,14 +1484,13 @@
// ----------- S t a t e -------------
// -- rax : value
// -- rcx : name
+ // -- rdx : receiver
// -- rsp[0] : return address
- // -- rsp[8] : receiver
// -----------------------------------
Label miss;
// Check that the map of the global has not changed.
- __ movq(rbx, Operand(rsp, kPointerSize));
- __ Cmp(FieldOperand(rbx, HeapObject::kMapOffset),
+ __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),
Handle<Map>(object->map()));
__ j(not_equal, &miss);
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/virtual-frame-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698