Title: [246636] trunk
Revision
246636
Author
da...@apple.com
Date
2019-06-20 09:21:50 -0700 (Thu, 20 Jun 2019)

Log Message

Tidy up the remaining bits of the AtomicString to AtomString rename
https://bugs.webkit.org/show_bug.cgi?id=198990

Reviewed by Michael Catanzaro.

Source/_javascript_Core:

* 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.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (246635 => 246636)


--- trunk/LayoutTests/ChangeLog	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/LayoutTests/ChangeLog	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1,3 +1,13 @@
+2019-06-18  Darin Adler  <da...@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  <mmaxfi...@apple.com>
 
         [WHLSL] Hook up common texture functions

Modified: trunk/LayoutTests/js/dopey-rope-with-16-bit-propertyname-expected.txt (246635 => 246636)


--- trunk/LayoutTests/js/dopey-rope-with-16-bit-propertyname-expected.txt	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/LayoutTests/js/dopey-rope-with-16-bit-propertyname-expected.txt	2019-06-20 16:21:50 UTC (rev 246636)
@@ -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".
 

Modified: trunk/LayoutTests/js/dopey-rope-with-16-bit-propertyname.html (246635 => 246636)


--- trunk/LayoutTests/js/dopey-rope-with-16-bit-propertyname.html	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/LayoutTests/js/dopey-rope-with-16-bit-propertyname.html	2019-06-20 16:21:50 UTC (rev 246636)
@@ -7,7 +7,7 @@
 <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 = {};
 
@@ -14,7 +14,7 @@
 stringWithEmoji = "zest😐";
 var test16bit = stringWithEmoji.substring(0, 4);
 
-o[test16bit] = "this makes it an AtomicString";
+o[test16bit] = "this makes it an AtomString";
 
 globalRope = "";
 

Modified: trunk/Source/_javascript_Core/ChangeLog (246635 => 246636)


--- trunk/Source/_javascript_Core/ChangeLog	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1,3 +1,20 @@
+2019-06-18  Darin Adler  <da...@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  <shvaikal...@gmail.com>
 
         Optimize `resolve` method lookup in Promise static methods

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (246635 => 246636)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -10281,7 +10281,7 @@
         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);
 }

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (246635 => 246636)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -3899,7 +3899,7 @@
             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 @@
             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);

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (246635 => 246636)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -4466,7 +4466,7 @@
             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 @@
             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);

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (246635 => 246636)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -10463,7 +10463,7 @@
 
             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 @@
             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 @@
             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);
     }
     

Modified: trunk/Source/WTF/ChangeLog (246635 => 246636)


--- trunk/Source/WTF/ChangeLog	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/ChangeLog	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1,3 +1,35 @@
+2019-06-18  Darin Adler  <da...@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  <cgar...@igalia.com>
 
         [GTK] Remove support for GTK2 plugins

Modified: trunk/Source/WTF/wtf/text/AtomString.cpp (246635 => 246636)


--- trunk/Source/WTF/wtf/text/AtomString.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/AtomString.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -39,7 +39,7 @@
         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;

Modified: trunk/Source/WTF/wtf/text/AtomString.h (246635 => 246636)


--- trunk/Source/WTF/wtf/text/AtomString.h	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/AtomString.h	2019-06-20 16:21:50 UTC (rev 246636)
@@ -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 @@
     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 @@
     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 @@
 #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,10 +178,8 @@
     String m_string;
 };
 
-using AtomicString = AtomString;
+static_assert(sizeof(AtomString) == sizeof(String), "AtomString and String must be the same size!");
 
-static_assert(sizeof(AtomString) == sizeof(String), "AtomString and String must be same size!");
-
 inline bool operator==(const AtomString& a, const AtomString& b) { return a.impl() == b.impl(); }
 bool operator==(const AtomString&, const LChar*);
 inline bool operator==(const AtomString& a, const char* b) { return WTF::equal(a.impl(), reinterpret_cast<const LChar*>(b)); }
@@ -281,7 +280,7 @@
 
 #ifdef __OBJC__
 
-inline AtomString::AtomString(NSString* string)
+inline AtomString::AtomString(NSString *string)
     : m_string(AtomStringImpl::add((__bridge CFStringRef)string))
 {
 }
@@ -288,7 +287,7 @@
 
 #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 @@
 } // namespace WTF
 
 using WTF::AtomString;
-using WTF::AtomicString;
 using WTF::nullAtom;
 using WTF::emptyAtom;
 using WTF::starAtom;

Modified: trunk/Source/WTF/wtf/text/AtomStringImpl.cpp (246635 => 246636)


--- trunk/Source/WTF/wtf/text/AtomStringImpl.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/AtomStringImpl.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -108,7 +108,7 @@
     {
         location = &StringImpl::create(characters).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -159,7 +159,7 @@
     {
         location = &StringImpl::create8BitIfPossible(buf.characters, buf.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -227,7 +227,7 @@
 
         location = &newString.leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -270,7 +270,7 @@
     {
         location = &StringImpl::createSubstringSharingImpl(*buffer.baseString, buffer.start, buffer.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -335,7 +335,7 @@
     {
         location = &StringImpl::create(buf.characters, buf.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -356,7 +356,7 @@
     {
         location = &StringImpl::createWithoutCopying(buf.characters, buf.length).leakRef();
         location->setHash(hash);
-        location->setIsAtomic(true);
+        location->setIsAtom(true);
     }
 };
 
@@ -437,7 +437,7 @@
     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);
@@ -444,7 +444,7 @@
 
     if (addResult.isNewEntry) {
         ASSERT(*addResult.iterator == &string);
-        string.setIsAtomic(true);
+        string.setIsAtom(true);
     }
 
     return *static_cast<AtomStringImpl*>(*addResult.iterator);
@@ -467,7 +467,7 @@
         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);
@@ -474,7 +474,7 @@
 
     if (addResult.isNewEntry) {
         ASSERT(*addResult.iterator == &string);
-        string.setIsAtomic(true);
+        string.setIsAtom(true);
     }
 
     return *static_cast<AtomStringImpl*>(*addResult.iterator);
@@ -486,7 +486,7 @@
     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);
 }
@@ -493,7 +493,7 @@
 
 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());

Modified: trunk/Source/WTF/wtf/text/AtomStringImpl.h (246635 => 246636)


--- trunk/Source/WTF/wtf/text/AtomStringImpl.h	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/AtomStringImpl.h	2019-06-20 16:21:50 UTC (rev 246636)
@@ -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 @@
     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 @@
     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 @@
     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 @@
 };
 
 #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
 
 }

Modified: trunk/Source/WTF/wtf/text/AtomStringTable.cpp (246635 => 246636)


--- trunk/Source/WTF/wtf/text/AtomStringTable.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/AtomStringTable.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -32,7 +32,7 @@
 AtomStringTable::~AtomStringTable()
 {
     for (auto* string : m_table)
-        string->setIsAtomic(false);
+        string->setIsAtom(false);
 }
 
 }

Modified: trunk/Source/WTF/wtf/text/StringImpl.cpp (246635 => 246636)


--- trunk/Source/WTF/wtf/text/StringImpl.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/StringImpl.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -102,7 +102,7 @@
 }
 #endif
 
-StringImpl::StaticStringImpl StringImpl::s_atomicEmptyString("", StringImpl::StringAtomic);
+StringImpl::StaticStringImpl StringImpl::s_emptyAtomString("", StringImpl::StringAtom);
 
 StringImpl::~StringImpl()
 {

Modified: trunk/Source/WTF/wtf/text/StringImpl.h (246635 => 246636)


--- trunk/Source/WTF/wtf/text/StringImpl.h	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/StringImpl.h	2019-06-20 16:21:50 UTC (rev 246636)
@@ -197,9 +197,9 @@
     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);
@@ -206,7 +206,7 @@
 
     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 @@
 
     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 @@
     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 @@
         //       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 @@
         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 @@
     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

Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (246635 => 246636)


--- trunk/Source/WTF/wtf/text/WTFString.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1,6 +1,6 @@
 /*
  * (C) 1999 Lars Knoll (kn...@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 @@
 
 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());
 }

Modified: trunk/Source/WebCore/ChangeLog (246635 => 246636)


--- trunk/Source/WebCore/ChangeLog	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WebCore/ChangeLog	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1,3 +1,18 @@
+2019-06-18  Darin Adler  <da...@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  <za...@apple.com>
 
         [LFC][IFC] Make the initial strut explicit

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (246635 => 246636)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1486,15 +1486,15 @@
 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 @@
     { "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,7 +6448,7 @@
     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);
@@ -6455,13 +6455,13 @@
     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,7 +6480,7 @@
     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);
@@ -6487,13 +6487,13 @@
     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,7 +6528,7 @@
     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);
@@ -6535,13 +6535,13 @@
     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,7 +6576,7 @@
     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);
@@ -6583,13 +6583,13 @@
     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)

Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (246635 => 246636)


--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2019-06-20 16:21:50 UTC (rev 246636)
@@ -220,15 +220,15 @@
     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);

Modified: trunk/Source/WebCore/css/makeprop.pl (246635 => 246636)


--- trunk/Source/WebCore/css/makeprop.pl	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WebCore/css/makeprop.pl	2019-06-20 16:21:50 UTC (rev 246636)
@@ -369,7 +369,7 @@
 
 String getPropertyNameString(CSSPropertyID id)
 {
-    // We share the StringImpl with the AtomicStrings.
+    // We share the StringImpl with the AtomStrings.
     return getPropertyNameAtomString(id).string();
 }
 

Modified: trunk/Source/WebCore/css/makevalues.pl (246635 => 246636)


--- trunk/Source/WebCore/css/makevalues.pl	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WebCore/css/makevalues.pl	2019-06-20 16:21:50 UTC (rev 246636)
@@ -145,7 +145,7 @@
 
 String getValueNameString(CSSValueID id)
 {
-    // We share the StringImpl with the AtomicStrings.
+    // We share the StringImpl with the AtomStrings.
     return getValueNameAtomString(id).string();
 }
 

Modified: trunk/Source/WebCore/html/FormController.cpp (246635 => 246636)


--- trunk/Source/WebCore/html/FormController.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Source/WebCore/html/FormController.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -326,7 +326,7 @@
     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;
 }

Modified: trunk/Tools/ChangeLog (246635 => 246636)


--- trunk/Tools/ChangeLog	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Tools/ChangeLog	2019-06-20 16:21:50 UTC (rev 246636)
@@ -1,3 +1,13 @@
+2019-06-18  Darin Adler  <da...@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  <cgar...@igalia.com>
 
         [GTK] Remove support for GTK2 plugins

Modified: trunk/Tools/Scripts/do-webcore-rename (246635 => 246636)


--- trunk/Tools/Scripts/do-webcore-rename	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Tools/Scripts/do-webcore-rename	2019-06-20 16:21:50 UTC (rev 246636)
@@ -102,67 +102,10 @@
 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 @@
     "DateInstance" => "JSDate",
     "ErrorInstance" => "JSError",
 
-    "TreeShared" => "TreeRefCounted",
-
     "StringImpl" => "SharedString",
 
     "RenderView" => "RenderViewport",
@@ -187,10 +128,6 @@
     "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",
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp (246635 => 246636)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp	2019-06-20 15:55:52 UTC (rev 246635)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp	2019-06-20 16:21:50 UTC (rev 246636)
@@ -789,7 +789,7 @@
 }
 
 
-TEST(WTF, ExternalStringAtomic)
+TEST(WTF, ExternalStringAtom)
 {
     constexpr LChar buffer[] = "hello";
     constexpr size_t bufferStringLength = sizeof(buffer) - 1;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to