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

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 4456002: Direct call API functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
Index: src/ia32/code-stubs-ia32.cc
===================================================================
--- src/ia32/code-stubs-ia32.cc (revision 5789)
+++ src/ia32/code-stubs-ia32.cc (working copy)
@@ -3067,6 +3067,26 @@
}
+void ApiCallEntryStub::Generate(MacroAssembler* masm) {
+ __ PrepareCallApiFunction(kStackSpace, kArgc);
+ STATIC_ASSERT(kArgc == 5);
+
+ // Allocate the v8::Arguments structure in the arguments' space since
+ // it's not controlled by GC.
+ __ mov(ApiParameterOperand(1), eax); // v8::Arguments::implicit_args_.
+ __ mov(ApiParameterOperand(2), ebx); // v8::Arguments::values_.
+ __ mov(ApiParameterOperand(3), edx); // v8::Arguments::length_.
+ // v8::Arguments::is_construct_call_.
+ __ mov(ApiParameterOperand(4), Immediate(0));
+
+ // v8::InvocationCallback's argument.
+ __ lea(eax, ApiParameterOperand(1));
+ __ mov(ApiParameterOperand(0), eax);
+
+ __ CallApiFunctionAndReturn(fun(), kArgc);
+}
+
+
void CEntryStub::GenerateCore(MacroAssembler* masm,
Label* throw_normal_exception,
Label* throw_termination_exception,

Powered by Google App Engine
This is Rietveld 408576698