Try to use StringView when comparing JSStrings for equality.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 17:28:32 +0000 (17:28 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 17:28:32 +0000 (17:28 +0000)
commit337dfedb575040f04b1d260c534f618e3c27d23d
treec1af80ba508ab299f9deb31371b87375d0856425
parent13961243a413adda5e41314adb4d1296085c4d84
Try to use StringView when comparing JSStrings for equality.
<https://webkit.org/b/145379>

Reviewed by Darin Adler.

Use JSString::view() when sending two JSStrings to WTF::equal()
for comparison. This avoids creating new objects in the case where
the strings are actually substrings.

* jit/JITOperations.cpp:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::equalSlowCaseInline):
(JSC::JSValue::strictEqualSlowCaseInline):

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