| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 39891513caedde2ee0179e71d31a14af71040e70..7a82c941119df597708a57abc46739803dc9870d 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -6945,24 +6945,6 @@ int Map::SlackForArraySize(int old_size, int size_limit) {
|
| }
|
|
|
|
|
| -void JSArray::EnsureSize(Handle<JSArray> array, int required_size) {
|
| - DCHECK(array->HasFastSmiOrObjectElements());
|
| - Handle<FixedArray> elts = handle(FixedArray::cast(array->elements()));
|
| - const int kArraySizeThatFitsComfortablyInNewSpace = 128;
|
| - if (elts->length() < required_size) {
|
| - // Doubling in size would be overkill, but leave some slack to avoid
|
| - // constantly growing.
|
| - Expand(array, required_size + (required_size >> 3));
|
| - // It's a performance benefit to keep a frequently used array in new-space.
|
| - } else if (!array->GetHeap()->new_space()->Contains(*elts) &&
|
| - required_size < kArraySizeThatFitsComfortablyInNewSpace) {
|
| - // Expand will allocate a new backing store in new space even if the size
|
| - // we asked for isn't larger than what we had before.
|
| - Expand(array, required_size);
|
| - }
|
| -}
|
| -
|
| -
|
| void JSArray::set_length(Smi* length) {
|
| // Don't need a write barrier for a Smi.
|
| set_length(static_cast<Object*>(length), SKIP_WRITE_BARRIER);
|
|
|