Fast path for jsStringWithCache() when asked for the same string repeatedly.
<https://webkit.org/b/134635>
Source/JavaScriptCore:
Also moved the whole thing from WebCore to JavaScriptCore since it
makes more sense here, and inline the lightweight checks, leaving only
the hashmap stuff out of line.
Reviewed by Darin Adler.
* runtime/JSString.cpp:
(JSC::jsStringWithCacheSlowCase):
* runtime/JSString.h:
(JSC::jsStringWithCache):
* runtime/VM.h:
Source/WebCore:
Reviewed by Darin Adler.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.cpp:
(WebCore::jsStringWithCache): Deleted.
* bindings/js/JSDOMBinding.h:
(WebCore::JSValueTraits<String>::arrayJSValue):
(WebCore::jsStringWithCache): Deleted.
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertNPVariantToValue):
* loader/cache/CachedResourceHandle.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170818
268f45cc-cd09-0410-ab3c-
d52691b4dbfc