Commit 455c244c authored by danno's avatar danno Committed by Commit bot

[ics]: Remove deprecated support for patching LoadICs and StoreICs

Review-Url: https://codereview.chromium.org/2593033002
Cr-Commit-Position: refs/heads/master@{#41897}
parent 7c18f197
...@@ -376,25 +376,6 @@ HValue* CodeStubGraphBuilderBase::BuildPushElement(HValue* object, HValue* argc, ...@@ -376,25 +376,6 @@ HValue* CodeStubGraphBuilderBase::BuildPushElement(HValue* object, HValue* argc,
return new_length; return new_length;
} }
template <>
HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() {
LoadKeyedHoleMode hole_mode = casted_stub()->convert_hole_to_undefined()
? CONVERT_HOLE_TO_UNDEFINED
: NEVER_RETURN_HOLE;
HInstruction* load = BuildUncheckedMonomorphicElementAccess(
GetParameter(Descriptor::kReceiver), GetParameter(Descriptor::kName),
NULL, casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD,
hole_mode, STANDARD_STORE);
return load;
}
Handle<Code> LoadFastElementStub::GenerateCode() {
return DoGenerateCode(this);
}
HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField( HLoadNamedField* CodeStubGraphBuilderBase::BuildLoadNamedField(
HValue* object, FieldIndex index) { HValue* object, FieldIndex index) {
Representation representation = index.is_double() Representation representation = index.is_double()
...@@ -799,24 +780,5 @@ HValue* CodeStubGraphBuilder<ToBooleanICStub>::BuildCodeInitializedStub() { ...@@ -799,24 +780,5 @@ HValue* CodeStubGraphBuilder<ToBooleanICStub>::BuildCodeInitializedStub() {
Handle<Code> ToBooleanICStub::GenerateCode() { return DoGenerateCode(this); } Handle<Code> ToBooleanICStub::GenerateCode() { return DoGenerateCode(this); }
template <>
HValue* CodeStubGraphBuilder<LoadDictionaryElementStub>::BuildCodeStub() {
HValue* receiver = GetParameter(Descriptor::kReceiver);
HValue* key = GetParameter(Descriptor::kName);
Add<HCheckSmi>(key);
HValue* elements = AddLoadElements(receiver);
HValue* hash = BuildElementIndexHash(key);
return BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash);
}
Handle<Code> LoadDictionaryElementStub::GenerateCode() {
return DoGenerateCode(this);
}
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -2307,12 +2307,6 @@ void JSEntryStub::FinishCode(Handle<Code> code) { ...@@ -2307,12 +2307,6 @@ void JSEntryStub::FinishCode(Handle<Code> code) {
} }
void LoadDictionaryElementStub::InitializeDescriptor(
CodeStubDescriptor* descriptor) {
descriptor->Initialize(
FUNCTION_ADDR(Runtime_KeyedLoadIC_MissFromStubFailure));
}
void HandlerStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { void HandlerStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {
DCHECK(kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC); DCHECK(kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC);
if (kind() == Code::KEYED_LOAD_IC) { if (kind() == Code::KEYED_LOAD_IC) {
......
...@@ -68,8 +68,6 @@ class Node; ...@@ -68,8 +68,6 @@ class Node;
/* as part of the new IC system, ask */ \ /* as part of the new IC system, ask */ \
/* ishell before doing anything */ \ /* ishell before doing anything */ \
V(LoadConstant) \ V(LoadConstant) \
V(LoadDictionaryElement) \
V(LoadFastElement) \
V(LoadField) \ V(LoadField) \
/* These should never be ported to TF */ \ /* These should never be ported to TF */ \
/* because they are either used only by */ \ /* because they are either used only by */ \
...@@ -1926,15 +1924,6 @@ class StringCharAtGenerator { ...@@ -1926,15 +1924,6 @@ class StringCharAtGenerator {
}; };
class LoadDictionaryElementStub : public HydrogenCodeStub {
public:
explicit LoadDictionaryElementStub(Isolate* isolate)
: HydrogenCodeStub(isolate) {}
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
};
class LoadICTrampolineStub : public TurboFanCodeStub { class LoadICTrampolineStub : public TurboFanCodeStub {
public: public:
explicit LoadICTrampolineStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} explicit LoadICTrampolineStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
...@@ -2239,39 +2228,6 @@ class StoreScriptContextFieldStub : public ScriptContextFieldStub { ...@@ -2239,39 +2228,6 @@ class StoreScriptContextFieldStub : public ScriptContextFieldStub {
DEFINE_TURBOFAN_CODE_STUB(StoreScriptContextField, ScriptContextFieldStub); DEFINE_TURBOFAN_CODE_STUB(StoreScriptContextField, ScriptContextFieldStub);
}; };
class LoadFastElementStub : public HandlerStub {
public:
LoadFastElementStub(Isolate* isolate, bool is_js_array,
ElementsKind elements_kind,
bool convert_hole_to_undefined = false)
: HandlerStub(isolate) {
set_sub_minor_key(
ElementsKindBits::encode(elements_kind) |
IsJSArrayBits::encode(is_js_array) |
CanConvertHoleToUndefined::encode(convert_hole_to_undefined));
}
Code::Kind kind() const override { return Code::KEYED_LOAD_IC; }
bool is_js_array() const { return IsJSArrayBits::decode(sub_minor_key()); }
bool convert_hole_to_undefined() const {
return CanConvertHoleToUndefined::decode(sub_minor_key());
}
ElementsKind elements_kind() const {
return ElementsKindBits::decode(sub_minor_key());
}
private:
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 8, 1> {};
class CanConvertHoleToUndefined : public BitField<bool, 9, 1> {};
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_HANDLER_CODE_STUB(LoadFastElement, HandlerStub);
};
class StoreFastElementStub : public TurboFanCodeStub { class StoreFastElementStub : public TurboFanCodeStub {
public: public:
StoreFastElementStub(Isolate* isolate, bool is_js_array, StoreFastElementStub(Isolate* isolate, bool is_js_array,
......
...@@ -751,8 +751,6 @@ class RuntimeCallTimer final { ...@@ -751,8 +751,6 @@ class RuntimeCallTimer final {
V(KeyedLoadIC_LoadIndexedInterceptorStub) \ V(KeyedLoadIC_LoadIndexedInterceptorStub) \
V(KeyedLoadIC_KeyedLoadSloppyArgumentsStub) \ V(KeyedLoadIC_KeyedLoadSloppyArgumentsStub) \
V(KeyedLoadIC_LoadElementDH) \ V(KeyedLoadIC_LoadElementDH) \
V(KeyedLoadIC_LoadFastElementStub) \
V(KeyedLoadIC_LoadDictionaryElementStub) \
V(KeyedLoadIC_SlowStub) \ V(KeyedLoadIC_SlowStub) \
V(KeyedStoreIC_ElementsTransitionAndStoreStub) \ V(KeyedStoreIC_ElementsTransitionAndStoreStub) \
V(KeyedStoreIC_KeyedStoreSloppyArgumentsStub) \ V(KeyedStoreIC_KeyedStoreSloppyArgumentsStub) \
...@@ -779,7 +777,6 @@ class RuntimeCallTimer final { ...@@ -779,7 +777,6 @@ class RuntimeCallTimer final {
V(LoadIC_LoadFieldDH) \ V(LoadIC_LoadFieldDH) \
V(LoadIC_LoadFieldFromPrototypeDH) \ V(LoadIC_LoadFieldFromPrototypeDH) \
V(LoadIC_LoadField) \ V(LoadIC_LoadField) \
V(LoadIC_LoadFieldStub) \
V(LoadIC_LoadGlobal) \ V(LoadIC_LoadGlobal) \
V(LoadIC_LoadInterceptor) \ V(LoadIC_LoadInterceptor) \
V(LoadIC_LoadNonexistentDH) \ V(LoadIC_LoadNonexistentDH) \
......
...@@ -2797,7 +2797,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder, ...@@ -2797,7 +2797,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
friend class FunctionState; // Pushes and pops the state stack. friend class FunctionState; // Pushes and pops the state stack.
friend class AstContext; // Pushes and pops the AST context stack. friend class AstContext; // Pushes and pops the AST context stack.
friend class KeyedLoadFastElementStub;
friend class HOsrBuilder; friend class HOsrBuilder;
DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder); DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder);
......
...@@ -818,8 +818,6 @@ DEFINE_BOOL(use_ic, true, "use inline caching") ...@@ -818,8 +818,6 @@ DEFINE_BOOL(use_ic, true, "use inline caching")
DEFINE_BOOL(trace_ic, false, "trace inline cache state transitions") DEFINE_BOOL(trace_ic, false, "trace inline cache state transitions")
DEFINE_INT(ic_stats, 0, "inline cache state transitions statistics") DEFINE_INT(ic_stats, 0, "inline cache state transitions statistics")
DEFINE_VALUE_IMPLICATION(trace_ic, ic_stats, 1) DEFINE_VALUE_IMPLICATION(trace_ic, ic_stats, 1)
DEFINE_BOOL_READONLY(tf_load_ic_stub, true, "use TF LoadIC stub")
DEFINE_BOOL(tf_store_ic_stub, true, "use TF StoreIC stub")
// macro-assembler-ia32.cc // macro-assembler-ia32.cc
DEFINE_BOOL(native_code_counters, false, DEFINE_BOOL(native_code_counters, false,
......
...@@ -220,7 +220,7 @@ void FullCodeGenerator::CallLoadIC(FeedbackVectorSlot slot, ...@@ -220,7 +220,7 @@ void FullCodeGenerator::CallLoadIC(FeedbackVectorSlot slot,
Handle<Code> code = CodeFactory::LoadIC(isolate()).code(); Handle<Code> code = CodeFactory::LoadIC(isolate()).code();
__ Call(code, RelocInfo::CODE_TARGET); __ Call(code, RelocInfo::CODE_TARGET);
if (FLAG_tf_load_ic_stub) RestoreContext(); RestoreContext();
} }
void FullCodeGenerator::CallStoreIC(FeedbackVectorSlot slot, void FullCodeGenerator::CallStoreIC(FeedbackVectorSlot slot,
......
...@@ -640,13 +640,8 @@ Handle<Object> ElementHandlerCompiler::GetKeyedLoadHandler( ...@@ -640,13 +640,8 @@ Handle<Object> ElementHandlerCompiler::GetKeyedLoadHandler(
} }
bool is_js_array = instance_type == JS_ARRAY_TYPE; bool is_js_array = instance_type == JS_ARRAY_TYPE;
if (elements_kind == DICTIONARY_ELEMENTS) { if (elements_kind == DICTIONARY_ELEMENTS) {
if (FLAG_tf_load_ic_stub) {
TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadElementDH); TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadElementDH);
return LoadHandler::LoadElement(isolate, elements_kind, false, return LoadHandler::LoadElement(isolate, elements_kind, false, is_js_array);
is_js_array);
}
TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadDictionaryElementStub);
return LoadDictionaryElementStub(isolate).GetCode();
} }
DCHECK(IsFastElementsKind(elements_kind) || DCHECK(IsFastElementsKind(elements_kind) ||
IsFixedTypedArrayElementsKind(elements_kind)); IsFixedTypedArrayElementsKind(elements_kind));
...@@ -654,16 +649,9 @@ Handle<Object> ElementHandlerCompiler::GetKeyedLoadHandler( ...@@ -654,16 +649,9 @@ Handle<Object> ElementHandlerCompiler::GetKeyedLoadHandler(
bool convert_hole_to_undefined = bool convert_hole_to_undefined =
is_js_array && elements_kind == FAST_HOLEY_ELEMENTS && is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
*receiver_map == isolate->get_initial_js_array_map(elements_kind); *receiver_map == isolate->get_initial_js_array_map(elements_kind);
if (FLAG_tf_load_ic_stub) {
TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadElementDH); TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadElementDH);
return LoadHandler::LoadElement(isolate, elements_kind, return LoadHandler::LoadElement(isolate, elements_kind,
convert_hole_to_undefined, is_js_array); convert_hole_to_undefined, is_js_array);
} else {
TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadFastElementStub);
return LoadFastElementStub(isolate, is_js_array, elements_kind,
convert_hole_to_undefined)
.GetCode();
}
} }
void ElementHandlerCompiler::CompileElementHandlers( void ElementHandlerCompiler::CompileElementHandlers(
......
...@@ -884,13 +884,8 @@ void IC::PatchCache(Handle<Name> name, Handle<Object> handler) { ...@@ -884,13 +884,8 @@ void IC::PatchCache(Handle<Name> name, Handle<Object> handler) {
} }
Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) { Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) {
if (FLAG_tf_load_ic_stub) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH); TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH);
return LoadHandler::LoadField(isolate(), index); return LoadHandler::LoadField(isolate(), index);
}
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldStub);
LoadFieldStub stub(isolate(), index);
return stub.GetCode();
} }
namespace { namespace {
...@@ -1121,15 +1116,8 @@ void LoadIC::UpdateCaches(LookupIterator* lookup) { ...@@ -1121,15 +1116,8 @@ void LoadIC::UpdateCaches(LookupIterator* lookup) {
code = slow_stub(); code = slow_stub();
} else if (!lookup->IsFound()) { } else if (!lookup->IsFound()) {
if (kind() == Code::LOAD_IC || kind() == Code::LOAD_GLOBAL_IC) { if (kind() == Code::LOAD_IC || kind() == Code::LOAD_GLOBAL_IC) {
if (FLAG_tf_load_ic_stub) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadNonexistentDH); TRACE_HANDLER_STATS(isolate(), LoadIC_LoadNonexistentDH);
code = LoadNonExistent(receiver_map(), lookup->name()); code = LoadNonExistent(receiver_map(), lookup->name());
} else {
code = NamedLoadHandlerCompiler::ComputeLoadNonexistent(lookup->name(),
receiver_map());
// TODO(jkummerow/verwaest): Introduce a builtin that handles this case.
if (code.is_null()) code = slow_stub();
}
} else { } else {
code = slow_stub(); code = slow_stub();
} }
...@@ -1390,26 +1378,15 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) { ...@@ -1390,26 +1378,15 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub);
return slow_stub(); return slow_stub();
} }
if (FLAG_tf_load_ic_stub) { Handle<Object> smi_handler =
Handle<Object> smi_handler = LoadHandler::LoadApiGetter( LoadHandler::LoadApiGetter(isolate(), lookup->GetAccessorIndex());
isolate(), lookup->GetAccessorIndex());
if (receiver_is_holder) { if (receiver_is_holder) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterDH); TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterDH);
return smi_handler; return smi_handler;
} }
if (kind() != Code::LOAD_GLOBAL_IC) { if (kind() != Code::LOAD_GLOBAL_IC) {
TRACE_HANDLER_STATS(isolate(), TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterFromPrototypeDH);
LoadIC_LoadApiGetterFromPrototypeDH); return LoadFromPrototype(map, holder, lookup->name(), smi_handler);
return LoadFromPrototype(map, holder, lookup->name(),
smi_handler);
}
} else {
if (receiver_is_holder) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadApiGetterStub);
int index = lookup->GetAccessorIndex();
LoadApiGetterStub stub(isolate(), true, index);
return stub.GetCode();
}
} }
break; // Custom-compiled handler. break; // Custom-compiled handler.
} }
...@@ -1446,16 +1423,12 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) { ...@@ -1446,16 +1423,12 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
if (receiver_is_holder) { if (receiver_is_holder) {
return smi_handler; return smi_handler;
} }
if (FLAG_tf_load_ic_stub) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldFromPrototypeDH); TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldFromPrototypeDH);
return LoadFromPrototype(map, holder, lookup->name(), smi_handler); return LoadFromPrototype(map, holder, lookup->name(), smi_handler);
} }
break; // Custom-compiled handler.
}
// -------------- Constant properties -------------- // -------------- Constant properties --------------
DCHECK(lookup->property_details().type() == DATA_CONSTANT); DCHECK(lookup->property_details().type() == DATA_CONSTANT);
if (FLAG_tf_load_ic_stub) {
Handle<Object> smi_handler = Handle<Object> smi_handler =
LoadHandler::LoadConstant(isolate(), lookup->GetConstantIndex()); LoadHandler::LoadConstant(isolate(), lookup->GetConstantIndex());
if (receiver_is_holder) { if (receiver_is_holder) {
...@@ -1464,14 +1437,6 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) { ...@@ -1464,14 +1437,6 @@ Handle<Object> LoadIC::GetMapIndependentHandler(LookupIterator* lookup) {
} }
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantFromPrototypeDH); TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantFromPrototypeDH);
return LoadFromPrototype(map, holder, lookup->name(), smi_handler); return LoadFromPrototype(map, holder, lookup->name(), smi_handler);
} else {
if (receiver_is_holder) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantStub);
LoadConstantStub stub(isolate(), lookup->GetConstantIndex());
return stub.GetCode();
}
}
break; // Custom-compiled handler.
} }
case LookupIterator::INTEGER_INDEXED_EXOTIC: case LookupIterator::INTEGER_INDEXED_EXOTIC:
...@@ -2011,14 +1976,11 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) { ...@@ -2011,14 +1976,11 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) {
return slow_stub(); return slow_stub();
} }
DCHECK(lookup->IsCacheableTransition()); DCHECK(lookup->IsCacheableTransition());
if (FLAG_tf_store_ic_stub) {
Handle<Map> transition = lookup->transition_map(); Handle<Map> transition = lookup->transition_map();
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreTransitionDH); TRACE_HANDLER_STATS(isolate(), StoreIC_StoreTransitionDH);
return StoreTransition(receiver_map(), holder, transition, return StoreTransition(receiver_map(), holder, transition,
lookup->name()); lookup->name());
} }
break; // Custom-compiled handler.
}
case LookupIterator::INTERCEPTOR: { case LookupIterator::INTERCEPTOR: {
DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined(isolate())); DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined(isolate()));
...@@ -2094,27 +2056,11 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) { ...@@ -2094,27 +2056,11 @@ Handle<Object> StoreIC::GetMapIndependentHandler(LookupIterator* lookup) {
// -------------- Fields -------------- // -------------- Fields --------------
if (lookup->property_details().type() == DATA) { if (lookup->property_details().type() == DATA) {
if (FLAG_tf_store_ic_stub) {
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldDH); TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldDH);
int descriptor = lookup->GetFieldDescriptorIndex(); int descriptor = lookup->GetFieldDescriptorIndex();
FieldIndex index = lookup->GetFieldIndex(); FieldIndex index = lookup->GetFieldIndex();
return StoreHandler::StoreField(isolate(), descriptor, index, return StoreHandler::StoreField(isolate(), descriptor, index,
lookup->representation()); lookup->representation());
} else {
bool use_stub = true;
if (lookup->representation().IsHeapObject()) {
// Only use a generic stub if no types need to be tracked.
Handle<FieldType> field_type = lookup->GetFieldType();
use_stub = !field_type->IsClass();
}
if (use_stub) {
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreFieldStub);
StoreFieldStub stub(isolate(), lookup->GetFieldIndex(),
lookup->representation());
return stub.GetCode();
}
}
break; // Custom-compiled handler.
} }
// -------------- Constant properties -------------- // -------------- Constant properties --------------
...@@ -2156,15 +2102,7 @@ Handle<Object> StoreIC::CompileHandler(LookupIterator* lookup, ...@@ -2156,15 +2102,7 @@ Handle<Object> StoreIC::CompileHandler(LookupIterator* lookup,
cell->set_value(isolate()->heap()->the_hole_value()); cell->set_value(isolate()->heap()->the_hole_value());
return code; return code;
} }
DCHECK(!FLAG_tf_store_ic_stub); UNREACHABLE();
Handle<Map> transition = lookup->transition_map();
// Currently not handled by CompileStoreTransition.
DCHECK(holder->HasFastProperties());
DCHECK(lookup->IsCacheableTransition());
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreTransition);
NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder);
return compiler.CompileStoreTransition(transition, lookup->name());
} }
case LookupIterator::INTERCEPTOR: case LookupIterator::INTERCEPTOR:
...@@ -2212,7 +2150,7 @@ Handle<Object> StoreIC::CompileHandler(LookupIterator* lookup, ...@@ -2212,7 +2150,7 @@ Handle<Object> StoreIC::CompileHandler(LookupIterator* lookup,
} }
case LookupIterator::DATA: { case LookupIterator::DATA: {
if (lookup->is_dictionary_holder()) { DCHECK(lookup->is_dictionary_holder());
DCHECK(holder->IsJSGlobalObject()); DCHECK(holder->IsJSGlobalObject());
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobal); TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobal);
DCHECK(holder.is_identical_to(receiver) || DCHECK(holder.is_identical_to(receiver) ||
...@@ -2220,34 +2158,12 @@ Handle<Object> StoreIC::CompileHandler(LookupIterator* lookup, ...@@ -2220,34 +2158,12 @@ Handle<Object> StoreIC::CompileHandler(LookupIterator* lookup,
auto cell = lookup->GetPropertyCell(); auto cell = lookup->GetPropertyCell();
auto updated_type = auto updated_type =
PropertyCell::UpdatedType(cell, value, lookup->property_details()); PropertyCell::UpdatedType(cell, value, lookup->property_details());
auto code = PropertyCellStoreHandler( auto code = PropertyCellStoreHandler(isolate(), receiver,
isolate(), receiver, Handle<JSGlobalObject>::cast(holder), Handle<JSGlobalObject>::cast(holder),
lookup->name(), cell, updated_type); lookup->name(), cell, updated_type);
return code; return code;
} }
// -------------- Fields --------------
if (lookup->property_details().type() == DATA) {
DCHECK(!FLAG_tf_store_ic_stub);
#ifdef DEBUG
bool use_stub = true;
if (lookup->representation().IsHeapObject()) {
// Only use a generic stub if no types need to be tracked.
Handle<FieldType> field_type = lookup->GetFieldType();
use_stub = !field_type->IsClass();
}
DCHECK(!use_stub);
#endif
TRACE_HANDLER_STATS(isolate(), StoreIC_StoreField);
NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder);
return compiler.CompileStoreField(lookup);
}
// -------------- Constant properties --------------
DCHECK(lookup->property_details().type() == DATA_CONSTANT);
UNREACHABLE();
}
case LookupIterator::INTEGER_INDEXED_EXOTIC: case LookupIterator::INTEGER_INDEXED_EXOTIC:
case LookupIterator::ACCESS_CHECK: case LookupIterator::ACCESS_CHECK:
case LookupIterator::JSPROXY: case LookupIterator::JSPROXY:
......
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