Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index bc18bf8fabde108e6acfbbfa49e2d5fe878beb0c..ef22af87178265704d961337f6dafc0af2d16034 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -168,6 +168,11 @@ enum CompareMapMode { |
ALLOW_ELEMENT_TRANSITION_MAPS |
}; |
+enum KeyedAccessGrowMode { |
+ DO_NOT_ALLOW_JSARRAY_GROWTH, |
+ ALLOW_JSARRAY_GROWTH |
+}; |
+ |
const int kElementsKindCount = LAST_ELEMENTS_KIND - FIRST_ELEMENTS_KIND + 1; |
void PrintElementsKind(FILE* out, ElementsKind kind); |
@@ -4216,6 +4221,28 @@ class Code: public HeapObject { |
// Find the first map in an IC stub. |
Map* FindFirstMap(); |
+ class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; |
+ class ExtraICStateKeyedAccessGrowMode: |
+ public BitField<KeyedAccessGrowMode, 1, 1> {}; // NOLINT |
+ |
+ static const int kExtraICStateGrowModeShift = 1; |
+ |
+ static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) { |
+ return ExtraICStateStrictMode::decode(extra_ic_state); |
+ } |
+ |
+ static inline KeyedAccessGrowMode GetKeyedAccessGrowMode( |
+ ExtraICState extra_ic_state) { |
+ return ExtraICStateKeyedAccessGrowMode::decode(extra_ic_state); |
+ } |
+ |
+ static inline ExtraICState ComputeExtraICState( |
+ KeyedAccessGrowMode grow_mode, |
+ StrictModeFlag strict_mode) { |
+ return ExtraICStateKeyedAccessGrowMode::encode(grow_mode) | |
+ ExtraICStateStrictMode::encode(strict_mode); |
+ } |
+ |
// Flags operations. |
static inline Flags ComputeFlags( |
Kind kind, |