Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 691e9a63668c03a3ad8d91e8a36e26227627b3ea..3906623a586a17e4e71c0d8ecbfc6244c60e02dd 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -469,11 +469,12 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
// (first fast api call extra argument) |
// -- esp[12] : api call data |
// -- esp[16] : isolate |
- // -- esp[20] : ReturnValue |
- // -- esp[24] : last argument |
+ // -- esp[20] : ReturnValue default value |
+ // -- esp[24] : ReturnValue |
+ // -- esp[28] : last argument |
// -- ... |
- // -- esp[(argc + 5) * 4] : first argument |
- // -- esp[(argc + 6) * 4] : receiver |
+ // -- esp[(argc + 6) * 4] : first argument |
+ // -- esp[(argc + 7) * 4] : receiver |
// ----------------------------------- |
// Get the function and setup the context. |
Handle<JSFunction> function = optimization.constant_function(); |
@@ -495,9 +496,11 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
Immediate(reinterpret_cast<int>(masm->isolate()))); |
__ mov(Operand(esp, 5 * kPointerSize), |
masm->isolate()->factory()->undefined_value()); |
+ __ mov(Operand(esp, 6 * kPointerSize), |
+ masm->isolate()->factory()->undefined_value()); |
// Prepare arguments. |
- STATIC_ASSERT(kFastApiCallArguments == 5); |
+ STATIC_ASSERT(kFastApiCallArguments == 6); |
__ lea(eax, Operand(esp, kFastApiCallArguments * kPointerSize)); |
const int kApiArgc = 1; // API function gets reference to the v8::Arguments. |
@@ -1387,6 +1390,8 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
__ push(Immediate(Handle<Object>(callback->data(), isolate()))); |
} |
__ push(Immediate(isolate()->factory()->undefined_value())); // ReturnValue |
+ // ReturnValue default value |
+ __ push(Immediate(isolate()->factory()->undefined_value())); |
__ push(Immediate(reinterpret_cast<int>(isolate()))); |
// Save a pointer to where we pushed the arguments pointer. This will be |
@@ -1420,7 +1425,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
__ CallApiFunctionAndReturn(getter_address, |
kStackSpace, |
returns_handle, |
- 5); |
+ 6); |
} |