Revert "Refactoring PropertyCallbackInfo & FunctionCallbackInfo, step 1."

TBR=marja@chromium.org

Review URL: https://codereview.chromium.org/23431019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent fa2ad975
...@@ -2407,11 +2407,11 @@ class PropertyCallbackInfo { ...@@ -2407,11 +2407,11 @@ class PropertyCallbackInfo {
friend class internal::PropertyCallbackArguments; friend class internal::PropertyCallbackArguments;
friend class internal::CustomArguments<PropertyCallbackInfo>; friend class internal::CustomArguments<PropertyCallbackInfo>;
static const int kThisIndex = 0; static const int kThisIndex = 0;
static const int kDataIndex = -1; static const int kHolderIndex = -1;
static const int kReturnValueIndex = -2; static const int kDataIndex = -2;
static const int kReturnValueDefaultValueIndex = -3; static const int kReturnValueIndex = -3;
static const int kIsolateIndex = -4; static const int kReturnValueDefaultValueIndex = -4;
static const int kHolderIndex = -5; static const int kIsolateIndex = -5;
V8_INLINE PropertyCallbackInfo(internal::Object** args) : args_(args) {} V8_INLINE PropertyCallbackInfo(internal::Object** args) : args_(args) {}
internal::Object** args_; internal::Object** args_;
......
...@@ -175,10 +175,6 @@ class PropertyCallbackArguments ...@@ -175,10 +175,6 @@ class PropertyCallbackArguments
static const int kArgsLength = T::kArgsLength; static const int kArgsLength = T::kArgsLength;
static const int kThisIndex = T::kThisIndex; static const int kThisIndex = T::kThisIndex;
static const int kHolderIndex = T::kHolderIndex; static const int kHolderIndex = T::kHolderIndex;
static const int kDataIndex = T::kDataIndex;
static const int kReturnValueDefaultValueIndex =
T::kReturnValueDefaultValueIndex;
static const int kIsolateIndex = T::kIsolateIndex;
PropertyCallbackArguments(Isolate* isolate, PropertyCallbackArguments(Isolate* isolate,
Object* data, Object* data,
......
...@@ -785,11 +785,6 @@ static void PushInterceptorArguments(MacroAssembler* masm, ...@@ -785,11 +785,6 @@ static void PushInterceptorArguments(MacroAssembler* masm,
Register holder, Register holder,
Register name, Register name,
Handle<JSObject> holder_obj) { Handle<JSObject> holder_obj) {
STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0);
STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1);
STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2);
STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3);
STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4);
__ push(name); __ push(name);
Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
...@@ -798,6 +793,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, ...@@ -798,6 +793,10 @@ static void PushInterceptorArguments(MacroAssembler* masm,
__ push(scratch); __ push(scratch);
__ push(receiver); __ push(receiver);
__ push(holder); __ push(holder);
__ ldr(scratch, FieldMemOperand(scratch, InterceptorInfo::kDataOffset));
__ push(scratch);
__ mov(scratch, Operand(ExternalReference::isolate_address(masm->isolate())));
__ push(scratch);
} }
...@@ -812,7 +811,7 @@ static void CompileCallLoadPropertyWithInterceptor( ...@@ -812,7 +811,7 @@ static void CompileCallLoadPropertyWithInterceptor(
ExternalReference ref = ExternalReference ref =
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly),
masm->isolate()); masm->isolate());
__ mov(r0, Operand(StubCache::kInterceptorArgsLength)); __ mov(r0, Operand(6));
__ mov(r1, Operand(ref)); __ mov(r1, Operand(ref));
CEntryStub stub(1); CEntryStub stub(1);
...@@ -1111,7 +1110,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1111,7 +1110,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
__ CallExternalReference( __ CallExternalReference(
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall),
masm->isolate()), masm->isolate()),
StubCache::kInterceptorArgsLength); 6);
// Restore the name_ register. // Restore the name_ register.
__ pop(name_); __ pop(name_);
// Leave the internal frame. // Leave the internal frame.
...@@ -1421,12 +1420,6 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1421,12 +1420,6 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
// Build AccessorInfo::args_ list on the stack and push property name below // Build AccessorInfo::args_ list on the stack and push property name below
// the exit frame to make GC aware of them and store pointers to them. // the exit frame to make GC aware of them and store pointers to them.
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()); __ push(receiver());
__ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_
if (heap()->InNewSpace(callback->data())) { if (heap()->InNewSpace(callback->data())) {
...@@ -1436,13 +1429,13 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1436,13 +1429,13 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
} else { } else {
__ Move(scratch3(), Handle<Object>(callback->data(), isolate())); __ Move(scratch3(), Handle<Object>(callback->data(), isolate()));
} }
__ push(scratch3()); __ Push(reg, scratch3());
__ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex); __ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex);
__ mov(scratch4(), scratch3()); __ mov(scratch4(), scratch3());
__ Push(scratch3(), scratch4()); __ Push(scratch3(), scratch4());
__ mov(scratch4(), __ mov(scratch4(),
Operand(ExternalReference::isolate_address(isolate()))); Operand(ExternalReference::isolate_address(isolate())));
__ Push(scratch4(), reg, name()); __ Push(scratch4(), name());
__ mov(r0, sp); // r0 = Handle<Name> __ mov(r0, sp); // r0 = Handle<Name>
const int kApiStackSpace = 1; const int kApiStackSpace = 1;
...@@ -1472,7 +1465,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1472,7 +1465,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
thunk_ref, thunk_ref,
r2, r2,
kStackUnwindSpace, kStackUnwindSpace,
6); 5);
} }
...@@ -1560,7 +1553,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor( ...@@ -1560,7 +1553,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor(
ExternalReference ref = ExternalReference ref =
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForLoad), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForLoad),
isolate()); isolate());
__ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); __ TailCallExternalReference(ref, 6, 1);
} }
} }
......
...@@ -392,11 +392,6 @@ static void PushInterceptorArguments(MacroAssembler* masm, ...@@ -392,11 +392,6 @@ static void PushInterceptorArguments(MacroAssembler* masm,
Register holder, Register holder,
Register name, Register name,
Handle<JSObject> holder_obj) { Handle<JSObject> holder_obj) {
STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0);
STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1);
STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2);
STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3);
STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4);
__ push(name); __ push(name);
Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
...@@ -405,6 +400,8 @@ static void PushInterceptorArguments(MacroAssembler* masm, ...@@ -405,6 +400,8 @@ static void PushInterceptorArguments(MacroAssembler* masm,
__ push(scratch); __ push(scratch);
__ push(receiver); __ push(receiver);
__ push(holder); __ push(holder);
__ push(FieldOperand(scratch, InterceptorInfo::kDataOffset));
__ push(Immediate(reinterpret_cast<int>(masm->isolate())));
} }
...@@ -418,7 +415,7 @@ static void CompileCallLoadPropertyWithInterceptor( ...@@ -418,7 +415,7 @@ static void CompileCallLoadPropertyWithInterceptor(
__ CallExternalReference( __ CallExternalReference(
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly),
masm->isolate()), masm->isolate()),
StubCache::kInterceptorArgsLength); 6);
} }
...@@ -736,7 +733,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -736,7 +733,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
__ CallExternalReference( __ CallExternalReference(
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall),
masm->isolate()), masm->isolate()),
StubCache::kInterceptorArgsLength); 6);
// Restore the name_ register. // Restore the name_ register.
__ pop(name_); __ pop(name_);
...@@ -1404,18 +1401,12 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1404,18 +1401,12 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
ASSERT(!scratch3().is(reg)); ASSERT(!scratch3().is(reg));
__ pop(scratch3()); // Get return address to place it below. __ 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 __ push(receiver()); // receiver
__ mov(scratch2(), esp); __ mov(scratch2(), esp);
ASSERT(!scratch2().is(reg)); ASSERT(!scratch2().is(reg));
__ push(reg); // holder
// Push data from ExecutableAccessorInfo. // Push data from ExecutableAccessorInfo.
if (isolate()->heap()->InNewSpace(callback->data())) { if (isolate()->heap()->InNewSpace(callback->data())) {
ASSERT(!scratch1().is(reg));
__ mov(scratch1(), Immediate(callback)); __ mov(scratch1(), Immediate(callback));
__ push(FieldOperand(scratch1(), ExecutableAccessorInfo::kDataOffset)); __ push(FieldOperand(scratch1(), ExecutableAccessorInfo::kDataOffset));
} else { } else {
...@@ -1425,7 +1416,6 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1425,7 +1416,6 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
// ReturnValue default value // ReturnValue default value
__ push(Immediate(isolate()->factory()->undefined_value())); __ push(Immediate(isolate()->factory()->undefined_value()));
__ push(Immediate(reinterpret_cast<int>(isolate()))); __ push(Immediate(reinterpret_cast<int>(isolate())));
__ push(reg); // holder
// Save a pointer to where we pushed the arguments pointer. This will be // Save a pointer to where we pushed the arguments pointer. This will be
// passed as the const ExecutableAccessorInfo& to the C++ callback. // passed as the const ExecutableAccessorInfo& to the C++ callback.
...@@ -1460,7 +1450,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1460,7 +1450,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
thunk_address, thunk_address,
ApiParameterOperand(2), ApiParameterOperand(2),
kStackSpace, kStackSpace,
7); 6);
} }
...@@ -1567,7 +1557,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor( ...@@ -1567,7 +1557,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor(
ExternalReference ref = ExternalReference ref =
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForLoad), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForLoad),
isolate()); isolate());
__ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); __ TailCallExternalReference(ref, 6, 1);
} }
} }
......
...@@ -1249,6 +1249,9 @@ RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty) { ...@@ -1249,6 +1249,9 @@ RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty) {
} }
static const int kAccessorInfoOffsetInInterceptorArgs = 2;
/** /**
* Attempts to load a property with an interceptor (which must be present), * Attempts to load a property with an interceptor (which must be present),
* but doesn't search the prototype chain. * but doesn't search the prototype chain.
...@@ -1257,11 +1260,13 @@ RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty) { ...@@ -1257,11 +1260,13 @@ RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty) {
* provide any value for the given name. * provide any value for the given name.
*/ */
RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) { RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) {
ASSERT(args.length() == StubCache::kInterceptorArgsLength); typedef PropertyCallbackArguments PCA;
Handle<Name> name_handle = static const int kArgsOffset = kAccessorInfoOffsetInInterceptorArgs;
args.at<Name>(StubCache::kInterceptorArgsNameIndex); Handle<Name> name_handle = args.at<Name>(0);
Handle<InterceptorInfo> interceptor_info = Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(1);
args.at<InterceptorInfo>(StubCache::kInterceptorArgsInfoIndex); ASSERT(kArgsOffset == 2);
// No ReturnValue in interceptors.
ASSERT_EQ(kArgsOffset + PCA::kArgsLength - 2, args.length());
// TODO(rossberg): Support symbols in the API. // TODO(rossberg): Support symbols in the API.
if (name_handle->IsSymbol()) if (name_handle->IsSymbol())
...@@ -1274,11 +1279,13 @@ RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) { ...@@ -1274,11 +1279,13 @@ RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) {
ASSERT(getter != NULL); ASSERT(getter != NULL);
Handle<JSObject> receiver = Handle<JSObject> receiver =
args.at<JSObject>(StubCache::kInterceptorArgsThisIndex); args.at<JSObject>(kArgsOffset - PCA::kThisIndex);
Handle<JSObject> holder = Handle<JSObject> holder =
args.at<JSObject>(StubCache::kInterceptorArgsHolderIndex); args.at<JSObject>(kArgsOffset - PCA::kHolderIndex);
PropertyCallbackArguments callback_args( PropertyCallbackArguments callback_args(isolate,
isolate, interceptor_info->data(), *receiver, *holder); interceptor_info->data(),
*receiver,
*holder);
{ {
// Use the interceptor getter. // Use the interceptor getter.
HandleScope scope(isolate); HandleScope scope(isolate);
...@@ -1316,15 +1323,17 @@ static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) { ...@@ -1316,15 +1323,17 @@ static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) {
static MaybeObject* LoadWithInterceptor(Arguments* args, static MaybeObject* LoadWithInterceptor(Arguments* args,
PropertyAttributes* attrs) { PropertyAttributes* attrs) {
ASSERT(args->length() == StubCache::kInterceptorArgsLength); typedef PropertyCallbackArguments PCA;
Handle<Name> name_handle = static const int kArgsOffset = kAccessorInfoOffsetInInterceptorArgs;
args->at<Name>(StubCache::kInterceptorArgsNameIndex); Handle<Name> name_handle = args->at<Name>(0);
Handle<InterceptorInfo> interceptor_info = Handle<InterceptorInfo> interceptor_info = args->at<InterceptorInfo>(1);
args->at<InterceptorInfo>(StubCache::kInterceptorArgsInfoIndex); ASSERT(kArgsOffset == 2);
// No ReturnValue in interceptors.
ASSERT_EQ(kArgsOffset + PCA::kArgsLength - 2, args->length());
Handle<JSObject> receiver_handle = Handle<JSObject> receiver_handle =
args->at<JSObject>(StubCache::kInterceptorArgsThisIndex); args->at<JSObject>(kArgsOffset - PCA::kThisIndex);
Handle<JSObject> holder_handle = Handle<JSObject> holder_handle =
args->at<JSObject>(StubCache::kInterceptorArgsHolderIndex); args->at<JSObject>(kArgsOffset - PCA::kHolderIndex);
Isolate* isolate = receiver_handle->GetIsolate(); Isolate* isolate = receiver_handle->GetIsolate();
......
...@@ -408,16 +408,6 @@ class StubCache { ...@@ -408,16 +408,6 @@ class StubCache {
Heap* heap() { return isolate()->heap(); } Heap* heap() { return isolate()->heap(); }
Factory* factory() { return isolate()->factory(); } Factory* factory() { return isolate()->factory(); }
// These constants describe the structure of the interceptor arguments on the
// stack. The arguments are pushed by the (platform-specific)
// PushInterceptorArguments and read by LoadPropertyWithInterceptorOnly and
// LoadWithInterceptor.
static const int kInterceptorArgsNameIndex = 0;
static const int kInterceptorArgsInfoIndex = 1;
static const int kInterceptorArgsThisIndex = 2;
static const int kInterceptorArgsHolderIndex = 3;
static const int kInterceptorArgsLength = 4;
private: private:
explicit StubCache(Isolate* isolate); explicit StubCache(Isolate* isolate);
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#if V8_TARGET_ARCH_X64 #if V8_TARGET_ARCH_X64
#include "arguments.h"
#include "ic-inl.h" #include "ic-inl.h"
#include "codegen.h" #include "codegen.h"
#include "stub-cache.h" #include "stub-cache.h"
...@@ -367,11 +366,6 @@ static void PushInterceptorArguments(MacroAssembler* masm, ...@@ -367,11 +366,6 @@ static void PushInterceptorArguments(MacroAssembler* masm,
Register holder, Register holder,
Register name, Register name,
Handle<JSObject> holder_obj) { Handle<JSObject> holder_obj) {
STATIC_ASSERT(StubCache::kInterceptorArgsNameIndex == 0);
STATIC_ASSERT(StubCache::kInterceptorArgsInfoIndex == 1);
STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2);
STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3);
STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4);
__ push(name); __ push(name);
Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
...@@ -379,6 +373,8 @@ static void PushInterceptorArguments(MacroAssembler* masm, ...@@ -379,6 +373,8 @@ static void PushInterceptorArguments(MacroAssembler* masm,
__ push(kScratchRegister); __ push(kScratchRegister);
__ push(receiver); __ push(receiver);
__ push(holder); __ push(holder);
__ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset));
__ PushAddress(ExternalReference::isolate_address(masm->isolate()));
} }
...@@ -393,7 +389,7 @@ static void CompileCallLoadPropertyWithInterceptor( ...@@ -393,7 +389,7 @@ static void CompileCallLoadPropertyWithInterceptor(
ExternalReference ref = ExternalReference ref =
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly),
masm->isolate()); masm->isolate());
__ Set(rax, StubCache::kInterceptorArgsLength); __ Set(rax, 6);
__ LoadAddress(rbx, ref); __ LoadAddress(rbx, ref);
CEntryStub stub(1); CEntryStub stub(1);
...@@ -723,7 +719,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -723,7 +719,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
__ CallExternalReference( __ CallExternalReference(
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall), ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall),
masm->isolate()), masm->isolate()),
StubCache::kInterceptorArgsLength); 6);
// Restore the name_ register. // Restore the name_ register.
__ pop(name_); __ pop(name_);
...@@ -1326,27 +1322,19 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1326,27 +1322,19 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
ASSERT(!scratch4().is(reg)); ASSERT(!scratch4().is(reg));
__ PopReturnAddressTo(scratch4()); __ PopReturnAddressTo(scratch4());
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 __ push(receiver()); // receiver
__ push(reg); // holder
if (heap()->InNewSpace(callback->data())) { if (heap()->InNewSpace(callback->data())) {
ASSERT(!scratch1().is(reg));
__ Move(scratch1(), callback); __ Move(scratch1(), callback);
__ push(FieldOperand(scratch1(), __ push(FieldOperand(scratch1(),
ExecutableAccessorInfo::kDataOffset)); // data ExecutableAccessorInfo::kDataOffset)); // data
} else { } else {
__ Push(Handle<Object>(callback->data(), isolate())); __ Push(Handle<Object>(callback->data(), isolate()));
} }
ASSERT(!kScratchRegister.is(reg));
__ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex); __ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex);
__ push(kScratchRegister); // return value __ push(kScratchRegister); // return value
__ push(kScratchRegister); // return value default __ push(kScratchRegister); // return value default
__ PushAddress(ExternalReference::isolate_address(isolate())); __ PushAddress(ExternalReference::isolate_address(isolate()));
__ push(reg); // holder
__ push(name()); // name __ push(name()); // name
// Save a pointer to where we pushed the arguments pointer. This will be // Save a pointer to where we pushed the arguments pointer. This will be
// passed as the const ExecutableAccessorInfo& to the C++ callback. // passed as the const ExecutableAccessorInfo& to the C++ callback.
...@@ -1390,7 +1378,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1390,7 +1378,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
thunk_address, thunk_address,
getter_arg, getter_arg,
kStackSpace, kStackSpace,
6); 5);
} }
...@@ -1489,7 +1477,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor( ...@@ -1489,7 +1477,7 @@ void BaseLoadStubCompiler::GenerateLoadInterceptor(
ExternalReference ref = ExternalReference( ExternalReference ref = ExternalReference(
IC_Utility(IC::kLoadPropertyWithInterceptorForLoad), isolate()); IC_Utility(IC::kLoadPropertyWithInterceptorForLoad), isolate());
__ TailCallExternalReference(ref, StubCache::kInterceptorArgsLength, 1); __ TailCallExternalReference(ref, 6, 1);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment