Optimize PutByVal when subscript is a rope string.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 18:08:25 +0000 (18:08 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 18:08:25 +0000 (18:08 +0000)
commit7a5514b9e4d6a49e8eba90b48fe30da1e03e397f
treedec2dd4624bb28963ded5dde99ffef086887e027
parent16dc0231892d814ededb871790a06193cd27a09a
Optimize PutByVal when subscript is a rope string.
<https://webkit.org/b/132572>

Add a JSString::toIdentifier() that is smarter when the JSString is
really a rope string. Use this in baseline & DFG's PutByVal to avoid
allocating new StringImpls that we immediately deduplicate anyway.

Reviewed by Antti Koivisto.

* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* jit/JITOperations.cpp:
* runtime/JSString.h:
(JSC::JSString::toIdentifier):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGOperations.cpp
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/runtime/JSString.h