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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 8528010: Changes to pass the current isolate to all runtime and native calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 1496)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -30,6 +30,7 @@
// EDX : number of arguments to the call.
// Must preserve callee saved registers EDI and EBX.
static void GenerateCallRuntimeStub(Assembler* assembler) {
+ const intptr_t isolate_offset = NativeArguments::isolate_offset();
const intptr_t argc_offset = NativeArguments::argc_offset();
const intptr_t argv_offset = NativeArguments::argv_offset();
const intptr_t retval_offset = NativeArguments::retval_offset();
@@ -56,6 +57,7 @@
}
// Pass NativeArguments structure by value and call runtime.
+ __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
__ movl(Address(ESP, argc_offset), EDX); // Set argc in NativeArguments.
__ leal(EAX, Address(EBP, EDX, TIMES_4, 1 * kWordSize)); // Compute argv.
__ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
@@ -118,6 +120,8 @@
// Uses EDI.
void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
const intptr_t native_args_struct_offset = kWordSize;
+ const intptr_t isolate_offset =
+ NativeArguments::isolate_offset() + native_args_struct_offset;
const intptr_t argc_offset =
NativeArguments::argc_offset() + native_args_struct_offset;
const intptr_t argv_offset =
@@ -149,6 +153,7 @@
}
// Pass NativeArguments structure by value and call runtime.
+ __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
__ movl(Address(ESP, argc_offset), EDX); // Set argc in NativeArguments.
__ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
__ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr.
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698