Index: src/ic/ic-state.h |
diff --git a/src/ic/ic-state.h b/src/ic/ic-state.h |
index 76c0155206b813531f6ea2a625b3ec36b01c5739..e451fb2c80c2299b5b9695ffd52821b516789f9c 100644 |
--- a/src/ic/ic-state.h |
+++ b/src/ic/ic-state.h |
@@ -224,6 +224,36 @@ class LoadICState final BASE_EMBEDDED { |
const ExtraICState state_; |
}; |
+ |
+ |
+class StoreICState final BASE_EMBEDDED { |
+ public: |
+ explicit StoreICState(ExtraICState extra_ic_state) : state_(extra_ic_state) {} |
+ |
+ explicit StoreICState(LanguageMode mode) |
+ : state_(LanguageModeState::encode(mode)) {} |
+ |
+ ExtraICState GetExtraICState() const { return state_; } |
+ |
+ LanguageMode language_mode() const { |
+ return LanguageModeState::decode(state_); |
+ } |
+ |
+ static LanguageMode GetLanguageMode(ExtraICState state) { |
+ return StoreICState(state).language_mode(); |
+ } |
+ |
+ class LanguageModeState : public BitField<LanguageMode, 1, 2> {}; |
+ STATIC_ASSERT(i::LANGUAGE_END == 3); |
+ |
+ // For convenience, a statically declared encoding of strict mode extra |
+ // IC state. |
+ static const ExtraICState kStrictModeState = STRICT |
+ << LanguageModeState::kShift; |
+ |
+ private: |
+ const ExtraICState state_; |
+}; |
} |
} |