Index: src/ic/ic-state.h |
diff --git a/src/ic/ic-state.h b/src/ic/ic-state.h |
index 9bb877a3835761448072ae65ec68be73e5109d95..4a1a2cfc46302f23946ca28af02a85f3f26bca20 100644 |
--- a/src/ic/ic-state.h |
+++ b/src/ic/ic-state.h |
@@ -236,6 +236,32 @@ class LoadICState FINAL BASE_EMBEDDED { |
const ExtraICState state_; |
}; |
+ |
+ |
+class KeyedLoadICState FINAL BASE_EMBEDDED { |
Jakob Kummerow
2014/12/10 15:21:18
I see that you're just following an existing patte
|
+ public: |
+ explicit KeyedLoadICState(ExtraICState extra_ic_state) |
+ : state_(extra_ic_state) {} |
+ |
+ explicit KeyedLoadICState(IcCheckType key_type) |
+ : state_(IcCheckTypeField::encode(key_type)) {} |
+ |
+ ExtraICState GetExtraICState() const { return state_; } |
+ |
+ IcCheckType key_type() const { |
+ return IcCheckTypeField::decode(state_); |
+ } |
+ |
+ static IcCheckType GetKeyType(ExtraICState state) { |
+ return KeyedLoadICState(state).key_type(); |
+ } |
+ |
+ private: |
+ // Offset is just to make sure that LoadICState is not conflicting with us |
+ class IcCheckTypeField : public BitField<IcCheckType, 1, 1> {}; |
+ |
+ const ExtraICState state_; |
+}; |
} |
} |