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

Unified Diff: vm/stub_code_x64.cc

Issue 10114012: Some minor cleanup. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 | « vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/stub_code_x64.cc
===================================================================
--- vm/stub_code_x64.cc (revision 6666)
+++ vm/stub_code_x64.cc (working copy)
@@ -1512,7 +1512,7 @@
// Generate inline cache check for 'num_args'.
// RBX: Inline cache data object.
-// R10: Arguments array.
+// R10: Arguments descriptor array.
// TOS(0): return address
// Control flow:
// - If receiver is null -> jump to IC miss.
@@ -1525,7 +1525,8 @@
intptr_t num_args) {
// TODO(srdjan): Add usage counter increment and test (see ia32).
ASSERT(num_args > 0);
- // Get receiver.
+ // Get receiver (first read number of arguments from argument descriptor array
+ // and then access the receiver from the stack).
__ movq(RAX, FieldAddress(R10, Array::data_offset()));
__ movq(RAX, Address(RSP, RAX, TIMES_4, 0)); // RAX (argument count) is Smi.
@@ -1589,14 +1590,14 @@
}
__ Bind(&ic_miss);
- // Get receiver, again.
+ // Compute address of arguments (first read number of arguments from argument
+ // descriptor array and then compute address on the stack).
__ movq(RAX, FieldAddress(R10, Array::data_offset()));
__ leaq(RAX, Address(RSP, RAX, TIMES_4, 0)); // RAX is Smi.
__ EnterFrame(0);
__ pushq(R10); // Preserve arguments array.
__ pushq(RBX); // Preserve IC data array
__ pushq(raw_null); // Setup space on stack for result (target code object).
- __ movq(R10, FieldAddress(R10, Array::data_offset()));
// Push call arguments.
for (intptr_t i = 0; i < num_args; i++) {
__ movq(R10, Address(RAX, -kWordSize * i));
« no previous file with comments | « vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698