Commit 91a88105 authored by mvstanton's avatar mvstanton Committed by Commit bot

Make LoadFastElementStub a HandlerStub.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28376}
parent 48343621
......@@ -594,11 +594,6 @@ void JSEntryStub::FinishCode(Handle<Code> code) {
}
void LoadFastElementStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {
descriptor->Initialize(FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
}
void LoadDictionaryElementStub::InitializeDescriptor(
CodeStubDescriptor* descriptor) {
descriptor->Initialize(FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure));
......
......@@ -76,7 +76,6 @@ namespace internal {
V(KeyedLoadGeneric) \
V(LoadScriptContextField) \
V(LoadDictionaryElement) \
V(LoadFastElement) \
V(MegamorphicLoad) \
V(NameDictionaryLookup) \
V(NumberToString) \
......@@ -95,6 +94,7 @@ namespace internal {
/* IC Handler stubs */ \
V(ArrayBufferViewLoadField) \
V(LoadConstant) \
V(LoadFastElement) \
V(LoadField) \
V(KeyedLoadSloppyArguments) \
V(StoreField) \
......@@ -2357,18 +2357,20 @@ class StoreScriptContextFieldStub : public ScriptContextFieldStub {
};
class LoadFastElementStub : public HydrogenCodeStub {
class LoadFastElementStub : public HandlerStub {
public:
LoadFastElementStub(Isolate* isolate, bool is_js_array,
ElementsKind elements_kind,
bool convert_hole_to_undefined = false)
: HydrogenCodeStub(isolate) {
: 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());
......@@ -2383,14 +2385,7 @@ class LoadFastElementStub : public HydrogenCodeStub {
class IsJSArrayBits: public BitField<bool, 8, 1> {};
class CanConvertHoleToUndefined : public BitField<bool, 9, 1> {};
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
return LoadDescriptor(isolate());
}
DEFINE_HYDROGEN_CODE_STUB(LoadFastElement, HydrogenCodeStub);
DEFINE_HANDLER_CODE_STUB(LoadFastElement, HandlerStub);
};
......
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