Changeset 167545 in webkit


Ignore:
Timestamp:
Apr 19, 2014 1:40:39 PM (10 years ago)
Author:
akling@apple.com
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167542 r167545  
     12014-04-19  Andreas Kling  <akling@apple.com>
     2
     3        Slap ALWAYS_INLINE on Element attribute lookup things.
     4        <https://webkit.org/b/131892>
     5
     6        Most of the "inline" helpers for setting/getting attributes were not
     7        actually getting inlined by the compiler, so let's make that happen.
     8
     9        Reviewed by Geoffrey Garen.
     10
     11        * dom/Element.cpp:
     12        (WebCore::Element::synchronizeAttribute):
     13        * dom/ElementData.h:
     14        (WebCore::ElementData::findAttributeByName):
     15        (WebCore::ElementData::findAttributeIndexByName):
     16
    1172014-04-19  Darin Adler  <darin@apple.com>
    218
  • trunk/Source/WebCore/dom/Element.cpp

    r167210 r167545  
    378378}
    379379
    380 inline void Element::synchronizeAttribute(const QualifiedName& name) const
     380ALWAYS_INLINE void Element::synchronizeAttribute(const QualifiedName& name) const
    381381{
    382382    if (!elementData())
     
    394394}
    395395
    396 inline void Element::synchronizeAttribute(const AtomicString& localName) const
     396ALWAYS_INLINE void Element::synchronizeAttribute(const AtomicString& localName) const
    397397{
    398398    // This version of synchronizeAttribute() is streamlined for the case where you don't have a full QualifiedName,
  • trunk/Source/WebCore/dom/ElementData.h

    r163850 r167545  
    263263}
    264264
    265 inline const Attribute* ElementData::findAttributeByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
     265ALWAYS_INLINE const Attribute* ElementData::findAttributeByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
    266266{
    267267    unsigned index = findAttributeIndexByName(name, shouldIgnoreAttributeCase);
     
    271271}
    272272
    273 inline unsigned ElementData::findAttributeIndexByName(const QualifiedName& name) const
     273ALWAYS_INLINE unsigned ElementData::findAttributeIndexByName(const QualifiedName& name) const
    274274{
    275275    const Attribute* attributes = attributeBase();
     
    283283// We use a boolean parameter instead of calling shouldIgnoreAttributeCase so that the caller
    284284// can tune the behavior (hasAttribute is case sensitive whereas getAttribute is not).
    285 inline unsigned ElementData::findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
     285ALWAYS_INLINE unsigned ElementData::findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreAttributeCase) const
    286286{
    287287    const Attribute* attributes = attributeBase();
     
    303303}
    304304
    305 inline const Attribute* ElementData::findAttributeByName(const QualifiedName& name) const
     305ALWAYS_INLINE const Attribute* ElementData::findAttributeByName(const QualifiedName& name) const
    306306{
    307307    const Attribute* attributes = attributeBase();
Note: See TracChangeset for help on using the changeset viewer.