Tidy up the remaining bits of the AtomicString to AtomString rename
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jun 2019 16:21:50 +0000 (16:21 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jun 2019 16:21:50 +0000 (16:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198990

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage): Use flagIsAtom.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Ditto.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Ditto.
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileHasOwnProperty): Ditto.
(JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent): Ditto.

Source/WebCore:

* bindings/scripts/test/JS/JSTestObj.cpp: Updated names.
* bindings/scripts/test/TestObj.idl: Ditto.

* css/makeprop.pl: Updated comment.
* css/makevalues.pl: Ditto.
* html/FormController.cpp:
(WebCore::FormKeyGenerator::formKey): Ditto.

Source/WTF:

* wtf/text/AtomString.cpp: Fix a comment.
* wtf/text/AtomString.h: Tweak formatting a bit. Use nullptr instead of 0.
Removed "using AtomicString = AtomString".
* wtf/text/AtomStringImpl.cpp:
(WTF::CStringTranslator::translate): Use setIsAtom instead of setIsAtomic.
(WTF::UCharBufferTranslator::translate): Ditto.
(WTF::HashAndUTF8CharactersTranslator::translate): Ditto.
(WTF::SubstringTranslator::translate): Ditto.
(WTF::LCharBufferTranslator::translate): Ditto.
(WTF::BufferFromStaticDataTranslator::translate): Ditto.
(WTF::AtomStringImpl::addSlowCase): Ditto.
(WTF::AtomStringImpl::lookUpSlowCase): Updated assertion message.

* wtf/text/AtomStringImpl.h: Tweaked the implementation of add.
Updated comments to say AtomString.

* wtf/text/AtomStringTable.cpp:
(WTF::AtomStringTable::~AtomStringTable): Use setIsAtom.

* wtf/text/StringImpl.h: Updated name of StringAtomic and
s_hashFlagStringKindIsAtom. Renamed to flagIsAtom and setIsAtom.

* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread const): Updated comment.

Tools:

* Scripts/do-webcore-rename: Removed already-done renames.
* TestWebKitAPI/Tests/WTF/StringImpl.cpp: Rename one use of "atomic".

LayoutTests:

* js/dopey-rope-with-16-bit-propertyname-expected.txt: Rename to AtomString.
* js/dopey-rope-with-16-bit-propertyname.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
LayoutTests/ChangeLog
LayoutTests/js/dopey-rope-with-16-bit-propertyname-expected.txt
LayoutTests/js/dopey-rope-with-16-bit-propertyname.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/text/AtomString.cpp
Source/WTF/wtf/text/AtomString.h
Source/WTF/wtf/text/AtomStringImpl.cpp
Source/WTF/wtf/text/AtomStringImpl.h
Source/WTF/wtf/text/AtomStringTable.cpp
Source/WTF/wtf/text/StringImpl.cpp
Source/WTF/wtf/text/StringImpl.h
Source/WTF/wtf/text/WTFString.cpp
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/css/makeprop.pl
Source/WebCore/css/makevalues.pl
Source/WebCore/html/FormController.cpp
Tools/ChangeLog
Tools/Scripts/do-webcore-rename
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp

index 54305a0..3ceb344 100644 (file)
@@ -1,3 +1,13 @@
+2019-06-18  Darin Adler  <darin@apple.com>
+
+        Tidy up the remaining bits of the AtomicString to AtomString rename
+        https://bugs.webkit.org/show_bug.cgi?id=198990
+
+        Reviewed by Michael Catanzaro.
+
+        * js/dopey-rope-with-16-bit-propertyname-expected.txt: Rename to AtomString.
+        * js/dopey-rope-with-16-bit-propertyname.html: Ditto.
+
 2019-06-19  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [WHLSL] Hook up common texture functions
index 6f25f19..eb708bc 100644 (file)
@@ -1,4 +1,4 @@
-Test that a 16-bit AtomicString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomicString.
+Test that a 16-bit AtomString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomString.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
index d94b4b5..1b2d4f0 100644 (file)
@@ -7,14 +7,14 @@
 <body>
 <script>
 
-description("Test that a 16-bit AtomicString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomicString.");
+description("Test that a 16-bit AtomString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomString.");
 
 o = {};
 
 stringWithEmoji = "zest😐";
 var test16bit = stringWithEmoji.substring(0, 4);
 
-o[test16bit] = "this makes it an AtomicString";
+o[test16bit] = "this makes it an AtomString";
 
 globalRope = "";
 
index 974f901..10940f3 100644 (file)
@@ -1,3 +1,20 @@
+2019-06-18  Darin Adler  <darin@apple.com>
+
+        Tidy up the remaining bits of the AtomicString to AtomString rename
+        https://bugs.webkit.org/show_bug.cgi?id=198990
+
+        Reviewed by Michael Catanzaro.
+
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage): Use flagIsAtom.
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile): Ditto.
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile): Ditto.
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileHasOwnProperty): Ditto.
+        (JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent): Ditto.
+
 2019-06-19  Alexey Shvayka  <shvaikalesh@gmail.com>
 
         Optimize `resolve` method lookup in Promise static methods
index 2135c8e..1f3638d 100644 (file)
@@ -10281,7 +10281,7 @@ void SpeculativeJIT::speculateStringIdentAndLoadStorage(Edge edge, GPRReg string
         BadType, JSValueSource::unboxedCell(string), edge, m_jit.branchTest32(
             MacroAssembler::Zero,
             MacroAssembler::Address(storage, StringImpl::flagsOffset()),
-            MacroAssembler::TrustedImm32(StringImpl::flagIsAtomic())));
+            MacroAssembler::TrustedImm32(StringImpl::flagIsAtom())));
     
     m_interpreter.filter(edge, SpecStringIdent | ~SpecString);
 }
index 75f102b..b3d1d1d 100644 (file)
@@ -3899,7 +3899,7 @@ void SpeculativeJIT::compile(Node* node)
             slowPath.append(m_jit.branchIfRopeStringImpl(implGPR));
             slowPath.append(m_jit.branchTest32(
                 MacroAssembler::Zero, MacroAssembler::Address(implGPR, StringImpl::flagsOffset()),
-                MacroAssembler::TrustedImm32(StringImpl::flagIsAtomic())));
+                MacroAssembler::TrustedImm32(StringImpl::flagIsAtom())));
             break;
         }
         case UntypedUse: {
@@ -3909,7 +3909,7 @@ void SpeculativeJIT::compile(Node* node)
             slowPath.append(m_jit.branchIfRopeStringImpl(implGPR));
             slowPath.append(m_jit.branchTest32(
                 MacroAssembler::Zero, MacroAssembler::Address(implGPR, StringImpl::flagsOffset()),
-                MacroAssembler::TrustedImm32(StringImpl::flagIsAtomic())));
+                MacroAssembler::TrustedImm32(StringImpl::flagIsAtom())));
             auto hasUniquedImpl = m_jit.jump();
 
             isNotString.link(&m_jit);
index f3a0b2b..9d0ae0a 100644 (file)
@@ -4466,7 +4466,7 @@ void SpeculativeJIT::compile(Node* node)
             slowPath.append(m_jit.branchIfRopeStringImpl(implGPR));
             slowPath.append(m_jit.branchTest32(
                 MacroAssembler::Zero, MacroAssembler::Address(implGPR, StringImpl::flagsOffset()),
-                MacroAssembler::TrustedImm32(StringImpl::flagIsAtomic())));
+                MacroAssembler::TrustedImm32(StringImpl::flagIsAtom())));
             break;
         }
         case UntypedUse: {
@@ -4476,7 +4476,7 @@ void SpeculativeJIT::compile(Node* node)
             slowPath.append(m_jit.branchIfRopeStringImpl(implGPR));
             slowPath.append(m_jit.branchTest32(
                 MacroAssembler::Zero, MacroAssembler::Address(implGPR, StringImpl::flagsOffset()),
-                MacroAssembler::TrustedImm32(StringImpl::flagIsAtomic())));
+                MacroAssembler::TrustedImm32(StringImpl::flagIsAtom())));
             auto hasUniquedImpl = m_jit.jump();
 
             isNotString.link(&m_jit);
index a539b05..c4a6705 100644 (file)
@@ -10463,7 +10463,7 @@ private:
 
             lastNext = m_out.appendTo(isNonEmptyString, isAtomString);
             uniquedStringImpl = m_out.loadPtr(keyAsValue, m_heaps.JSString_value);
-            LValue isNotAtomic = m_out.testIsZero32(m_out.load32(uniquedStringImpl, m_heaps.StringImpl_hashAndFlags), m_out.constInt32(StringImpl::flagIsAtomic()));
+            LValue isNotAtomic = m_out.testIsZero32(m_out.load32(uniquedStringImpl, m_heaps.StringImpl_hashAndFlags), m_out.constInt32(StringImpl::flagIsAtom()));
             m_out.branch(isNotAtomic, rarely(slowCase), usually(isAtomString));
 
             m_out.appendTo(isAtomString, slowCase);
@@ -10495,7 +10495,7 @@ private:
             m_out.appendTo(isNonEmptyString, notStringCase);
             LValue implFromString = m_out.loadPtr(keyAsValue, m_heaps.JSString_value);
             ValueFromBlock stringResult = m_out.anchor(implFromString);
-            LValue isNotAtomic = m_out.testIsZero32(m_out.load32(implFromString, m_heaps.StringImpl_hashAndFlags), m_out.constInt32(StringImpl::flagIsAtomic()));
+            LValue isNotAtomic = m_out.testIsZero32(m_out.load32(implFromString, m_heaps.StringImpl_hashAndFlags), m_out.constInt32(StringImpl::flagIsAtom()));
             m_out.branch(isNotAtomic, rarely(slowCase), usually(hasUniquedStringImpl));
 
             m_out.appendTo(notStringCase, isSymbolCase);
@@ -16421,7 +16421,7 @@ private:
             BadType, jsValueValue(string), edge.node(),
             m_out.testIsZero32(
                 m_out.load32(stringImpl, m_heaps.StringImpl_hashAndFlags),
-                m_out.constInt32(StringImpl::flagIsAtomic())));
+                m_out.constInt32(StringImpl::flagIsAtom())));
         m_interpreter.filter(edge, SpecStringIdent | ~SpecString);
     }
     
index 7958d73..f87357d 100644 (file)
@@ -1,3 +1,35 @@
+2019-06-18  Darin Adler  <darin@apple.com>
+
+        Tidy up the remaining bits of the AtomicString to AtomString rename
+        https://bugs.webkit.org/show_bug.cgi?id=198990
+
+        Reviewed by Michael Catanzaro.
+
+        * wtf/text/AtomString.cpp: Fix a comment.
+        * wtf/text/AtomString.h: Tweak formatting a bit. Use nullptr instead of 0.
+        Removed "using AtomicString = AtomString".
+        * wtf/text/AtomStringImpl.cpp:
+        (WTF::CStringTranslator::translate): Use setIsAtom instead of setIsAtomic.
+        (WTF::UCharBufferTranslator::translate): Ditto.
+        (WTF::HashAndUTF8CharactersTranslator::translate): Ditto.
+        (WTF::SubstringTranslator::translate): Ditto.
+        (WTF::LCharBufferTranslator::translate): Ditto.
+        (WTF::BufferFromStaticDataTranslator::translate): Ditto.
+        (WTF::AtomStringImpl::addSlowCase): Ditto.
+        (WTF::AtomStringImpl::lookUpSlowCase): Updated assertion message.
+
+        * wtf/text/AtomStringImpl.h: Tweaked the implementation of add.
+        Updated comments to say AtomString.
+
+        * wtf/text/AtomStringTable.cpp:
+        (WTF::AtomStringTable::~AtomStringTable): Use setIsAtom.
+
+        * wtf/text/StringImpl.h: Updated name of StringAtomic and
+        s_hashFlagStringKindIsAtom. Renamed to flagIsAtom and setIsAtom.
+
+        * wtf/text/WTFString.cpp:
+        (WTF::String::isSafeToSendToAnotherThread const): Updated comment.
+
 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Remove support for GTK2 plugins
index 05f5c61..7068f5f 100644 (file)
@@ -39,7 +39,7 @@ ALWAYS_INLINE AtomString AtomString::convertASCIICase() const
         return nullAtom();
 
     // Convert short strings without allocating a new StringImpl, since
-    // there's a good chance these strings are already in the atomic
+    // there's a good chance these strings are already in the atom
     // string table and so no memory allocation will be required.
     unsigned length;
     const unsigned localBufferSize = 100;
index 9d43e1f..9878192 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -90,7 +90,8 @@ public:
     operator const String&() const { return m_string; }
     const String& string() const { return m_string; };
 
-    AtomStringImpl* impl() const { return static_cast<AtomStringImpl *>(m_string.impl()); }
+    // FIXME: What guarantees this isn't a SymbolImpl rather than an AtomStringImpl?
+    AtomStringImpl* impl() const { return static_cast<AtomStringImpl*>(m_string.impl()); }
 
     bool is8Bit() const { return m_string.is8Bit(); }
     const LChar* characters8() const { return m_string.characters8(); }
@@ -132,9 +133,9 @@ public:
     WTF_EXPORT_PRIVATE AtomString convertToASCIILowercase() const;
     WTF_EXPORT_PRIVATE AtomString convertToASCIIUppercase() const;
 
-    int toInt(bool* ok = 0) const { return m_string.toInt(ok); }
-    double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); }
-    float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); }
+    int toInt(bool* ok = nullptr) const { return m_string.toInt(ok); }
+    double toDouble(bool* ok = nullptr) const { return m_string.toDouble(ok); }
+    float toFloat(bool* ok = nullptr) const { return m_string.toFloat(ok); }
     bool percentage(int& p) const { return m_string.percentage(p); }
 
     bool isNull() const { return m_string.isNull(); }
@@ -145,8 +146,8 @@ public:
 #endif
 
 #ifdef __OBJC__
-    AtomString(NSString*);
-    operator NSString*() const { return m_string; }
+    AtomString(NSString *);
+    operator NSString *() const { return m_string; }
 #endif
 
 #if OS(WINDOWS) && U_ICU_VERSION_MAJOR_NUM >= 59
@@ -177,9 +178,7 @@ private:
     String m_string;
 };
 
-using AtomicString = AtomString;
-
-static_assert(sizeof(AtomString) == sizeof(String), "AtomString and String must be same size!");
+static_assert(sizeof(AtomString) == sizeof(String), "AtomString and String must be the same size!");
 
 inline bool operator==(const AtomString& a, const AtomString& b) { return a.impl() == b.impl(); }
 bool operator==(const AtomString&, const LChar*);
@@ -281,14 +280,14 @@ inline AtomString::AtomString(CFStringRef string)
 
 #ifdef __OBJC__
 
-inline AtomString::AtomString(NSStringstring)
+inline AtomString::AtomString(NSString *string)
     : m_string(AtomStringImpl::add((__bridge CFStringRef)string))
 {
 }
 
 #endif
 
-// Define external global variables for the commonly used atomic strings.
+// Define external global variables for the commonly used atom strings.
 // These are only usable from the main thread.
 extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomString> nullAtomData;
 extern WTF_EXPORT_PRIVATE LazyNeverDestroyed<AtomString> emptyAtomData;
@@ -360,7 +359,6 @@ template<> struct IntegerToStringConversionTrait<AtomString> {
 } // namespace WTF
 
 using WTF::AtomString;
-using WTF::AtomicString;
 using WTF::nullAtom;
 using WTF::emptyAtom;
 using WTF::starAtom;
index 87a64ee..bfb69d3 100644 (file)
@@ -108,7 +108,7 @@ struct CStringTranslator {
     {
         location = &StringImpl::create(characters).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -159,7 +159,7 @@ struct UCharBufferTranslator {
     {
         location = &StringImpl::create8BitIfPossible(buf.characters, buf.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -227,7 +227,7 @@ struct HashAndUTF8CharactersTranslator {
 
         location = &newString.leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -270,7 +270,7 @@ struct SubstringTranslator {
     {
         location = &StringImpl::createSubstringSharingImpl(*buffer.baseString, buffer.start, buffer.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -335,7 +335,7 @@ struct LCharBufferTranslator {
     {
         location = &StringImpl::create(buf.characters, buf.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -356,7 +356,7 @@ struct BufferFromStaticDataTranslator {
     {
         location = &StringImpl::createWithoutCopying(buf.characters, buf.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -437,14 +437,14 @@ Ref<AtomStringImpl> AtomStringImpl::addSlowCase(StringImpl& string)
     if (string.isSymbol())
         return addSymbol(string);
 
-    ASSERT_WITH_MESSAGE(!string.isAtom(), "AtomStringImpl should not hit the slow case if the string is already atomic.");
+    ASSERT_WITH_MESSAGE(!string.isAtom(), "AtomStringImpl should not hit the slow case if the string is already an atom.");
 
     AtomStringTableLocker locker;
     auto addResult = stringTable().add(&string);
 
     if (addResult.isNewEntry) {
         ASSERT(*addResult.iterator == &string);
-        string.setIsAtomic(true);
+        string.setIsAtom(true);
     }
 
     return *static_cast<AtomStringImpl*>(*addResult.iterator);
@@ -467,14 +467,14 @@ Ref<AtomStringImpl> AtomStringImpl::addSlowCase(AtomStringTable& stringTable, St
         return addSymbol(locker, stringTable.table(), string);
     }
 
-    ASSERT_WITH_MESSAGE(!string.isAtom(), "AtomStringImpl should not hit the slow case if the string is already atomic.");
+    ASSERT_WITH_MESSAGE(!string.isAtom(), "AtomStringImpl should not hit the slow case if the string is already an atom.");
 
     AtomStringTableLocker locker;
     auto addResult = stringTable.table().add(&string);
 
     if (addResult.isNewEntry) {
         ASSERT(*addResult.iterator == &string);
-        string.setIsAtomic(true);
+        string.setIsAtom(true);
     }
 
     return *static_cast<AtomStringImpl*>(*addResult.iterator);
@@ -486,14 +486,14 @@ void AtomStringImpl::remove(AtomStringImpl* string)
     AtomStringTableLocker locker;
     auto& atomStringTable = stringTable();
     auto iterator = atomStringTable.find(string);
-    ASSERT_WITH_MESSAGE(iterator != atomStringTable.end(), "The string being removed is atomic in the string table of an other thread!");
+    ASSERT_WITH_MESSAGE(iterator != atomStringTable.end(), "The string being removed is an atom in the string table of an other thread!");
     ASSERT(string == *iterator);
     atomStringTable.remove(iterator);
 }
 
 RefPtr<AtomStringImpl> AtomStringImpl::lookUpSlowCase(StringImpl& string)
 {
-    ASSERT_WITH_MESSAGE(!string.isAtom(), "AtomicStringImpls should return from the fast case.");
+    ASSERT_WITH_MESSAGE(!string.isAtom(), "AtomStringImpl objects should return from the fast case.");
 
     if (!string.length())
         return static_cast<AtomStringImpl*>(StringImpl::empty());
index 3466a91..e35a9d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Apple Inc.
+ * Copyright (C) 2006-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -49,7 +49,7 @@ public:
     ALWAYS_INLINE static RefPtr<AtomStringImpl> add(StringImpl* string)
     {
         if (!string)
-            return static_cast<AtomStringImpl*>(string);
+            return nullptr;
         return add(*string);
     }
     WTF_EXPORT_PRIVATE static RefPtr<AtomStringImpl> add(const StaticStringImpl*);
@@ -80,7 +80,7 @@ private:
     ALWAYS_INLINE static Ref<AtomStringImpl> add(StringImpl& string)
     {
         if (string.isAtom()) {
-            ASSERT_WITH_MESSAGE(!string.length() || isInAtomStringTable(&string), "The atomic string comes from an other thread!");
+            ASSERT_WITH_MESSAGE(!string.length() || isInAtomStringTable(&string), "The atom string comes from an other thread!");
             return static_cast<AtomStringImpl&>(string);
         }
         return addSlowCase(string);
@@ -89,7 +89,7 @@ private:
     ALWAYS_INLINE static Ref<AtomStringImpl> add(AtomStringTable& stringTable, StringImpl& string)
     {
         if (string.isAtom()) {
-            ASSERT_WITH_MESSAGE(!string.length() || isInAtomStringTable(&string), "The atomic string comes from an other thread!");
+            ASSERT_WITH_MESSAGE(!string.length() || isInAtomStringTable(&string), "The atom string comes from an other thread!");
             return static_cast<AtomStringImpl&>(string);
         }
         return addSlowCase(stringTable, string);
@@ -102,20 +102,19 @@ private:
 };
 
 #if !ASSERT_DISABLED
-// AtomicStringImpls created from StaticStringImpl will ASSERT
-// in the generic ValueCheck<T>::checkConsistency
-// as they are not allocated by fastMalloc.
-// We don't currently have any way to detect that case
-// so we ignore the consistency check for all AtomicStringImpls*.
-template<> struct
-ValueCheck<AtomStringImpl*> {
+
+// AtomStringImpls created from StaticStringImpl will ASSERT in the generic ValueCheck<T>::checkConsistency,
+// as they are not allocated by fastMalloc. We don't currently have any way to detect that case, so we don't
+// do any consistency check for AtomStringImpl*.
+
+template<> struct ValueCheck<AtomStringImpl*> {
     static void checkConsistency(const AtomStringImpl*) { }
 };
 
-template<> struct
-ValueCheck<const AtomStringImpl*> {
+template<> struct ValueCheck<const AtomStringImpl*> {
     static void checkConsistency(const AtomStringImpl*) { }
 };
+
 #endif
 
 }
index 9812ac2..c138252 100644 (file)
@@ -32,7 +32,7 @@ namespace WTF {
 AtomStringTable::~AtomStringTable()
 {
     for (auto* string : m_table)
-        string->setIsAtomic(false);
+        string->setIsAtom(false);
 }
 
 }
index 3f60781..0cab928 100644 (file)
@@ -102,7 +102,7 @@ void StringStats::printStats()
 }
 #endif
 
-StringImpl::StaticStringImpl StringImpl::s_atomicEmptyString("", StringImpl::StringAtomic);
+StringImpl::StaticStringImpl StringImpl::s_emptyAtomString("", StringImpl::StringAtom);
 
 StringImpl::~StringImpl()
 {
index d79c557..fddcdb3 100644 (file)
@@ -197,16 +197,16 @@ private:
     static_assert(s_flagCount <= StringHasher::flagCount, "StringHasher reserves enough bits for StringImpl flags");
     static constexpr const unsigned s_flagStringKindCount = 4;
 
-    static constexpr const unsigned s_hashFlagStringKindIsAtomic = 1u << (s_flagStringKindCount);
+    static constexpr const unsigned s_hashFlagStringKindIsAtom = 1u << (s_flagStringKindCount);
     static constexpr const unsigned s_hashFlagStringKindIsSymbol = 1u << (s_flagStringKindCount + 1);
-    static constexpr const unsigned s_hashMaskStringKind = s_hashFlagStringKindIsAtomic | s_hashFlagStringKindIsSymbol;
+    static constexpr const unsigned s_hashMaskStringKind = s_hashFlagStringKindIsAtom | s_hashFlagStringKindIsSymbol;
     static constexpr const unsigned s_hashFlagDidReportCost = 1u << 3;
     static constexpr const unsigned s_hashFlag8BitBuffer = 1u << 2;
     static constexpr const unsigned s_hashMaskBufferOwnership = (1u << 0) | (1u << 1);
 
     enum StringKind {
         StringNormal = 0u, // non-symbol, non-atomic
-        StringAtomic = s_hashFlagStringKindIsAtomic, // non-symbol, atomic
+        StringAtom = s_hashFlagStringKindIsAtom, // non-symbol, atomic
         StringSymbol = s_hashFlagStringKindIsSymbol, // symbol, non-atomic
     };
 
@@ -265,7 +265,7 @@ public:
 
     static unsigned flagsOffset() { return OBJECT_OFFSETOF(StringImpl, m_hashAndFlags); }
     static constexpr unsigned flagIs8Bit() { return s_hashFlag8BitBuffer; }
-    static constexpr unsigned flagIsAtomic() { return s_hashFlagStringKindIsAtomic; }
+    static constexpr unsigned flagIsAtom() { return s_hashFlagStringKindIsAtom; }
     static constexpr unsigned flagIsSymbol() { return s_hashFlagStringKindIsSymbol; }
     static constexpr unsigned maskStringKind() { return s_hashMaskStringKind; }
     static unsigned dataOffset() { return OBJECT_OFFSETOF(StringImpl, m_data8); }
@@ -292,8 +292,8 @@ public:
     WTF_EXPORT_PRIVATE size_t sizeInBytes() const;
 
     bool isSymbol() const { return m_hashAndFlags & s_hashFlagStringKindIsSymbol; }
-    bool isAtom() const { return m_hashAndFlags & s_hashFlagStringKindIsAtomic; }
-    void setIsAtomic(bool);
+    bool isAtom() const { return m_hashAndFlags & s_hashFlagStringKindIsAtom; }
+    void setIsAtom(bool);
     
     bool isExternal() const { return bufferOwnership() == BufferExternal; }
 
@@ -359,8 +359,8 @@ public:
         //       This means StaticStringImpl costs are not counted. But since there should only
         //       be a finite set of StaticStringImpls, their cost can be aggregated into a single
         //       system cost if needed.
-        //    b. setIsAtomic() is never called on a StaticStringImpl.
-        //       setIsAtomic() asserts !isStatic().
+        //    b. setIsAtom() is never called on a StaticStringImpl.
+        //       setIsAtom() asserts !isStatic().
         //    c. setHash() is never called on a StaticStringImpl.
         //       StaticStringImpl's constructor sets the hash on construction.
         //       StringImpl::hash() only sets a new hash iff !hasHash().
@@ -371,8 +371,8 @@ public:
         operator StringImpl&();
     };
 
-    WTF_EXPORT_PRIVATE static StaticStringImpl s_atomicEmptyString;
-    ALWAYS_INLINE static StringImpl* empty() { return reinterpret_cast<StringImpl*>(&s_atomicEmptyString); }
+    WTF_EXPORT_PRIVATE static StaticStringImpl s_emptyAtomString;
+    ALWAYS_INLINE static StringImpl* empty() { return reinterpret_cast<StringImpl*>(&s_emptyAtomString); }
 
     // FIXME: Does this really belong in StringImpl?
     template<typename CharacterType> static void copyCharacters(CharacterType* destination, const CharacterType* source, unsigned numCharacters);
@@ -1031,14 +1031,14 @@ inline size_t StringImpl::costDuringGC()
     return divideRoundedUp(result, refCount());
 }
 
-inline void StringImpl::setIsAtomic(bool isAtom)
+inline void StringImpl::setIsAtom(bool isAtom)
 {
     ASSERT(!isStatic());
     ASSERT(!isSymbol());
     if (isAtom)
-        m_hashAndFlags |= s_hashFlagStringKindIsAtomic;
+        m_hashAndFlags |= s_hashFlagStringKindIsAtom;
     else
-        m_hashAndFlags &= ~s_hashFlagStringKindIsAtomic;
+        m_hashAndFlags &= ~s_hashFlagStringKindIsAtom;
 }
 
 inline void StringImpl::setHash(unsigned hash) const
index 43de3d0..cff7bed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) 1999 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2019 Apple Inc. All rights reserved.
  * Copyright (C) 2007-2009 Torch Mobile, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -648,7 +648,7 @@ String String::isolatedCopy() &&
 
 bool String::isSafeToSendToAnotherThread() const
 {
-    // AtomicStrings are not safe to send between threads as ~StringImpl()
+    // AtomStrings are not safe to send between threads, as ~StringImpl()
     // will try to remove them from the wrong AtomStringTable.
     return isEmpty() || (m_impl->hasOneRef() && !m_impl->isAtom());
 }
index e62420c..f5ee5a8 100644 (file)
@@ -1,3 +1,18 @@
+2019-06-18  Darin Adler  <darin@apple.com>
+
+        Tidy up the remaining bits of the AtomicString to AtomString rename
+        https://bugs.webkit.org/show_bug.cgi?id=198990
+
+        Reviewed by Michael Catanzaro.
+
+        * bindings/scripts/test/JS/JSTestObj.cpp: Updated names.
+        * bindings/scripts/test/TestObj.idl: Ditto.
+
+        * css/makeprop.pl: Updated comment.
+        * css/makevalues.pl: Ditto.
+        * html/FormController.cpp:
+        (WebCore::FormKeyGenerator::formKey): Ditto.
+
 2019-06-20  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] Make the initial strut explicit
index c781c86..bf3c85d 100644 (file)
@@ -1486,15 +1486,15 @@ JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptiona
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVString(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicString(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomString(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValue(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNull(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyString(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLong(JSC::ExecState*);
@@ -2203,15 +2203,15 @@ static const HashTableValue JSTestObjPrototypeTableValues[] =
     { "methodWithNonOptionalArgAndTwoOptionalArgs", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t) (1) } },
     { "methodWithOptionalString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t) (0) } },
     { "methodWithOptionalUSVString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalUSVString), (intptr_t) (0) } },
-    { "methodWithOptionalAtomicString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicString), (intptr_t) (0) } },
+    { "methodWithOptionalAtomString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomString), (intptr_t) (0) } },
     { "methodWithOptionalStringAndDefaultValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue), (intptr_t) (0) } },
-    { "methodWithOptionalAtomicStringAndDefaultValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue), (intptr_t) (0) } },
+    { "methodWithOptionalAtomStringAndDefaultValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValue), (intptr_t) (0) } },
     { "methodWithOptionalStringIsNull", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull), (intptr_t) (0) } },
     { "methodWithOptionalStringIsUndefined", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t) (0) } },
-    { "methodWithOptionalAtomicStringIsNull", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull), (intptr_t) (0) } },
+    { "methodWithOptionalAtomStringIsNull", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNull), (intptr_t) (0) } },
     { "methodWithOptionalStringIsEmptyString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString), (intptr_t) (0) } },
     { "methodWithOptionalUSVStringIsEmptyString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString), (intptr_t) (0) } },
-    { "methodWithOptionalAtomicStringIsEmptyString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString), (intptr_t) (0) } },
+    { "methodWithOptionalAtomStringIsEmptyString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyString), (intptr_t) (0) } },
     { "methodWithOptionalDoubleIsNaN", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN), (intptr_t) (0) } },
     { "methodWithOptionalFloatIsNaN", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN), (intptr_t) (0) } },
     { "methodWithOptionalLongLong", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalLongLong), (intptr_t) (0) } },
@@ -6448,20 +6448,20 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVStri
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalUSVStringBody>(*state, "methodWithOptionalUSVString");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
 {
     UNUSED_PARAM(state);
     UNUSED_PARAM(throwScope);
     auto& impl = castedThis->wrapped();
     auto str = state->argument(0).isUndefined() ? nullAtom() : convert<IDLAtomStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    impl.methodWithOptionalAtomicString(WTFMove(str));
+    impl.methodWithOptionalAtomString(WTFMove(str));
     return JSValue::encode(jsUndefined());
 }
 
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicString(ExecState* state)
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomString(ExecState* state)
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringBody>(*state, "methodWithOptionalAtomicString");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomStringBody>(*state, "methodWithOptionalAtomString");
 }
 
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
@@ -6480,20 +6480,20 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringA
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValueBody>(*state, "methodWithOptionalStringAndDefaultValue");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValueBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
 {
     UNUSED_PARAM(state);
     UNUSED_PARAM(throwScope);
     auto& impl = castedThis->wrapped();
     auto str = state->argument(0).isUndefined() ? AtomString("foo", AtomString::ConstructFromLiteral) : convert<IDLAtomStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    impl.methodWithOptionalAtomicStringAndDefaultValue(WTFMove(str));
+    impl.methodWithOptionalAtomStringAndDefaultValue(WTFMove(str));
     return JSValue::encode(jsUndefined());
 }
 
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue(ExecState* state)
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValue(ExecState* state)
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValueBody>(*state, "methodWithOptionalAtomicStringAndDefaultValue");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomStringAndDefaultValueBody>(*state, "methodWithOptionalAtomStringAndDefaultValue");
 }
 
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
@@ -6528,20 +6528,20 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefinedBody>(*state, "methodWithOptionalStringIsUndefined");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
 {
     UNUSED_PARAM(state);
     UNUSED_PARAM(throwScope);
     auto& impl = castedThis->wrapped();
     auto str = state->argument(0).isUndefined() ? nullAtom() : convert<IDLAtomStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    impl.methodWithOptionalAtomicStringIsNull(WTFMove(str));
+    impl.methodWithOptionalAtomStringIsNull(WTFMove(str));
     return JSValue::encode(jsUndefined());
 }
 
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull(ExecState* state)
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNull(ExecState* state)
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullBody>(*state, "methodWithOptionalAtomicStringIsNull");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsNullBody>(*state, "methodWithOptionalAtomStringIsNull");
 }
 
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyStringBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
@@ -6576,20 +6576,20 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUSVStri
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyStringBody>(*state, "methodWithOptionalUSVStringIsEmptyString");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
 {
     UNUSED_PARAM(state);
     UNUSED_PARAM(throwScope);
     auto& impl = castedThis->wrapped();
     auto str = state->argument(0).isUndefined() ? emptyAtom() : convert<IDLAtomStringAdaptor<IDLDOMString>>(*state, state->uncheckedArgument(0));
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    impl.methodWithOptionalAtomicStringIsEmptyString(WTFMove(str));
+    impl.methodWithOptionalAtomStringIsEmptyString(WTFMove(str));
     return JSValue::encode(jsUndefined());
 }
 
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString(ExecState* state)
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyString(ExecState* state)
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringBody>(*state, "methodWithOptionalAtomicStringIsEmptyString");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalAtomStringIsEmptyStringBody>(*state, "methodWithOptionalAtomStringIsEmptyString");
 }
 
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaNBody(JSC::ExecState* state, typename IDLOperation<JSTestObj>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
index 0872a9f..1e98bcd 100644 (file)
@@ -220,15 +220,15 @@ enum TestConfidence { "high", "kinda-low" };
     void    methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional long opt1, optional long opt2);
     void    methodWithOptionalString(optional DOMString str);
     void    methodWithOptionalUSVString(optional USVString str);
-    void    methodWithOptionalAtomicString(optional [AtomString] DOMString str);
+    void    methodWithOptionalAtomString(optional [AtomString] DOMString str);
     void    methodWithOptionalStringAndDefaultValue(optional DOMString str = "foo");
-    void    methodWithOptionalAtomicStringAndDefaultValue(optional [AtomString] DOMString str = "foo");
+    void    methodWithOptionalAtomStringAndDefaultValue(optional [AtomString] DOMString str = "foo");
     void    methodWithOptionalStringIsNull(optional DOMString str = null);
     void    methodWithOptionalStringIsUndefined(optional DOMString str = "undefined");
-    void    methodWithOptionalAtomicStringIsNull(optional [AtomString] DOMString str = null);
+    void    methodWithOptionalAtomStringIsNull(optional [AtomString] DOMString str = null);
     void    methodWithOptionalStringIsEmptyString(optional DOMString str = "");
     void    methodWithOptionalUSVStringIsEmptyString(optional USVString str = "");
-    void    methodWithOptionalAtomicStringIsEmptyString(optional [AtomString] DOMString str = "");
+    void    methodWithOptionalAtomStringIsEmptyString(optional [AtomString] DOMString str = "");
     void    methodWithOptionalDoubleIsNaN(optional unrestricted double number = NaN);
     void    methodWithOptionalFloatIsNaN(optional unrestricted float number = NaN);
     void    methodWithOptionalLongLong(optional long long number);
index 7acc58c..997c4c0 100755 (executable)
@@ -369,7 +369,7 @@ const AtomString& getPropertyNameAtomString(CSSPropertyID id)
 
 String getPropertyNameString(CSSPropertyID id)
 {
-    // We share the StringImpl with the AtomicStrings.
+    // We share the StringImpl with the AtomStrings.
     return getPropertyNameAtomString(id).string();
 }
 
index 7224df5..abdb1ec 100755 (executable)
@@ -145,7 +145,7 @@ const AtomString& getValueNameAtomString(CSSValueID id)
 
 String getValueNameString(CSSValueID id)
 {
-    // We share the StringImpl with the AtomicStrings.
+    // We share the StringImpl with the AtomStrings.
     return getValueNameAtomString(id).string();
 }
 
index b7d1035..6532bdb 100644 (file)
@@ -326,7 +326,7 @@ AtomString FormKeyGenerator::formKey(const HTMLFormControlElementWithState& cont
     return m_formToKeyMap.ensure(form.get(), [this, &form] {
         auto signature = formSignature(*form);
         auto nextIndex = m_formSignatureToNextIndexMap.add(signature, 0).iterator->value++;
-        // FIXME: Would be nice to have makeAtomicString to use here.
+        // FIXME: Would be nice to have makeAtomString to use to optimize the case where the string already exists.
         return makeString(signature, " #", nextIndex);
     }).iterator->value;
 }
index da29f61..b151f90 100644 (file)
@@ -1,3 +1,13 @@
+2019-06-18  Darin Adler  <darin@apple.com>
+
+        Tidy up the remaining bits of the AtomicString to AtomString rename
+        https://bugs.webkit.org/show_bug.cgi?id=198990
+
+        Reviewed by Michael Catanzaro.
+
+        * Scripts/do-webcore-rename: Removed already-done renames.
+        * TestWebKitAPI/Tests/WTF/StringImpl.cpp: Rename one use of "atomic".
+
 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Remove support for GTK2 plugins
index 8998f76..0ccdda2 100755 (executable)
@@ -102,67 +102,10 @@ sub wanted
 my $isDOMTypeRename = 0;
 my %renames = (
     # Renames go here in the form of:
-    "AtomicString" => "AtomString",
-    "AtomicStringCreationFromLiteral" => "AtomStringCreationFromLiteral",
-    "AtomicStringCreationFromLiteralUniqueness" => "AtomStringCreationFromLiteralUniqueness",
-    "AtomicStringExistingHash" => "AtomStringExistingHash",
-    "AtomicStringFromLiteralCannotOverflow" => "AtomStringFromLiteralCannotOverflow",
-    "AtomicStringFromLiteralNotEmpty" => "AtomStringFromLiteralNotEmpty",
-    "AtomicStringHash" => "AtomStringHash",
-    "AtomicStringImpl" => "AtomStringImpl",
-    "AtomicStringImplCF" => "AtomStringImplCF",
-    "AtomicStringNumberDouble" => "AtomStringNumberDouble",
-    "AtomicStringTable" => "AtomStringTable",
-    "AtomicStringTable" => "AtomStringTable",
-    "AtomicStringTableLocker" => "AtomStringTableLocker",
-    "AtomicString_h" => "AtomString_h",
-    "IDLAtomicStringAdaptor" => "IDLAtomStringAdaptor",
-    "IDLRequiresExistingAtomicStringAdaptor" => "IDLRequiresExistingAtomStringAdaptor",
-    "RequiresExistingAtomicString" => "RequiresExistingAtomString",
-    "StringImplNullSymbolToAtomicString" => "StringImplNullSymbolToAtomString",
-    "StringImplStaticToAtomicString" => "StringImplStaticToAtomString",
-    "StringImplSymbolToAtomicString" => "StringImplSymbolToAtomString",
-    "ToAtomicString" => "ToAtomString",
-    "ToAtomicStringOnEmpty" => "ToAtomStringOnEmpty",
-    "TokenAtomicStringInitializer" => "TokenAtomStringInitializer",
-    "WTFAtomicStringPrinter" => "WTFAtomStringPrinter",
-    "WTFAtomicString_SummaryProvider" => "WTFAtomString_SummaryProvider",
-    "atomicString" => "atomString",
-    "atomicString1" => "atomString1",
-    "atomicString2" => "atomString2",
-    "atomicStringTable" => "atomStringTable",
-    "atomicStringWithTemplate" => "atomStringWithTemplate",
-    "atomicStrings" => "atomStrings",
-    "checkCurrentAtomicStringTable" => "checkCurrentAtomStringTable",
-    "existingAtomicString" => "existingAtomString",
-    "existingEntryAtomicStringTable" => "existingEntryAtomStringTable",
-    "getPropertyNameAtomicString" => "getPropertyNameAtomString",
-    "getValueNameAtomicString" => "getValueNameAtomString",
-    "isAtomic" => "isAtom",
-    "isAtomicString" => "isAtomString",
-    "isInAtomicStringTable" => "isInAtomStringTable",
-    "m_atomicStringTable" => "m_atomStringTable",
-    "m_currentAtomicStringTable" => "m_currentAtomStringTable",
-    "m_defaultAtomicStringTable" => "m_defaultAtomStringTable",
-    "m_entryAtomicStringTable" => "m_entryAtomStringTable",
-    "oldAtomicStringTable" => "oldAtomStringTable",
-    "propertyNameToAtomicString" => "propertyNameToAtomString",
-    "resolveRopeToAtomicString" => "resolveRopeToAtomString",
-    "resolveRopeToExistingAtomicString" => "resolveRopeToExistingAtomString",
-    "setCurrentAtomicStringTable" => "setCurrentAtomStringTable",
-    "shouldUseAtomicString" => "shouldUseAtomString",
-    "testAtomicStringNumber" => "testAtomStringNumber",
-    "toAtomicString" => "toAtomString",
-    "toExistingAtomicString" => "toExistingAtomString",
-    "useAtomicString" => "useAtomString",
+    "flagIsAtomic" => "flagIsAtom",
 );
 
 my %renamesContemplatedForTheFuture = (
-    "setDOMException" => "propagateException",
-    "setDOMExceptionSlow" => "propagateExceptionSlowPath",
-
-    "PassRefPtr" => "DeprecatedPassRefPtr",
-
     "HTMLPlugInImageElement" => "HTMLEmbeddedObjectElement",
     "isPlugInImageElement" => "isEmbeddedObjectElement",
     "isHTMLPlugInImageElement" => "isHTMLEmbeddedObjectElement",
@@ -173,8 +116,6 @@ my %renamesContemplatedForTheFuture = (
     "DateInstance" => "JSDate",
     "ErrorInstance" => "JSError",
 
-    "TreeShared" => "TreeRefCounted",
-
     "StringImpl" => "SharedString",
 
     "RenderView" => "RenderViewport",
@@ -187,10 +128,6 @@ my %renamesContemplatedForTheFuture = (
     "runtime_object" => "BridgedObject",
     "objc_runtime" => "ObjCBridge",
 
-    "WTF_UNICODE_H" => "Unicode_h",
-    "WTF_UNICODE_ICU_H" => "UnicodeICU_h",
-    "UnicodeIcu" => "UnicodeICU",
-
     "LegacyWebArchive" => "WebArchive",
     "LegacyWebArchive_h" => "WebArchive_h",
 
index c0196e4..ad115f1 100644 (file)
@@ -789,7 +789,7 @@ TEST(WTF, StringImplNotExternal)
 }
 
 
-TEST(WTF, ExternalStringAtomic)
+TEST(WTF, ExternalStringAtom)
 {
     constexpr LChar buffer[] = "hello";
     constexpr size_t bufferStringLength = sizeof(buffer) - 1;