Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index deb33653f7844c70ae9d848f5a59e62cbbe43989..408375f2a87a64d6d57016dcd3478b43b39f3205 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -4289,6 +4289,30 @@ uint32_t Map::bit_field3() { |
| } |
| +void Map::set_bit_field4(uint32_t bits) { |
| + // Ensure the upper 2 bits have the same value by sign extending it. This is |
| + // necessary to be able to use the 31st bit. |
|
Toon Verwaest
2013/11/04 17:52:46
This trick isn't really necessary if you aren't us
Hannes Payer (out of office)
2013/11/20 10:36:47
The bit field 3 got cleaned up in the meantime. No
|
| + int value = bits << 1; |
| + WRITE_FIELD(this, kBitField4Offset, Smi::FromInt(value >> 1)); |
| +} |
| + |
| + |
| +uint32_t Map::bit_field4() { |
| + Object* value = READ_FIELD(this, kBitField4Offset); |
| + return Smi::cast(value)->value(); |
| +} |
| + |
| + |
| +void Map::set_has_migrated(bool value) { |
| + set_bit_field4(HasMigrated::update(bit_field4(), value)); |
| +} |
| + |
| + |
| +bool Map::has_migrated() { |
| + return HasMigrated::decode(bit_field4()); |
| +} |
| + |
| + |
| void Map::ClearTransitions(Heap* heap, WriteBarrierMode mode) { |
| Object* back_pointer = GetBackPointer(); |