Title: [167545] trunk/Source/WebCore
Revision
167545
Author
[email protected]
Date
2014-04-19 13:40:39 -0700 (Sat, 19 Apr 2014)

Log Message

Slap ALWAYS_INLINE on Element attribute lookup things.
<https://webkit.org/b/131892>

Most of the "inline" helpers for setting/getting attributes were not
actually getting inlined by the compiler, so let's make that happen.

Reviewed by Geoffrey Garen.

* dom/Element.cpp:
(WebCore::Element::synchronizeAttribute):
* dom/ElementData.h:
(WebCore::ElementData::findAttributeByName):
(WebCore::ElementData::findAttributeIndexByName):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167544 => 167545)


--- trunk/Source/WebCore/ChangeLog	2014-04-19 20:36:58 UTC (rev 167544)
+++ trunk/Source/WebCore/ChangeLog	2014-04-19 20:40:39 UTC (rev 167545)
@@ -1,3 +1,19 @@
+2014-04-19  Andreas Kling  <[email protected]>
+
+        Slap ALWAYS_INLINE on Element attribute lookup things.
+        <https://webkit.org/b/131892>
+
+        Most of the "inline" helpers for setting/getting attributes were not
+        actually getting inlined by the compiler, so let's make that happen.
+
+        Reviewed by Geoffrey Garen.
+
+        * dom/Element.cpp:
+        (WebCore::Element::synchronizeAttribute):
+        * dom/ElementData.h:
+        (WebCore::ElementData::findAttributeByName):
+        (WebCore::ElementData::findAttributeIndexByName):
+
 2014-04-19  Darin Adler  <[email protected]>
 
         Telephone number detection should respect its setting consistently

Modified: trunk/Source/WebCore/dom/Element.cpp (167544 => 167545)


--- trunk/Source/WebCore/dom/Element.cpp	2014-04-19 20:36:58 UTC (rev 167544)
+++ trunk/Source/WebCore/dom/Element.cpp	2014-04-19 20:40:39 UTC (rev 167545)
@@ -377,7 +377,7 @@
     }
 }
 
-inline void Element::synchronizeAttribute(const QualifiedName& name) const
+ALWAYS_INLINE void Element::synchronizeAttribute(const QualifiedName& name) const
 {
     if (!elementData())
         return;
@@ -393,7 +393,7 @@
     }
 }
 
-inline void Element::synchronizeAttribute(const AtomicString& localName) const
+ALWAYS_INLINE void Element::synchronizeAttribute(const AtomicString& localName) const
 {
     // This version of synchronizeAttribute() is streamlined for the case where you don't have a full QualifiedName,
     // e.g when called from DOM API.

Modified: trunk/Source/WebCore/dom/ElementData.h (167544 => 167545)


--- trunk/Source/WebCore/dom/ElementData.h	2014-04-19 20:36:58 UTC (rev 167544)
+++ trunk/Source/WebCore/dom/ElementData.h	2014-04-19 20:40:39 UTC (rev 167545)
@@ -262,7 +262,7 @@
     return AttributeIteratorAccessor(static_cast<const ShareableElementData*>(this)->m_attributeArray, arraySize());
 }
 
-inline const Attribute* ElementData::findAttributeByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
+ALWAYS_INLINE const Attribute* ElementData::findAttributeByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
 {
     unsigned index = findAttributeIndexByName(name, shouldIgnoreAttributeCase);
     if (index != attributeNotFound)
@@ -270,7 +270,7 @@
     return 0;
 }
 
-inline unsigned ElementData::findAttributeIndexByName(const QualifiedName& name) const
+ALWAYS_INLINE unsigned ElementData::findAttributeIndexByName(const QualifiedName& name) const
 {
     const Attribute* attributes = attributeBase();
     for (unsigned i = 0, count = length(); i < count; ++i) {
@@ -282,7 +282,7 @@
 
 // We use a boolean parameter instead of calling shouldIgnoreAttributeCase so that the caller
 // can tune the behavior (hasAttribute is case sensitive whereas getAttribute is not).
-inline unsigned ElementData::findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
+ALWAYS_INLINE unsigned ElementData::findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
 {
     const Attribute* attributes = attributeBase();
     bool doSlowCheck = shouldIgnoreAttributeCase;
@@ -302,7 +302,7 @@
     return attributeNotFound;
 }
 
-inline const Attribute* ElementData::findAttributeByName(const QualifiedName& name) const
+ALWAYS_INLINE const Attribute* ElementData::findAttributeByName(const QualifiedName& name) const
 {
     const Attribute* attributes = attributeBase();
     for (unsigned i = 0, count = length(); i < count; ++i) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to