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)
commitb1476bc9ca34ff1e8f24a8b1fe6673d1ae17b784
tree7123d3f2a42a4581a6e2cfdf37e3ad9c4f5cc5f4
parent94cde699fb133df71eb8a12125d7982ee7c2cf8a
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: https://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