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: http://svn.webkit.org/repository/webkit/trunk@168300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4 files changed