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

Unified Diff: src/ic/ic-state.h

Issue 1151253004: VectorICs: Create a StoreICState to more easily create matching code stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Dumb compile error :P. Created 5 years, 7 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
« no previous file with comments | « src/ic/ic-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
+};
}
}
« no previous file with comments | « src/ic/ic-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698