[WTF] Newly added AtomicStringImpl should use BufferInternal static string if StringI...
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jul 2017 15:37:52 +0000 (15:37 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jul 2017 15:37:52 +0000 (15:37 +0000)
commitc44d0bffdbe50526775a77c900a4c5b63d1b08f7
tree1bcad1145631b69ef5ee6e2f300e33e22c99fba4
parent3e5693857ad86849cc1f22e62058d1e52ef1670f
[WTF] Newly added AtomicStringImpl should use BufferInternal static string if StringImpl is static
https://bugs.webkit.org/show_bug.cgi?id=174501

Reviewed by Darin Adler.

Source/WTF:

When creating AtomicStringImpl from static StringImpl, we can just use createWithoutCopying
to create a BufferInternal AtomicStringImpl which m_data{8,16} is static string's one.

* wtf/text/AtomicStringImpl.cpp:
(WTF::CStringTranslator::hash):
(WTF::CStringTranslator::equal):
(WTF::CStringTranslator::translate):
(WTF::AtomicStringImpl::add):
(WTF::HashTranslatorCharBuffer::HashTranslatorCharBuffer):
(WTF::UCharBufferTranslator::hash):
(WTF::UCharBufferTranslator::equal):
(WTF::UCharBufferTranslator::translate):
(WTF::LCharBufferTranslator::hash):
(WTF::LCharBufferTranslator::equal):
(WTF::LCharBufferTranslator::translate):
(WTF::BufferFromStaticDataTranslator::hash):
(WTF::BufferFromStaticDataTranslator::equal):
(WTF::BufferFromStaticDataTranslator::translate):
(WTF::AtomicStringImpl::addLiteral):
(WTF::addSymbol):
(WTF::addStatic):
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::lookUp):
(WTF::CharBufferFromLiteralDataTranslator::hash): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::equal): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::translate): Deleted.
(WTF::addSubstring): Deleted.
* wtf/text/StringImpl.h:

Tools:

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/AtomicStringImpl.cpp
Source/WTF/wtf/text/StringImpl.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp