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