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

Unified Diff: vm/stub_code_ia32.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_ia32.cc
===================================================================
--- vm/stub_code_ia32.cc (revision 16285)
+++ vm/stub_code_ia32.cc (working copy)
@@ -714,7 +714,7 @@
// ESP : points to return address.
// ESP + 4 : entrypoint of the dart function to call.
// ESP + 8 : arguments descriptor array.
-// ESP + 12 : pointer to the argument array.
+// ESP + 12 : arguments array.
// ESP + 16 : new context containing the current isolate pointer.
// Uses EAX, EDX, ECX, EDI as temporary registers.
void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
@@ -774,10 +774,14 @@
__ testl(EBX, EBX); // check if there are arguments.
__ j(ZERO, &done_push_arguments, Assembler::kNearJump);
__ movl(EAX, Immediate(0));
- __ movl(EDI, Address(EBP, kArgumentsOffset)); // start of arguments.
+
+ // Compute address of 'arguments array' data area into EDI.
+ __ movl(EDI, Address(EBP, kArgumentsOffset));
+ __ movl(EDI, Address(EDI, VMHandles::kOffsetOfRawPtrInHandle));
+ __ leal(EDI, FieldAddress(EDI, Array::data_offset()));
+
__ Bind(&push_arguments);
__ movl(ECX, Address(EDI, EAX, TIMES_4, 0));
- __ movl(ECX, Address(ECX, VMHandles::kOffsetOfRawPtrInHandle));
__ pushl(ECX);
__ incl(EAX);
__ cmpl(EAX, EBX);
« vm/dart_entry.h ('K') | « vm/resolver_test.cc ('k') | vm/stub_code_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698