Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index bcf64ce0d49b82aa5f374182f2724742fc1cde8a..5f3e01a0a97846c05fe76d51ec6c48da64edb6e4 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -398,10 +398,14 @@ static void PushInterceptorArguments(MacroAssembler* masm, |
Register scratch = name; |
__ mov(scratch, Immediate(interceptor)); |
__ push(scratch); |
+ STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 0); |
+ STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == -1); |
+ STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == -4); |
Michael Starzinger
2013/09/11 09:55:19
See comments in stub-cache.cc about these constant
marja
2013/09/11 16:35:32
Done.
|
+ STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == -5); |
__ push(receiver); |
- __ push(holder); |
__ push(FieldOperand(scratch, InterceptorInfo::kDataOffset)); |
__ push(Immediate(reinterpret_cast<int>(masm->isolate()))); |
+ __ push(holder); |
} |
@@ -1401,12 +1405,18 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
ASSERT(!scratch3().is(reg)); |
__ pop(scratch3()); // Get return address to place it below. |
+ STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 0); |
+ STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == -1); |
+ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == -2); |
+ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == -3); |
+ STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == -4); |
+ STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == -5); |
__ push(receiver()); // receiver |
__ mov(scratch2(), esp); |
ASSERT(!scratch2().is(reg)); |
- __ push(reg); // holder |
// Push data from ExecutableAccessorInfo. |
if (isolate()->heap()->InNewSpace(callback->data())) { |
+ ASSERT(!scratch1().is(reg)); |
__ mov(scratch1(), Immediate(callback)); |
__ push(FieldOperand(scratch1(), ExecutableAccessorInfo::kDataOffset)); |
} else { |
@@ -1416,6 +1426,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
// ReturnValue default value |
__ push(Immediate(isolate()->factory()->undefined_value())); |
__ push(Immediate(reinterpret_cast<int>(isolate()))); |
+ __ push(reg); // holder |
// Save a pointer to where we pushed the arguments pointer. This will be |
// passed as the const ExecutableAccessorInfo& to the C++ callback. |
@@ -1450,7 +1461,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
thunk_address, |
ApiParameterOperand(2), |
kStackSpace, |
- 6); |
+ 7); |
} |