Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 212ea7b8601cb8a11602cb63ac8cd884cc540c9f..4df42dee69de7379b7bf4a863e80000d486aa7ee 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -77,6 +77,7 @@ namespace internal { |
V(CallApiFunction) \ |
V(CallApiGetter) \ |
V(LoadICTrampoline) \ |
+ V(MegamorphicLoad) \ |
V(VectorLoad) \ |
V(KeyedLoadICTrampoline) \ |
V(VectorKeyedLoad) \ |
@@ -1961,6 +1962,37 @@ class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { |
}; |
+class MegamorphicLoadStub : public HydrogenCodeStub { |
+ public: |
+ MegamorphicLoadStub(Isolate* isolate, const LoadIC::State& state) |
+ : HydrogenCodeStub(isolate) { |
+ set_sub_minor_key(state.GetExtraICState()); |
+ } |
+ |
+ virtual Handle<Code> GenerateCode() OVERRIDE; |
+ |
+ virtual void InitializeInterfaceDescriptor( |
+ CodeStubInterfaceDescriptor* descriptor) OVERRIDE; |
+ |
+ static void InstallDescriptors(Isolate* isolate); |
+ |
+ virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; } |
+ |
+ virtual InlineCacheState GetICState() const FINAL OVERRIDE { |
+ return MEGAMORPHIC; |
+ } |
+ |
+ virtual ExtraICState GetExtraICState() const FINAL OVERRIDE { |
+ return static_cast<ExtraICState>(sub_minor_key()); |
+ } |
+ |
+ private: |
+ virtual Major MajorKey() const OVERRIDE { return MegamorphicLoad; } |
Yang
2014/09/08 08:43:00
Please rebase this CL and use the new DEFINE_HYDRO
mvstanton
2014/09/08 12:35:20
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(MegamorphicLoadStub); |
+}; |
+ |
+ |
class VectorLoadStub : public HydrogenCodeStub { |
public: |
explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state) |