Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 2e13ad4285defefa324c9accefd1cb36939a717a..041574bde7da74742437df8fb1a75f69dd656269 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -406,6 +406,7 @@ static void PushInterceptorArguments(MacroAssembler* masm, |
__ push(receiver); |
__ push(holder); |
__ push(FieldOperand(scratch, InterceptorInfo::kDataOffset)); |
+ __ push(Immediate(reinterpret_cast<int>(masm->isolate()))); |
} |
@@ -419,12 +420,12 @@ static void CompileCallLoadPropertyWithInterceptor( |
__ CallExternalReference( |
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), |
masm->isolate()), |
- 5); |
+ 6); |
} |
// Number of pointers to be reserved on stack for fast API call. |
-static const int kFastApiCallArguments = 3; |
+static const int kFastApiCallArguments = 4; |
// Reserves space for the extra arguments to API function in the |
@@ -472,10 +473,11 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
// -- esp[8] : api function |
// (first fast api call extra argument) |
// -- esp[12] : api call data |
- // -- esp[16] : last argument |
+ // -- esp[16] : isolate |
+ // -- esp[20] : last argument |
// -- ... |
- // -- esp[(argc + 3) * 4] : first argument |
- // -- esp[(argc + 4) * 4] : receiver |
+ // -- esp[(argc + 4) * 4] : first argument |
+ // -- esp[(argc + 5) * 4] : receiver |
// ----------------------------------- |
// Get the function and setup the context. |
Handle<JSFunction> function = optimization.constant_function(); |
@@ -493,9 +495,11 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
} else { |
__ mov(Operand(esp, 3 * kPointerSize), Immediate(call_data)); |
} |
+ __ mov(Operand(esp, 4 * kPointerSize), |
+ Immediate(reinterpret_cast<int>(masm->isolate()))); |
// Prepare arguments. |
- __ lea(eax, Operand(esp, 3 * kPointerSize)); |
+ __ lea(eax, Operand(esp, 4 * kPointerSize)); |
const int kApiArgc = 1; // API function gets reference to the v8::Arguments. |
@@ -679,7 +683,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { |
__ CallExternalReference( |
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall), |
masm->isolate()), |
- 5); |
+ 6); |
// Restore the name_ register. |
__ pop(name_); |
@@ -1032,6 +1036,7 @@ void StubCompiler::GenerateLoadCallback(Handle<JSObject> object, |
} else { |
__ push(Immediate(Handle<Object>(callback->data()))); |
} |
+ __ push(Immediate(reinterpret_cast<int>(isolate()))); |
// Save a pointer to where we pushed the arguments pointer. |
// This will be passed as the const AccessorInfo& to the C++ callback. |
@@ -1042,9 +1047,9 @@ void StubCompiler::GenerateLoadCallback(Handle<JSObject> object, |
__ push(scratch3); // Restore return address. |
- // 3 elements array for v8::Arguments::values_, handler for name and pointer |
+ // 4 elements array for v8::Arguments::values_, handler for name and pointer |
// to the values (it considered as smi in GC). |
- const int kStackSpace = 5; |
+ const int kStackSpace = 6; |
const int kApiArgc = 2; |
__ PrepareCallApiFunction(kApiArgc); |
@@ -1197,6 +1202,7 @@ void StubCompiler::GenerateLoadInterceptor(Handle<JSObject> object, |
__ push(holder_reg); |
__ mov(holder_reg, Immediate(callback)); |
__ push(FieldOperand(holder_reg, AccessorInfo::kDataOffset)); |
+ __ push(Immediate(reinterpret_cast<int>(isolate()))); |
__ push(holder_reg); |
__ push(name_reg); |
__ push(scratch2); // restore return address |
@@ -1204,7 +1210,7 @@ void StubCompiler::GenerateLoadInterceptor(Handle<JSObject> object, |
ExternalReference ref = |
ExternalReference(IC_Utility(IC::kLoadCallbackProperty), |
masm()->isolate()); |
- __ TailCallExternalReference(ref, 5, 1); |
+ __ TailCallExternalReference(ref, 6, 1); |
} |
} else { // !compile_followup_inline |
// Call the runtime system to load the interceptor. |
@@ -1220,7 +1226,7 @@ void StubCompiler::GenerateLoadInterceptor(Handle<JSObject> object, |
ExternalReference ref = |
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForLoad), |
isolate()); |
- __ TailCallExternalReference(ref, 5, 1); |
+ __ TailCallExternalReference(ref, 6, 1); |
} |
} |
@@ -2158,7 +2164,7 @@ Handle<Code> CallStubCompiler::CompileFastApiCall( |
name, depth, &miss); |
// Move the return address on top of the stack. |
- __ mov(eax, Operand(esp, 3 * kPointerSize)); |
+ __ mov(eax, Operand(esp, 4 * kPointerSize)); |
__ mov(Operand(esp, 0 * kPointerSize), eax); |
// esp[2 * kPointerSize] is uninitialized, esp[3 * kPointerSize] contains |