Fix overlapping KeyedLoadIC bitfield.
authorconradw <conradw@chromium.org>
Fri, 19 Jun 2015 13:37:44 +0000 (06:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 13:37:51 +0000 (13:37 +0000)
BUG=
LOG=N

Review URL: https://codereview.chromium.org/1192383003

Cr-Commit-Position: refs/heads/master@{#29148}

src/ic/ic-state.h
src/ic/ic.h

index 89e455d..e1fed19 100644 (file)
@@ -203,11 +203,14 @@ class CompareICState {
 class LoadICState final BASE_EMBEDDED {
  private:
   class ContextualModeBits : public BitField<ContextualMode, 0, 1> {};
-  class LanguageModeBits : public BitField<LanguageMode, 1, 2> {};
+  class LanguageModeBits
+      : public BitField<LanguageMode, ContextualModeBits::kNext, 2> {};
   STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0);
   const ExtraICState state_;
 
  public:
+  static const uint32_t kNextBitFieldOffset = LanguageModeBits::kNext;
+
   static const ExtraICState kStrongModeState = STRONG
                                                << LanguageModeBits::kShift;
 
index 935d856..f1291c9 100644 (file)
@@ -444,7 +444,8 @@ class LoadIC : public IC {
 class KeyedLoadIC : public LoadIC {
  public:
   // ExtraICState bits (building on IC)
-  class IcCheckTypeField : public BitField<IcCheckType, 2, 1> {};
+  class IcCheckTypeField
+      : public BitField<IcCheckType, LoadICState::kNextBitFieldOffset, 1> {};
 
   static ExtraICState ComputeExtraICState(ContextualMode contextual_mode,
                                           LanguageMode language_mode,