Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 8683837ee17e0a93a62cd98f6a4a73df4dc93c05..93a0dcff4e92695934d4cee33e191c8a629c7ae0 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -67,6 +67,7 @@ namespace internal { |
V(KeyedLoadGeneric) \ |
V(LoadDictionaryElement) \ |
V(LoadFastElement) \ |
+ V(MegamorphicLoad) \ |
V(NameDictionaryLookup) \ |
V(NumberToString) \ |
V(RegExpConstructResult) \ |
@@ -1733,6 +1734,27 @@ 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 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()); |
+ } |
+ |
+ DEFINE_HYDROGEN_CODE_STUB(MegamorphicLoad, HydrogenCodeStub); |
+}; |
+ |
+ |
class VectorLoadStub : public HydrogenCodeStub { |
public: |
explicit VectorLoadStub(Isolate* isolate, const LoadIC::State& state) |