Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 9aa7baec095f1ba7877b74169b8eeed4ad54c484..e90810e378c3fcd142aec32b8a50b9f0678d2528 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -1261,7 +1261,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( |
Handle<JSObject> holder, |
Handle<Name> name, |
Label* success, |
- Handle<ExecutableAccessorInfo> callback) { |
+ Handle<Object> callback) { |
Label miss; |
Register reg = HandlerFrontendHeader(object, object_reg, holder, name, &miss); |
@@ -1355,6 +1355,28 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg, |
void BaseLoadStubCompiler::GenerateLoadCallback( |
+ const CallOptimization& call_optimization) { |
+ ASSERT(call_optimization.is_simple_api_call()); |
+ |
+ // Copy return value. |
+ __ mov(scratch3(), Operand(esp, 0)); |
+ // Assign stack space for the call arguments. |
+ __ sub(esp, Immediate((kFastApiCallArguments + 1) * kPointerSize)); |
+ // Move the return address on top of the stack. |
+ __ mov(Operand(esp, 0), scratch3()); |
+ |
+ int argc = 0; |
+ int api_call_argc = argc + kFastApiCallArguments; |
+ // Write holder to stack frame. |
+ __ mov(Operand(esp, 1 * kPointerSize), receiver()); |
+ // Write receiver to stack frame. |
+ __ mov(Operand(esp, (api_call_argc + 1) * kPointerSize), receiver()); |
+ |
+ GenerateFastApiCall(masm(), call_optimization, argc); |
+} |
+ |
+ |
+void BaseLoadStubCompiler::GenerateLoadCallback( |
Register reg, |
Handle<ExecutableAccessorInfo> callback) { |
// Insert additional parameters into the stack frame above return address. |