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

Unified Diff: vm/stub_code_x64.cc

Issue 11613009: Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the re… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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
Index: vm/stub_code_x64.cc
===================================================================
--- vm/stub_code_x64.cc (revision 16285)
+++ vm/stub_code_x64.cc (working copy)
@@ -703,7 +703,7 @@
// RSP : points to return address.
// RDI : entrypoint of the Dart function to call.
// RSI : arguments descriptor array.
-// RDX : pointer to the argument array.
+// RDX : arguments array.
// RCX : new context containing the current isolate pointer.
void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
// Save frame pointer coming in.
@@ -757,6 +757,10 @@
__ movq(RBX, FieldAddress(R10, ArgumentsDescriptor::count_offset()));
__ SmiUntag(RBX);
+ // Compute address of 'arguments array' data area into RDX.
+ __ movq(RDX, Address(RDX, VMHandles::kOffsetOfRawPtrInHandle));
+ __ leaq(RDX, FieldAddress(RDX, Array::data_offset()));
+
// Set up arguments for the Dart call.
Label push_arguments;
Label done_push_arguments;
@@ -765,7 +769,6 @@
__ movq(RAX, Immediate(0));
__ Bind(&push_arguments);
__ movq(RCX, Address(RDX, RAX, TIMES_8, 0)); // RDX is start of arguments.
- __ movq(RCX, Address(RCX, VMHandles::kOffsetOfRawPtrInHandle));
__ pushq(RCX);
__ incq(RAX);
__ cmpq(RAX, RBX);
« vm/dart_entry.h ('K') | « vm/stub_code_ia32_test.cc ('k') | vm/stub_code_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698