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

Unified Diff: src/code-stubs.h

Issue 1149903005: Vector ICs: Introduce Store and KeyedStore IC code stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@vector-stores
Patch Set: REBASE. Created 5 years, 7 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/arm64/interface-descriptors-arm64.cc ('k') | src/ia32/code-stubs-ia32.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 6db4a79e387b85103d3372a1a7f9209891d24956..9b81cf68d70630d0d92cd0df22262e9b25f46f47 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -54,6 +54,10 @@ namespace internal {
V(StubFailureTrampoline) \
V(SubString) \
V(ToNumber) \
+ V(VectorStoreICTrampoline) \
+ V(VectorKeyedStoreICTrampoline) \
+ V(VectorStoreIC) \
+ V(VectorKeyedStoreIC) \
/* HydrogenCodeStubs */ \
V(AllocateHeapNumber) \
V(ArrayNArgumentsConstructor) \
@@ -2152,6 +2156,44 @@ class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
};
+class VectorStoreICTrampolineStub : public PlatformCodeStub {
+ public:
+ VectorStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
+ : PlatformCodeStub(isolate) {
+ minor_key_ = state.GetExtraICState();
+ }
+
+ Code::Kind GetCodeKind() const override { return Code::STORE_IC; }
+
+ InlineCacheState GetICState() const final { return DEFAULT; }
+
+ ExtraICState GetExtraICState() const final {
+ return static_cast<ExtraICState>(minor_key_);
+ }
+
+ protected:
+ StoreICState state() const {
+ return StoreICState(static_cast<ExtraICState>(minor_key_));
+ }
+
+ private:
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreICTrampoline);
+ DEFINE_PLATFORM_CODE_STUB(VectorStoreICTrampoline, PlatformCodeStub);
+};
+
+
+class VectorKeyedStoreICTrampolineStub : public VectorStoreICTrampolineStub {
+ public:
+ VectorKeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
+ : VectorStoreICTrampolineStub(isolate, state) {}
+
+ Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
+
+ DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreICTrampoline,
+ VectorStoreICTrampolineStub);
+};
+
+
class CallICTrampolineStub : public PlatformCodeStub {
public:
CallICTrampolineStub(Isolate* isolate, const CallICState& state)
@@ -2197,10 +2239,8 @@ class LoadICStub : public PlatformCodeStub {
void GenerateForTrampoline(MacroAssembler* masm);
Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
-
- InlineCacheState GetICState() const final override { return DEFAULT; }
-
- ExtraICState GetExtraICState() const final override {
+ InlineCacheState GetICState() const final { return DEFAULT; }
+ ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@@ -2219,8 +2259,7 @@ class KeyedLoadICStub : public PlatformCodeStub {
void GenerateForTrampoline(MacroAssembler* masm);
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
-
- InlineCacheState GetICState() const final override { return DEFAULT; }
+ InlineCacheState GetICState() const final { return DEFAULT; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub);
@@ -2230,6 +2269,49 @@ class KeyedLoadICStub : public PlatformCodeStub {
};
+class VectorStoreICStub : public PlatformCodeStub {
+ public:
+ VectorStoreICStub(Isolate* isolate, const StoreICState& state)
+ : PlatformCodeStub(isolate) {
+ minor_key_ = state.GetExtraICState();
+ }
+
+ void GenerateForTrampoline(MacroAssembler* masm);
+
+ Code::Kind GetCodeKind() const final { return Code::STORE_IC; }
+ InlineCacheState GetICState() const final { return DEFAULT; }
+ ExtraICState GetExtraICState() const final {
+ return static_cast<ExtraICState>(minor_key_);
+ }
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC);
+ DEFINE_PLATFORM_CODE_STUB(VectorStoreIC, PlatformCodeStub);
+
+ protected:
+ void GenerateImpl(MacroAssembler* masm, bool in_frame);
+};
+
+
+class VectorKeyedStoreICStub : public PlatformCodeStub {
+ public:
+ VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state)
+ : PlatformCodeStub(isolate) {
+ minor_key_ = state.GetExtraICState();
+ }
+
+ void GenerateForTrampoline(MacroAssembler* masm);
+
+ Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
+ InlineCacheState GetICState() const final { return DEFAULT; }
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC);
+ DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub);
+
+ protected:
+ void GenerateImpl(MacroAssembler* masm, bool in_frame);
+};
+
+
class DoubleToIStub : public PlatformCodeStub {
public:
DoubleToIStub(Isolate* isolate, Register source, Register destination,
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698