Title: [219042] trunk/Source
Revision
219042
Author
[email protected]
Date
2017-06-30 22:09:40 -0700 (Fri, 30 Jun 2017)

Log Message

[WTF] Drop SymbolRegistry::keyForSymbol
https://bugs.webkit.org/show_bug.cgi?id=174052

Reviewed by Sam Weinig.

Source/_javascript_Core:

* runtime/SymbolConstructor.cpp:
(JSC::symbolConstructorKeyFor):

Source/WTF:

Since we can know whether a given symbol is registered by checking RegisteredSymbolImpl,
we do not need to query key string for a given symbol by using SymbolRegistry::keyForSymbol.

* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::extractFoldedString): Deleted.
* wtf/text/SymbolRegistry.cpp:
(WTF::SymbolRegistry::keyForSymbol): Deleted.
* wtf/text/SymbolRegistry.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (219041 => 219042)


--- trunk/Source/_javascript_Core/ChangeLog	2017-07-01 05:06:40 UTC (rev 219041)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-07-01 05:09:40 UTC (rev 219042)
@@ -1,3 +1,13 @@
+2017-06-30  Yusuke Suzuki  <[email protected]>
+
+        [WTF] Drop SymbolRegistry::keyForSymbol
+        https://bugs.webkit.org/show_bug.cgi?id=174052
+
+        Reviewed by Sam Weinig.
+
+        * runtime/SymbolConstructor.cpp:
+        (JSC::symbolConstructorKeyFor):
+
 2017-06-30  Saam Barati  <[email protected]>
 
         B3ReduceStrength should reduce EqualOrUnordered over const float input

Modified: trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp (219041 => 219042)


--- trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp	2017-07-01 05:06:40 UTC (rev 219041)
+++ trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp	2017-07-01 05:09:40 UTC (rev 219042)
@@ -123,7 +123,7 @@
         return JSValue::encode(jsUndefined());
 
     ASSERT(uid.symbolRegistry() == &vm.symbolRegistry());
-    return JSValue::encode(jsString(exec, vm.symbolRegistry().keyForSymbol(*uid.asRegisteredSymbolImpl())));
+    return JSValue::encode(jsString(exec, &uid));
 }
 
 } // namespace JSC

Modified: trunk/Source/WTF/ChangeLog (219041 => 219042)


--- trunk/Source/WTF/ChangeLog	2017-07-01 05:06:40 UTC (rev 219041)
+++ trunk/Source/WTF/ChangeLog	2017-07-01 05:09:40 UTC (rev 219042)
@@ -1,3 +1,19 @@
+2017-06-30  Yusuke Suzuki  <[email protected]>
+
+        [WTF] Drop SymbolRegistry::keyForSymbol
+        https://bugs.webkit.org/show_bug.cgi?id=174052
+
+        Reviewed by Sam Weinig.
+
+        Since we can know whether a given symbol is registered by checking RegisteredSymbolImpl,
+        we do not need to query key string for a given symbol by using SymbolRegistry::keyForSymbol.
+
+        * wtf/text/SymbolImpl.h:
+        (WTF::SymbolImpl::extractFoldedString): Deleted.
+        * wtf/text/SymbolRegistry.cpp:
+        (WTF::SymbolRegistry::keyForSymbol): Deleted.
+        * wtf/text/SymbolRegistry.h:
+
 2017-06-29  Jer Noble  <[email protected]>
 
         Make Legacy EME API controlled by RuntimeEnabled setting.

Modified: trunk/Source/WTF/wtf/text/SymbolImpl.h (219041 => 219042)


--- trunk/Source/WTF/wtf/text/SymbolImpl.h	2017-07-01 05:06:40 UTC (rev 219041)
+++ trunk/Source/WTF/wtf/text/SymbolImpl.h	2017-07-01 05:09:40 UTC (rev 219042)
@@ -51,14 +51,6 @@
     WTF_EXPORT_STRING_API static Ref<SymbolImpl> createNullSymbol();
     WTF_EXPORT_STRING_API static Ref<SymbolImpl> create(StringImpl& rep);
 
-    Ref<StringImpl> extractFoldedString()
-    {
-        ASSERT(substringBuffer());
-        ASSERT(substringBuffer() == m_owner);
-        ASSERT(!substringBuffer()->isSymbol());
-        return createSubstringSharingImpl(*this, 0, length());
-    }
-
 protected:
     WTF_EXPORT_PRIVATE static unsigned nextHashForSymbol();
 

Modified: trunk/Source/WTF/wtf/text/SymbolRegistry.cpp (219041 => 219042)


--- trunk/Source/WTF/wtf/text/SymbolRegistry.cpp	2017-07-01 05:06:40 UTC (rev 219041)
+++ trunk/Source/WTF/wtf/text/SymbolRegistry.cpp	2017-07-01 05:09:40 UTC (rev 219042)
@@ -49,12 +49,6 @@
     return symbol;
 }
 
-String SymbolRegistry::keyForSymbol(RegisteredSymbolImpl& uid)
-{
-    ASSERT(uid.symbolRegistry() == this);
-    return uid.extractFoldedString();
-}
-
 void SymbolRegistry::remove(RegisteredSymbolImpl& uid)
 {
     ASSERT(uid.symbolRegistry() == this);

Modified: trunk/Source/WTF/wtf/text/SymbolRegistry.h (219041 => 219042)


--- trunk/Source/WTF/wtf/text/SymbolRegistry.h	2017-07-01 05:06:40 UTC (rev 219041)
+++ trunk/Source/WTF/wtf/text/SymbolRegistry.h	2017-07-01 05:09:40 UTC (rev 219042)
@@ -83,7 +83,6 @@
     WTF_EXPORT_PRIVATE ~SymbolRegistry();
 
     WTF_EXPORT_PRIVATE Ref<RegisteredSymbolImpl> symbolForKey(const String&);
-    WTF_EXPORT_PRIVATE String keyForSymbol(RegisteredSymbolImpl&);
 
     void remove(RegisteredSymbolImpl&);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to