Use JSString::toIdentifier() in more places.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 21:38:18 +0000 (21:38 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 21:38:18 +0000 (21:38 +0000)
commit99bd655644b5d4ae05647ce2fb8f476e24b8be28
tree3f746f0c1adf0989ab0d08f6bffa597e4754f67b
parentdd8bd7bd2fc95f2f22c04b2a40a0af85cfcff9e2
Use JSString::toIdentifier() in more places.
<https://webkit.org/b/136348>

Call sites that grab the WTF::String from a JSString using value() can
use the more efficient toIdentifier() if the string is going to be used
to construct an Identifier.

If the JSString is a rope that resolves to something that is already
present in the VM's Identifier table, using toIdentifier() can avoid
allocating a new StringImpl.

Reviewed by Geoffrey Garen.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opIn):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncPropertyIsEnumerable):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
Source/JavaScriptCore/runtime/CommonSlowPaths.h
Source/JavaScriptCore/runtime/JSONObject.cpp
Source/JavaScriptCore/runtime/ObjectConstructor.cpp
Source/JavaScriptCore/runtime/ObjectPrototype.cpp