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

Unified Diff: src/code-stubs.h

Issue 1895093002: Create per-descriptor-index LoadApiGetterStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 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/code-factory.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 b1e42591281c032e48e518b09f75d6da9ee045d5..7379ff489c2bf534224ab39d99a427f8a8a55e9d 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -140,15 +140,16 @@ namespace internal {
V(ToLength) \
/* IC Handler stubs */ \
V(ArrayBufferViewLoadField) \
+ V(KeyedLoadSloppyArguments) \
+ V(KeyedStoreSloppyArguments) \
+ V(LoadApiGetter) \
V(LoadConstant) \
V(LoadFastElement) \
V(LoadField) \
V(LoadIndexedInterceptor) \
- V(KeyedLoadSloppyArguments) \
- V(KeyedStoreSloppyArguments) \
V(StoreField) \
- V(StoreInterceptor) \
V(StoreGlobal) \
+ V(StoreInterceptor) \
V(StoreTransition)
// List of code stubs only used on ARM 32 bits platforms.
@@ -1456,6 +1457,30 @@ class LoadConstantStub : public HandlerStub {
DEFINE_HANDLER_CODE_STUB(LoadConstant, HandlerStub);
};
+class LoadApiGetterStub : public TurboFanCodeStub {
+ public:
+ LoadApiGetterStub(Isolate* isolate, bool receiver_is_holder, int index)
+ : TurboFanCodeStub(isolate) {
+ 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; }
+ InlineCacheState GetICState() const override { return MONOMORPHIC; }
+
+ 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 StoreFieldStub : public HandlerStub {
public:
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698