Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 3349921d9fc08ef9d12046186807cee4e3303bb5..650729f1c53097689485465102ff7785dd10f966 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -4644,6 +4644,7 @@ class Map: public HeapObject { |
class IsShared: public BitField<bool, 0, 1> {}; |
class FunctionWithPrototype: public BitField<bool, 1, 1> {}; |
class LastAddedBits: public BitField<int, 2, 11> {}; |
+ class EnumLengthBits: public BitField<int, 13, 11> {}; |
// Tells whether the object in the prototype property will be used |
// for instances created from this function. If the prototype |
@@ -4876,6 +4877,14 @@ class Map: public HeapObject { |
set_bit_field3(LastAddedBits::update(bit_field3(), index)); |
} |
+ int EnumLength() { |
+ return EnumLengthBits::decode(bit_field3()); |
+ } |
+ |
+ void SetEnumLength(int index) { |
+ set_bit_field3(EnumLengthBits::update(bit_field3(), index)); |
+ } |
+ |
int LastAdded() { |
Michael Starzinger
2012/08/06 15:06:22
Can we move LastAdded() up just above SetLastAdded
Toon Verwaest
2012/08/07 10:49:47
Done.
|
return LastAddedBits::decode(bit_field3()); |
} |
@@ -5028,6 +5037,7 @@ class Map: public HeapObject { |
// Constant for denoting that the LastAdded field was not yet set. |
static const int kNoneAdded = LastAddedBits::kMax; |
+ static const int kInvalidEnumCache = EnumLengthBits::kMax; |
// Layout description. |
static const int kInstanceSizesOffset = HeapObject::kHeaderSize; |