PropertyName's internal string is always atomic.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jul 2014 05:38:30 +0000 (05:38 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jul 2014 05:38:30 +0000 (05:38 +0000)
commit9dc4426467439a5f86b991720adac74cfe5525a1
tree2d32bd8de1e8fd788d7c153ff379a4acdb48342f
parent1d2def0341350ad67590b083461e22c21c2edb61
PropertyName's internal string is always atomic.
<https://webkit.org/b/135451>

Source/JavaScriptCore:
Now that we've merged the JSC::Identifier and WTF::AtomicString tables,
we know that any string that's an Identifier is guaranteed to be atomic.

A PropertyName can be either an Identifier or a PrivateName, and the
private names are also guaranteed to be atomic internally.

Make PropertyName vend AtomicStringImpl* instead of StringImpl*.

Reviewed by Benjamin Poulain.

* runtime/PropertyName.h:
(JSC::PropertyName::PropertyName):
(JSC::PropertyName::uid):
(JSC::PropertyName::publicName):

Source/WebCore:
Use PropertyName::publicName() directly instead of taking the slow route
through AtomicString::findStringWithHash().

These strings are always atomic, and findStringWithHash() would trudge
through a full hash lookup just to discover that indeed, they are!

Reviewed by Benjamin Poulain.

* bindings/js/JSDOMBinding.cpp:
(WebCore::findAtomicString): Deleted.
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):

Source/WTF:
Remove AtomicString::findStringWithHash() since nobody uses it anymore.

Reviewed by Benjamin Poulain.

* wtf/text/AtomicString.cpp:
(WTF::findString): Deleted.
(WTF::AtomicString::findStringWithHash): Deleted.
* wtf/text/AtomicString.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/PropertyName.h
Source/WTF/ChangeLog
Source/WTF/wtf/text/AtomicString.cpp
Source/WTF/wtf/text/AtomicString.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp