Commit 15b29036 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[ic] Remove dead accessor info support from LoadIC::CompileHandler

BUG=

Change-Id: Ib7d6f1c8cc20f4170607d4f595756a534e3eceb8
Reviewed-on: https://chromium-review.googlesource.com/452382
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43770}
parent 818769db
......@@ -95,24 +95,6 @@ Register PropertyHandlerCompiler::Frontend(Handle<Name> name) {
return reg;
}
Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) {
if (V8_UNLIKELY(FLAG_runtime_stats)) {
GenerateTailCall(masm(), slow_stub);
}
Register reg = Frontend(name);
DCHECK(receiver().is(ApiGetterDescriptor::ReceiverRegister()));
__ Move(ApiGetterDescriptor::HolderRegister(), reg);
// The callback is alive if this instruction is executed,
// so the weak cell is not cleared and points to data.
Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback);
__ GetWeakValue(ApiGetterDescriptor::CallbackRegister(), cell);
CallApiGetterStub stub(isolate());
__ TailCallStub(&stub);
return GetCode(kind(), name);
}
Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
Handle<Name> name, const CallOptimization& call_optimization,
int accessor_index, Handle<Code> slow_stub) {
......
......@@ -129,10 +129,6 @@ class NamedLoadHandlerCompiler : public PropertyHandlerCompiler {
virtual ~NamedLoadHandlerCompiler() {}
Handle<Code> CompileLoadCallback(Handle<Name> name,
Handle<AccessorInfo> callback,
Handle<Code> slow_stub);
Handle<Code> CompileLoadCallback(Handle<Name> name,
const CallOptimization& call_optimization,
int accessor_index, Handle<Code> slow_stub);
......
......@@ -1374,12 +1374,9 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterDH);
return smi_handler;
}
if (!IsLoadGlobalIC()) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterFromPrototypeDH);
return LoadFromPrototype(map, holder, lookup->name(), smi_handler);
}
break; // Custom-compiled handler.
}
}
TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub);
return slow_stub();
......@@ -1463,7 +1460,7 @@ Handle<Object> LoadIC::CompileHandler(LookupIterator* lookup,
DCHECK(IsCompatibleReceiver(lookup, map));
Handle<Object> accessors = lookup->GetAccessors();
if (accessors->IsAccessorPair()) {
DCHECK(accessors->IsAccessorPair());
if (lookup->TryLookupCachedProperty()) {
DCHECK_EQ(LookupIterator::DATA, lookup->state());
return ComputeHandler(lookup);
......@@ -1487,21 +1484,6 @@ Handle<Object> LoadIC::CompileHandler(LookupIterator* lookup,
->internal_formal_parameter_count();
return compiler.CompileLoadViaGetter(
lookup->name(), lookup->GetAccessorIndex(), expected_arguments);
} else {
DCHECK(accessors->IsAccessorInfo());
Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors);
DCHECK(v8::ToCData<Address>(info->getter()) != nullptr);
DCHECK(AccessorInfo::IsCompatibleReceiverMap(isolate(), info, map));
DCHECK(holder->HasFastProperties());
DCHECK(!receiver_is_holder);
DCHECK(!info->is_sloppy() || receiver->IsJSReceiver());
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadCallback);
NamedLoadHandlerCompiler compiler(isolate(), map, holder, cache_holder);
Handle<Code> code =
compiler.CompileLoadCallback(lookup->name(), info, slow_stub());
return code;
}
UNREACHABLE();
}
case LookupIterator::DATA: {
......
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