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, is_js_array);
return LoadHandler::LoadElement(isolate, elements_kind, false,
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(
......
This diff is collapsed.
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