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

Unified Diff: src/code-stubs.h

Issue 499343002: Added vector-based loadic hydrogen stubs. Not yet callable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More comments. Created 6 years, 4 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
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index b69f58b81c8bfe3f735a3ee0070bd4a169fae580..ad171e95dfcc5f5a92b6ced078e0dfa87dae72fc 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -76,6 +76,10 @@ namespace internal {
V(StoreGlobal) \
V(CallApiFunction) \
V(CallApiGetter) \
+ V(LoadICTrampoline) \
+ V(VectorLoad) \
+ V(KeyedLoadICTrampoline) \
+ V(VectorKeyedLoad) \
/* IC Handler stubs */ \
V(LoadField) \
V(StoreField) \
@@ -1896,6 +1900,104 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
};
+class LoadICTrampolineStub : public PlatformCodeStub {
+ public:
+ LoadICTrampolineStub(Isolate* isolate, const LoadIC::State& state)
+ : PlatformCodeStub(isolate), state_(state) {}
+
+ virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; }
+
+ virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE {
+ return GENERIC;
+ }
+
+ virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE {
+ return state_.GetExtraICState();
+ }
+
+ private:
+ Major MajorKey() const { return LoadICTrampoline; }
+ uint32_t MinorKey() const { return GetExtraICState(); }
+
+ void Generate(MacroAssembler* masm);
+
+ const LoadIC::State state_;
+
+ DISALLOW_COPY_AND_ASSIGN(LoadICTrampolineStub);
+};
+
+
+class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
+ public:
+ explicit KeyedLoadICTrampolineStub(Isolate* isolate)
+ : LoadICTrampolineStub(isolate, LoadIC::State(0)) {}
+
+ virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
+ return Code::KEYED_LOAD_IC;
+ }
+
+ private:
+ Major MajorKey() const { return KeyedLoadICTrampoline; }
+
+ DISALLOW_COPY_AND_ASSIGN(KeyedLoadICTrampolineStub);
+};
+
+
+class VectorLoadStub : public HydrogenCodeStub {
+ public:
+ explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state)
+ : HydrogenCodeStub(isolate), state_(state) {}
+
+ virtual Handle<Code> GenerateCode() V8_OVERRIDE;
+
+ virtual void InitializeInterfaceDescriptor(
+ CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
+
+ static void InstallDescriptors(Isolate* isolate);
+
+ virtual Code::Kind GetCodeKind() const V8_OVERRIDE { return Code::LOAD_IC; }
+
+ virtual InlineCacheState GetICState() const V8_FINAL V8_OVERRIDE {
+ return GENERIC;
+ }
+
+ virtual ExtraICState GetExtraICState() const V8_FINAL V8_OVERRIDE {
+ return state_.GetExtraICState();
+ }
+
+ private:
+ Major MajorKey() const { return VectorLoad; }
+ int NotMissMinorKey() const { return state_.GetExtraICState(); }
+
+ const LoadIC::State state_;
+
+ DISALLOW_COPY_AND_ASSIGN(VectorLoadStub);
+};
+
+
+class VectorKeyedLoadStub : public VectorLoadStub {
+ public:
+ explicit VectorKeyedLoadStub(Isolate* isolate)
+ : VectorLoadStub(isolate, LoadIC::State(0)) {}
+
+ virtual Handle<Code> GenerateCode() V8_OVERRIDE;
+
+ virtual void InitializeInterfaceDescriptor(
+ CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE;
+
+ static void InstallDescriptors(Isolate* isolate);
+
+ virtual Code::Kind GetCodeKind() const V8_OVERRIDE {
+ return Code::KEYED_LOAD_IC;
+ }
+
+ private:
+ Major MajorKey() const { return VectorKeyedLoad; }
+
+ DISALLOW_COPY_AND_ASSIGN(VectorKeyedLoadStub);
+};
+
+
class DoubleToIStub : public PlatformCodeStub {
public:
DoubleToIStub(Isolate* isolate,

Powered by Google App Engine
This is Rietveld 408576698