Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index 9ba769212d757505a8bf2ab835f882eacacdafba..bbb37ef423f7896ba8dfbbcb7591ec3b9beaa0f1 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -2064,7 +2064,10 @@ MaybeObject* Heap::AllocatePartialMap(InstanceType instance_type, |
| reinterpret_cast<Map*>(result)->set_unused_property_fields(0); |
| reinterpret_cast<Map*>(result)->set_bit_field(0); |
| reinterpret_cast<Map*>(result)->set_bit_field2(0); |
| - reinterpret_cast<Map*>(result)->set_bit_field3(0); |
| + int bit_field3 = 0; |
|
Michael Starzinger
2012/09/11 14:37:09
Can we use the following style here as well?
int
Toon Verwaest
2012/09/11 14:49:23
Done.
|
| + bit_field3 = Map::EnumLengthBits::update(bit_field3, Map::kInvalidEnumCache); |
| + bit_field3 = Map::OwnsDescriptors::update(bit_field3, true); |
| + reinterpret_cast<Map*>(result)->set_bit_field3(bit_field3); |
| return result; |
| } |
| @@ -2091,7 +2094,8 @@ MaybeObject* Heap::AllocateMap(InstanceType instance_type, |
| map->set_unused_property_fields(0); |
| map->set_bit_field(0); |
| map->set_bit_field2(1 << Map::kIsExtensible); |
| - int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache); |
| + int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache) | |
| + Map::OwnsDescriptors::encode(true); |
| map->set_bit_field3(bit_field3); |
| map->set_elements_kind(elements_kind); |
| @@ -7129,7 +7133,7 @@ void KeyedLookupCache::Clear() { |
| void DescriptorLookupCache::Clear() { |
| - for (int index = 0; index < kLength; index++) keys_[index].array = NULL; |
| + for (int index = 0; index < kLength; index++) keys_[index].source = NULL; |
| } |