Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Unified Diff: src/code-stubs.h

Issue 2670863003: [stubs] Port KeyedStoreIC_Slow/Miss and StoreSlowElementStub to TF. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 019676ead095a280b60259acae662fb950ae1085..b5d6b045c38bbb29012495a22c987de3c719f67d 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -47,7 +47,7 @@ class Node;
V(RecordWrite) \
V(RegExpExec) \
V(StoreBufferOverflow) \
- V(StoreElement) \
+ V(StoreSlowElement) \
V(SubString) \
V(FastNewRestParameter) \
V(FastNewSloppyArguments) \
@@ -105,7 +105,6 @@ class Node;
V(StoreFastElement) \
V(StoreGlobal) \
V(StoreInterceptor) \
- V(LoadApiGetter) \
V(LoadIndexedInterceptor) \
V(GrowArrayElements)
@@ -1005,33 +1004,6 @@ class KeyedStoreSloppyArgumentsStub : public TurboFanCodeStub {
DEFINE_TURBOFAN_CODE_STUB(KeyedStoreSloppyArguments, TurboFanCodeStub);
};
-class LoadApiGetterStub : public TurboFanCodeStub {
- public:
- LoadApiGetterStub(Isolate* isolate, bool receiver_is_holder, int index)
- : TurboFanCodeStub(isolate) {
- // If that's not true, we need to ensure that the receiver is actually a
- // JSReceiver. http://crbug.com/609134
- DCHECK(receiver_is_holder);
- minor_key_ = IndexBits::encode(index) |
- ReceiverIsHolderBits::encode(receiver_is_holder);
- }
-
- Code::Kind GetCodeKind() const override { return Code::HANDLER; }
- ExtraICState GetExtraICState() const override { return Code::LOAD_IC; }
-
- int index() const { return IndexBits::decode(minor_key_); }
- bool receiver_is_holder() const {
- return ReceiverIsHolderBits::decode(minor_key_);
- }
-
- private:
- class ReceiverIsHolderBits : public BitField<bool, 0, 1> {};
- class IndexBits : public BitField<int, 1, kDescriptorIndexBitCount> {};
-
- DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
- DEFINE_TURBOFAN_CODE_STUB(LoadApiGetter, TurboFanCodeStub);
-};
-
class StoreGlobalStub : public TurboFanCodeStub {
public:
StoreGlobalStub(Isolate* isolate, PropertyCellType type,
@@ -1928,31 +1900,19 @@ class ArrayNArgumentsConstructorStub : public PlatformCodeStub {
DEFINE_PLATFORM_CODE_STUB(ArrayNArgumentsConstructor, PlatformCodeStub);
};
-class StoreElementStub : public PlatformCodeStub {
+class StoreSlowElementStub : public TurboFanCodeStub {
public:
- StoreElementStub(Isolate* isolate, ElementsKind elements_kind,
- KeyedAccessStoreMode mode)
- : PlatformCodeStub(isolate) {
- // TODO(jkummerow): Rename this stub to StoreSlowElementStub,
- // drop elements_kind parameter.
- DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind);
- minor_key_ = ElementsKindBits::encode(elements_kind) |
- CommonStoreModeBits::encode(mode);
+ StoreSlowElementStub(Isolate* isolate, KeyedAccessStoreMode mode)
+ : TurboFanCodeStub(isolate) {
+ minor_key_ = CommonStoreModeBits::encode(mode);
}
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
ExtraICState GetExtraICState() const override { return Code::KEYED_STORE_IC; }
private:
- ElementsKind elements_kind() const {
- return ElementsKindBits::decode(minor_key_);
- }
-
- class ElementsKindBits
- : public BitField<ElementsKind, CommonStoreModeBits::kNext, 8> {};
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
- DEFINE_PLATFORM_CODE_STUB(StoreElement, PlatformCodeStub);
+ DEFINE_TURBOFAN_CODE_STUB(StoreSlowElement, TurboFanCodeStub);
};
class ToBooleanICStub : public HydrogenCodeStub {
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698