| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 120ca988431a99dde0471883cd51b172573e77d6..b28f19d4450453deb839389af0a4435b09e76e68 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2148,7 +2148,8 @@ void JSObject::InitializeBody(Map* map,
|
| int size = map->instance_size();
|
| int offset = kHeaderSize;
|
| if (filler_value != pre_allocated_value) {
|
| - int pre_allocated = map->pre_allocated_property_fields();
|
| + int pre_allocated =
|
| + map->inobject_properties() - map->unused_property_fields();
|
| DCHECK(pre_allocated * kPointerSize + kHeaderSize <= size);
|
| for (int i = 0; i < pre_allocated; i++) {
|
| WRITE_FIELD(this, offset, pre_allocated_value);
|
| @@ -4083,11 +4084,6 @@ int Map::inobject_properties() {
|
| }
|
|
|
|
|
| -int Map::pre_allocated_property_fields() {
|
| - return READ_BYTE_FIELD(this, kPreAllocatedPropertyFieldsOffset);
|
| -}
|
| -
|
| -
|
| int Map::GetInObjectPropertyOffset(int index) {
|
| // Adjust for the number of properties stored in the object.
|
| index -= inobject_properties();
|
| @@ -4161,12 +4157,7 @@ void Map::set_inobject_properties(int value) {
|
| }
|
|
|
|
|
| -void Map::set_pre_allocated_property_fields(int value) {
|
| - DCHECK(0 <= value && value < 256);
|
| - WRITE_BYTE_FIELD(this,
|
| - kPreAllocatedPropertyFieldsOffset,
|
| - static_cast<byte>(value));
|
| -}
|
| +void Map::clear_unused() { WRITE_BYTE_FIELD(this, kUnusedOffset, 0); }
|
|
|
|
|
| InstanceType Map::instance_type() {
|
|
|