| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index b81921e12b8e56a038241e9dfb24403a81df2e55..1a46ee9d7136e41d826591113c788101a72e6903 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2078,23 +2078,12 @@ bool JSObject::HasFastProperties() {
|
| }
|
|
|
|
|
| -bool JSObject::TooManyFastProperties(StoreFromKeyed store_mode) {
|
| - // Allow extra fast properties if the object has more than
|
| - // kFastPropertiesSoftLimit in-object properties. When this is the case, it is
|
| - // very unlikely that the object is being used as a dictionary and there is a
|
| - // good chance that allowing more map transitions will be worth it.
|
| - Map* map = this->map();
|
| - if (map->unused_property_fields() != 0) return false;
|
| -
|
| - int inobject = map->inobject_properties();
|
| -
|
| - int limit;
|
| - if (store_mode == CERTAINLY_NOT_STORE_FROM_KEYED) {
|
| - limit = Max(inobject, kMaxFastProperties);
|
| - } else {
|
| - limit = Max(inobject, kFastPropertiesSoftLimit);
|
| - }
|
| - return properties()->length() > limit;
|
| +bool Map::TooManyFastProperties(StoreFromKeyed store_mode) {
|
| + if (unused_property_fields() != 0) return false;
|
| + int minimum = store_mode == CERTAINLY_NOT_STORE_FROM_KEYED ? 128 : 12;
|
| + int limit = Max(minimum, inobject_properties());
|
| + int external = NumberOfFields() - inobject_properties();
|
| + return external > limit;
|
| }
|
|
|
|
|
|
|