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

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

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 5 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') | src/mips/codegen-mips.h » ('j') | 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 e1fed191332cbe0ccccdda02e9f5b4df1ce51794..0b4b9cdc99b0f2a62f23de96e32c0fc7d0672afa 100644
--- a/src/ic/ic-state.h
+++ b/src/ic/ic-state.h
@@ -202,10 +202,10 @@ class CompareICState {
class LoadICState final BASE_EMBEDDED {
private:
- class ContextualModeBits : public BitField<ContextualMode, 0, 1> {};
+ class TypeofModeBits : public BitField<TypeofMode, 0, 1> {};
class LanguageModeBits
- : public BitField<LanguageMode, ContextualModeBits::kNext, 2> {};
- STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0);
+ : public BitField<LanguageMode, TypeofModeBits::kNext, 2> {};
+ STATIC_ASSERT(static_cast<int>(INSIDE_TYPEOF) == 0);
const ExtraICState state_;
public:
@@ -216,22 +216,20 @@ class LoadICState final BASE_EMBEDDED {
explicit LoadICState(ExtraICState extra_ic_state) : state_(extra_ic_state) {}
- explicit LoadICState(ContextualMode mode, LanguageMode language_mode)
- : state_(ContextualModeBits::encode(mode) |
+ explicit LoadICState(TypeofMode typeof_mode, LanguageMode language_mode)
+ : state_(TypeofModeBits::encode(typeof_mode) |
LanguageModeBits::encode(language_mode)) {}
ExtraICState GetExtraICState() const { return state_; }
- ContextualMode contextual_mode() const {
- return ContextualModeBits::decode(state_);
- }
+ TypeofMode typeof_mode() const { return TypeofModeBits::decode(state_); }
LanguageMode language_mode() const {
return LanguageModeBits::decode(state_);
}
- static ContextualMode GetContextualMode(ExtraICState state) {
- return LoadICState(state).contextual_mode();
+ static TypeofMode GetTypeofMode(ExtraICState state) {
+ return LoadICState(state).typeof_mode();
}
static LanguageMode GetLanguageMode(ExtraICState state) {
« no previous file with comments | « src/ic/ic-inl.h ('k') | src/mips/codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698