Butterfly storage need not be initialized for indexing type Undecided.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 22:40:59 +0000 (22:40 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 22:40:59 +0000 (22:40 +0000)
commit5a6f90c74bd65a9264234579a31d9d96d1845aa6
tree7123d3f2a42a4581a6e2cfdf37e3ad9c4f5cc5f4
parent280fe9f79ebe2a28420e185549ca58f4d53d884c
Butterfly storage need not be initialized for indexing type Undecided.
https://bugs.webkit.org/show_bug.cgi?id=174516

Reviewed by Saam Barati.

While it's not incorrect to initialize the butterfly storage when the
indexingType is Undecided, it is inefficient as we'll end up initializing
it again later when we convert the storage to a different indexingType.
Some of our code already skips initializing Undecided butterflies.
This patch makes it the consistent behavior everywhere.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
* runtime/JSArray.cpp:
(JSC::JSArray::tryCreateUninitializedRestricted):
* runtime/JSArray.h:
(JSC::JSArray::tryCreate):
* runtime/JSObject.cpp:
(JSC::JSObject::ensureLengthSlow):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/runtime/JSArray.cpp
Source/JavaScriptCore/runtime/JSArray.h
Source/JavaScriptCore/runtime/JSObject.cpp