Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index e554a31c7166b3bd8055ac8253c48f213ae6a9d9..5e61ffcfa12457c2848b5fc02d0be20fa38b9831 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -276,14 +276,15 @@ static void PushInterceptorArguments(MacroAssembler* masm, |
Register holder, |
Register name, |
JSObject* holder_obj) { |
- __ push(receiver); |
- __ push(holder); |
__ push(name); |
InterceptorInfo* interceptor = holder_obj->GetNamedInterceptor(); |
ASSERT(!Heap::InNewSpace(interceptor)); |
- __ mov(receiver, Immediate(Handle<Object>(interceptor))); |
+ Register scratch = name; |
+ __ mov(scratch, Immediate(Handle<Object>(interceptor))); |
+ __ push(scratch); |
__ push(receiver); |
- __ push(FieldOperand(receiver, InterceptorInfo::kDataOffset)); |
+ __ push(holder); |
+ __ push(FieldOperand(scratch, InterceptorInfo::kDataOffset)); |
} |
@@ -1045,17 +1046,16 @@ bool StubCompiler::GenerateLoadCallback(JSObject* object, |
__ push(receiver); // receiver |
__ push(reg); // holder |
__ mov(other, Immediate(callback_handle)); |
- __ push(other); |
__ push(FieldOperand(other, AccessorInfo::kDataOffset)); // data |
__ push(name_reg); // name |
// Save a pointer to where we pushed the arguments pointer. |
- // This will be passed as the const Arguments& to the C++ callback. |
+ // This will be passed as the const AccessorInfo& to the C++ callback. |
__ mov(eax, esp); |
- __ add(Operand(eax), Immediate(5 * kPointerSize)); |
+ __ add(Operand(eax), Immediate(4 * kPointerSize)); |
antonm
2010/03/25 14:40:53
could we use some named constant for this 4?
Vitaly Repeshko
2010/03/25 17:08:56
This is a local thing: it's the depth of the argum
|
__ mov(ebx, esp); |
// Do call through the api. |
- ASSERT_EQ(6, ApiGetterEntryStub::kStackSpace); |
+ ASSERT_EQ(5, ApiGetterEntryStub::kStackSpace); |
antonm
2010/03/25 14:40:53
do you I understand it right, this is not ported t
Vitaly Repeshko
2010/03/25 17:08:56
Right, this is not ported to other platforms and I
|
Address getter_address = v8::ToCData<Address>(callback->getter()); |
ApiFunction fun(getter_address); |
ApiGetterEntryStub stub(callback_handle, &fun); |