Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
Register holder_reg = Frontend(name);
__ push(receiver()); // receiver
__ push(holder_reg);
- __ mov(ip, Operand(callback)); // callback info
+ __ mov(ip, Operand(Smi::FromInt(accessor_index)));
__ push(ip);
__ mov(ip, Operand(name));
__ Push(ip, value());
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
ASM_LOCATION("NamedStoreHandlerCompiler::CompileStoreCallback");
Register holder_reg = Frontend(name);
// receiver() and holder_reg can alias.
DCHECK(!AreAliased(receiver(), scratch1(), scratch2(), value()));
DCHECK(!AreAliased(holder_reg, scratch1(), scratch2(), value()));
- __ Mov(scratch1(), Operand(callback));
+ __ Mov(scratch1(), Operand(Smi::FromInt(accessor_index)));
__ Mov(scratch2(), Operand(name));
__ Push(receiver(), holder_reg, scratch1(), scratch2(), value());
Handle<Name> name);
Handle<Code> CompileStoreField(LookupIterator* it);
Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback);
+ int accessor_index);
Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name,
const CallOptimization& call_optimization,
int accessor_index);
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
Register holder_reg = Frontend(name);
__ pop(scratch1()); // remove the return address
__ push(receiver());
__ push(holder_reg);
- __ Push(callback);
+ __ Push(Smi::FromInt(accessor_index));
__ Push(name);
__ push(value());
__ push(scratch1()); // restore return address
break;
}
NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
- return compiler.CompileStoreCallback(receiver, lookup->name(), info);
+ return compiler.CompileStoreCallback(receiver, lookup->name(),
+ lookup->GetAccessorIndex());
} else if (accessors->IsAccessorPair()) {
Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(),
isolate());
RUNTIME_FUNCTION(StoreCallbackProperty) {
Handle<JSObject> receiver = args.at<JSObject>(0);
Handle<JSObject> holder = args.at<JSObject>(1);
- Handle<ExecutableAccessorInfo> callback = args.at<ExecutableAccessorInfo>(2);
+ Handle<Smi> accessor_index = args.at<Smi>(2);
Handle<Name> name = args.at<Name>(3);
Handle<Object> value = args.at<Object>(4);
HandleScope scope(isolate);
+ Handle<ExecutableAccessorInfo> callback(ExecutableAccessorInfo::cast(
+ holder->map()->instance_descriptors()->GetCallbacksObject(
+ accessor_index->value())));
+
DCHECK(callback->IsCompatibleReceiver(*receiver));
Address setter_address = v8::ToCData<Address>(callback->setter());
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
Register holder_reg = Frontend(name);
__ Push(receiver(), holder_reg); // Receiver.
- __ li(at, Operand(callback)); // Callback info.
+ __ li(at, Operand(Smi::FromInt(accessor_index)));
__ push(at);
__ li(at, Operand(name));
__ Push(at, value());
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
Register holder_reg = Frontend(name);
__ Push(receiver(), holder_reg); // Receiver.
- __ li(at, Operand(callback)); // Callback info.
+ __ li(at, Operand(Smi::FromInt(accessor_index)));
__ push(at);
__ li(at, Operand(name));
__ Push(at, value());
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
Register holder_reg = Frontend(name);
__ PopReturnAddressTo(scratch1());
__ Push(receiver());
__ Push(holder_reg);
- __ Push(callback); // callback info
+ __ Push(Smi::FromInt(accessor_index));
__ Push(name);
__ Push(value());
__ PushReturnAddressFrom(scratch1());
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
- Handle<JSObject> object, Handle<Name> name,
- Handle<ExecutableAccessorInfo> callback) {
+ Handle<JSObject> object, Handle<Name> name, int accessor_index) {
Register holder_reg = Frontend(name);
__ pop(scratch1()); // remove the return address
__ push(receiver());
__ push(holder_reg);
- __ Push(callback);
+ __ Push(Smi::FromInt(accessor_index));
__ Push(name);
__ push(value());
__ push(scratch1()); // restore return address