Make LoadFastElementStub a HandlerStub.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28376}
This commit is contained in:
mvstanton 2015-05-12 09:51:14 -07:00 committed by Commit bot
parent 483436219f
commit 91a8810556
2 changed files with 6 additions and 16 deletions

View File

@ -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));

View File

@ -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);
};