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

Unified Diff: src/code-stubs.h

Issue 2033423002: [builtins] Turn LoadIC_Miss and LoadIC_Slow builtins to TurboFan code stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@load-ic-stub-tf
Patch Set: Created 4 years, 6 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.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 7f35e98414b754c4d31ac4ec4bdf603fb9bac47d..94758f9d3286903ac910b8a7d3d562eff8f43b1b 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -149,6 +149,8 @@ namespace internal {
V(LoadConstant) \
V(LoadFastElement) \
V(LoadField) \
+ V(LoadICMiss) \
+ V(LoadICSlow) \
V(LoadIndexedInterceptor) \
V(StoreField) \
V(StoreGlobal) \
@@ -404,6 +406,13 @@ class CodeStub BASE_EMBEDDED {
void GenerateAssembly(CodeStubAssembler* assembler) const override; \
DEFINE_CODE_STUB(NAME, SUPER)
+#define DEFINE_TURBOFAN_HANDLER_CODE_STUB(NAME, EXTRA_IC_STATE) \
+ public: \
+ Code::Kind GetCodeKind() const override { return Code::HANDLER; } \
+ ExtraICState GetExtraICState() const override { return EXTRA_IC_STATE; } \
Toon Verwaest 2016/06/06 13:01:32 EXTRA_IC_STATE -> KIND?
+ InlineCacheState GetICState() const override { return MONOMORPHIC; } \
+ DEFINE_TURBOFAN_CODE_STUB(NAME, TurboFanCodeStub)
+
#define DEFINE_TURBOFAN_BINARY_OP_CODE_STUB(NAME, SUPER) \
public: \
static compiler::Node* Generate(CodeStubAssembler* assembler, \
@@ -693,12 +702,8 @@ class StringLengthStub : public TurboFanCodeStub {
public:
explicit StringLengthStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- Code::Kind GetCodeKind() const override { return Code::HANDLER; }
- InlineCacheState GetICState() const override { return MONOMORPHIC; }
- ExtraICState GetExtraICState() const override { return Code::LOAD_IC; }
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
- DEFINE_TURBOFAN_CODE_STUB(StringLength, TurboFanCodeStub);
+ DEFINE_TURBOFAN_HANDLER_CODE_STUB(StringLength, Code::LOAD_IC);
};
class AddStub final : public TurboFanCodeStub {
@@ -959,14 +964,24 @@ class StoreInterceptorStub : public TurboFanCodeStub {
public:
explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- void GenerateAssembly(CodeStubAssembler* assember) const override;
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
+ DEFINE_TURBOFAN_HANDLER_CODE_STUB(StoreInterceptor, Code::STORE_IC);
+};
- Code::Kind GetCodeKind() const override { return Code::HANDLER; }
- ExtraICState GetExtraICState() const override { return Code::STORE_IC; }
- InlineCacheState GetICState() const override { return MONOMORPHIC; }
+class LoadICMissStub : public TurboFanCodeStub {
+ public:
+ explicit LoadICMissStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
- DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
- DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub);
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
+ DEFINE_TURBOFAN_HANDLER_CODE_STUB(LoadICMiss, Code::LOAD_IC);
Toon Verwaest 2016/06/06 13:01:32 This is not a HANDLER but a STUB. We should probab
+};
+
+class LoadICSlowStub : public TurboFanCodeStub {
+ public:
+ explicit LoadICSlowStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
+ DEFINE_TURBOFAN_HANDLER_CODE_STUB(LoadICSlow, Code::LOAD_IC);
};
class LoadIndexedInterceptorStub : public TurboFanCodeStub {
@@ -974,12 +989,9 @@ class LoadIndexedInterceptorStub : public TurboFanCodeStub {
explicit LoadIndexedInterceptorStub(Isolate* isolate)
: TurboFanCodeStub(isolate) {}
- Code::Kind GetCodeKind() const override { return Code::HANDLER; }
- ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; }
- InlineCacheState GetICState() const override { return MONOMORPHIC; }
-
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
- DEFINE_TURBOFAN_CODE_STUB(LoadIndexedInterceptor, TurboFanCodeStub);
+ DEFINE_TURBOFAN_HANDLER_CODE_STUB(LoadIndexedInterceptor,
+ Code::KEYED_LOAD_IC);
};
// ES6 section 12.10.3 "in" operator evaluation.
@@ -1542,10 +1554,6 @@ class LoadApiGetterStub : public TurboFanCodeStub {
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_);
@@ -1556,7 +1564,7 @@ class LoadApiGetterStub : public TurboFanCodeStub {
class IndexBits : public BitField<int, 1, kDescriptorIndexBitCount> {};
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
- DEFINE_TURBOFAN_CODE_STUB(LoadApiGetter, TurboFanCodeStub);
+ DEFINE_TURBOFAN_HANDLER_CODE_STUB(LoadApiGetter, Code::LOAD_IC);
};
class StoreFieldStub : public HandlerStub {
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698