Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 04:19:14 +0000 (04:19 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 04:19:14 +0000 (04:19 +0000)
commit2911bf5cfa758a1c221f4dd6515b3d83e4a3fcad
tree663e49e7ace5e61c17125121a6bd822f56efaca3
parent1f2c7465ce44144f4b326415f60ab7a70c5a93b0
Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
https://bugs.webkit.org/show_bug.cgi?id=145109

Reviewed by Darin Adler.

Source/JavaScriptCore:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::nameForRegister):
* runtime/Identifier.cpp:
(JSC::Identifier::add):
(JSC::Identifier::add8):
* runtime/Identifier.h:
(JSC::Identifier::add):
* runtime/IdentifierInlines.h:
(JSC::Identifier::Identifier):
(JSC::Identifier::add):
* runtime/JSString.cpp:
(JSC::JSRopeString::resolveRopeToExistingAtomicString):
* runtime/JSString.h:
(JSC::JSString::toExistingAtomicString):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::SmallStringsStorage):
* runtime/TypeSet.cpp:
(JSC::StructureShape::propertyHash):

Source/WebCore:

* dom/TreeScope.cpp:
(WebCore::TreeScope::getElementById):

Source/WTF:

Now AtomicStringImpl table operations are located in AtomicString.
But they should be under AtomicStringImpl.
This patch simply moves these operations to AtomicStringImpl.

And this patch renames static AtomicString::find to static AtomicStringImpl::lookUp
because it conflicts with AtomicStringImpl's member function name.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.vcxproj/copy-files.cmd:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PlatformMac.cmake:
* wtf/PlatformWin.cmake:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::lower):
(WTF::AtomicString::convertToASCIILowercase):
(WTF::AtomicString::fromUTF8Internal):
(WTF::AtomicStringTableLocker::AtomicStringTableLocker): Deleted.
(WTF::stringTable): Deleted.
(WTF::addToStringTable): Deleted.
(WTF::CStringTranslator::hash): Deleted.
(WTF::CStringTranslator::equal): Deleted.
(WTF::CStringTranslator::translate): Deleted.
(WTF::AtomicString::add): Deleted.
(WTF::UCharBufferTranslator::hash): Deleted.
(WTF::UCharBufferTranslator::equal): Deleted.
(WTF::UCharBufferTranslator::translate): Deleted.
(WTF::HashAndCharactersTranslator::hash): Deleted.
(WTF::HashAndCharactersTranslator::equal): Deleted.
(WTF::HashAndCharactersTranslator::translate): Deleted.
(WTF::HashAndUTF8CharactersTranslator::hash): Deleted.
(WTF::HashAndUTF8CharactersTranslator::equal): Deleted.
(WTF::HashAndUTF8CharactersTranslator::translate): Deleted.
(WTF::SubstringTranslator::translate): Deleted.
(WTF::SubstringTranslator8::hash): Deleted.
(WTF::SubstringTranslator8::equal): Deleted.
(WTF::SubstringTranslator16::hash): Deleted.
(WTF::SubstringTranslator16::equal): Deleted.
(WTF::LCharBufferTranslator::hash): Deleted.
(WTF::LCharBufferTranslator::equal): Deleted.
(WTF::LCharBufferTranslator::translate): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::hash): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::equal): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::translate): Deleted.
(WTF::AtomicString::addFromLiteralData): Deleted.
(WTF::AtomicString::addSlowCase): Deleted.
(WTF::AtomicString::remove): Deleted.
(WTF::AtomicString::findSlowCase): Deleted.
(WTF::AtomicString::findInternal): Deleted.
(WTF::AtomicString::isInAtomicStringTable): Deleted.
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
(WTF::AtomicString::fromUTF8):
(WTF::AtomicString::find): Deleted.
(WTF::AtomicString::add): Deleted.
(WTF::AtomicString::addWithStringTableProvider): Deleted.
* wtf/text/AtomicStringImpl.cpp: Copied from Source/WTF/wtf/text/AtomicString.cpp.
(WTF::AtomicStringTableLocker::AtomicStringTableLocker):
(WTF::stringTable):
(WTF::addToStringTable):
(WTF::CStringTranslator::hash):
(WTF::CStringTranslator::equal):
(WTF::CStringTranslator::translate):
(WTF::AtomicStringImpl::add):
(WTF::UCharBufferTranslator::hash):
(WTF::UCharBufferTranslator::equal):
(WTF::UCharBufferTranslator::translate):
(WTF::HashAndCharactersTranslator::hash):
(WTF::HashAndCharactersTranslator::equal):
(WTF::HashAndCharactersTranslator::translate):
(WTF::HashAndUTF8CharactersTranslator::hash):
(WTF::HashAndUTF8CharactersTranslator::equal):
(WTF::HashAndUTF8CharactersTranslator::translate):
(WTF::SubstringTranslator::translate):
(WTF::SubstringTranslator8::hash):
(WTF::SubstringTranslator8::equal):
(WTF::SubstringTranslator16::hash):
(WTF::SubstringTranslator16::equal):
(WTF::LCharBufferTranslator::hash):
(WTF::LCharBufferTranslator::equal):
(WTF::LCharBufferTranslator::translate):
(WTF::CharBufferFromLiteralDataTranslator::hash):
(WTF::CharBufferFromLiteralDataTranslator::equal):
(WTF::CharBufferFromLiteralDataTranslator::translate):
(WTF::AtomicStringImpl::addLiteral):
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::remove):
(WTF::AtomicStringImpl::lookUpSlowCase):
(WTF::AtomicStringImpl::addUTF8):
(WTF::AtomicStringImpl::lookUpInternal):
(WTF::AtomicStringImpl::isInAtomicStringTable):
* wtf/text/AtomicStringImpl.h:
(WTF::AtomicStringImpl::lookUp):
(WTF::AtomicStringImpl::add):
(WTF::AtomicStringImpl::addWithStringTableProvider):
(WTF::AtomicStringImpl::AtomicStringImpl): Deleted.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
(WTF::String::String):
* wtf/text/cf/AtomicStringCF.cpp:
(WTF::AtomicString::add): Deleted.
* wtf/text/cf/AtomicStringImplCF.cpp: Renamed from Source/WTF/wtf/text/cf/AtomicStringCF.cpp.
(WTF::AtomicStringImpl::add):

Tools:

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/runtime/Identifier.cpp
Source/JavaScriptCore/runtime/Identifier.h
Source/JavaScriptCore/runtime/IdentifierInlines.h
Source/JavaScriptCore/runtime/JSString.cpp
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/SmallStrings.cpp
Source/JavaScriptCore/runtime/TypeSet.cpp
Source/WTF/ChangeLog
Source/WTF/WTF.vcxproj/WTF.vcxproj
Source/WTF/WTF.vcxproj/WTF.vcxproj.filters
Source/WTF/WTF.vcxproj/copy-files.cmd
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PlatformMac.cmake
Source/WTF/wtf/PlatformWin.cmake
Source/WTF/wtf/text/AtomicString.cpp
Source/WTF/wtf/text/AtomicString.h
Source/WTF/wtf/text/AtomicStringImpl.cpp [new file with mode: 0644]
Source/WTF/wtf/text/AtomicStringImpl.h
Source/WTF/wtf/text/StringImpl.cpp
Source/WTF/wtf/text/StringImpl.h
Source/WTF/wtf/text/WTFString.h
Source/WTF/wtf/text/cf/AtomicStringImplCF.cpp [moved from Source/WTF/wtf/text/cf/AtomicStringCF.cpp with 95% similarity]
Source/WebCore/ChangeLog
Source/WebCore/dom/TreeScope.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp