Changeset 12321 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jan 23, 2006, 4:56:32 PM (19 years ago)
Author:
mjs
Message:

JavaScriptCore:

Rubber stamped by Tim Hatcher.


  • renamed inert() operation on HashSet, HashCountedSet and HashTable to add() for consistency with HashMap
  • kjs/array_object.cpp: (ArrayProtoFunc::callAsFunction):
  • kjs/collector.cpp: (KJS::Collector::protect):
  • kjs/identifier.cpp: (KJS::Identifier::add):
  • kxmlcore/HashCountedSet.h: (KXMLCore::::add):
  • kxmlcore/HashMap.h: (KXMLCore::::inlineAdd):
  • kxmlcore/HashSet.h: (KXMLCore::::add):
  • kxmlcore/HashTable.h: (KXMLCore::HashTable::add): (KXMLCore::::add): (KXMLCore::::HashTable):

WebCore:

Rubber stamped by Tim Hatcher.


  • renamed inert() operation on HashSet, HashCountedSet and HashTable to add() for consistency with HashMap
  • bridge/mac/MacFrame.mm: (MacFrame::didTellBridgeAboutLoad):
  • khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::mark):
  • khtml/html/HTMLElementImpl.cpp: (WebCore::HTMLElementImpl::isRecognizedTagName): (WebCore::inlineTagList): (WebCore::blockTagList):
  • khtml/html/HTMLFormCollectionImpl.cpp: (WebCore::HTMLFormCollectionImpl::updateNameCache):
  • khtml/html/htmlparser.cpp: (HTMLParser::isHeaderTag): (HTMLParser::isResidualStyleTag): (HTMLParser::isAffectedByResidualStyle):
  • khtml/xml/DocumentImpl.cpp: (WebCore::DocumentImpl::addElementById): (WebCore::DocumentImpl::registerDisconnectedNodeWithEventListeners):
  • khtml/xml/NodeImpl.cpp: (WebCore::NodeImpl::registerNodeList):
  • khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::add):
  • khtml/xml/dom_qname.cpp: (DOM::QualifiedName::QualifiedName):
  • loader/CachedObject.cpp: (WebCore::CachedObject::ref):
  • page/Frame.cpp: (Frame::keepAlive):
  • rendering/render_canvas.cpp: (RenderCanvas::addWidget):
  • rendering/render_frames.cpp: (WebCore::RenderPartObject::updateWidget):
  • rendering/render_line.cpp: (WebCore::InlineFlowBox::paint):
  • xml/xmlhttprequest.cpp: (WebCore::XMLHttpRequest::addToRequestsByDocument):
Location:
trunk/JavaScriptCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r12319 r12321  
     12006-01-23  Maciej Stachowiak  <[email protected]>
     2
     3        Rubber stamped by Tim Hatcher.
     4       
     5        - renamed inert() operation on HashSet, HashCountedSet and HashTable to add()
     6        for consistency with HashMap
     7
     8        * kjs/array_object.cpp:
     9        (ArrayProtoFunc::callAsFunction):
     10        * kjs/collector.cpp:
     11        (KJS::Collector::protect):
     12        * kjs/identifier.cpp:
     13        (KJS::Identifier::add):
     14        * kxmlcore/HashCountedSet.h:
     15        (KXMLCore::::add):
     16        * kxmlcore/HashMap.h:
     17        (KXMLCore::::inlineAdd):
     18        * kxmlcore/HashSet.h:
     19        (KXMLCore::::add):
     20        * kxmlcore/HashTable.h:
     21        (KXMLCore::HashTable::add):
     22        (KXMLCore::::add):
     23        (KXMLCore::::HashTable):
     24
    1252006-01-23  Justin Garcia  <[email protected]>
    226
  • trunk/JavaScriptCore/kjs/array_object.cpp

    r12317 r12321  
    481481    UString str = "";
    482482
    483     visitedElems.insert(thisObj);
     483    visitedElems.add(thisObj);
    484484    if (id == Join && !args[0]->isUndefined())
    485485      separator = args[0]->toString(exec);
  • trunk/JavaScriptCore/kjs/collector.cpp

    r12317 r12321  
    412412      return;
    413413
    414     protectedValues().insert(k->downcast());
     414    protectedValues().add(k->downcast());
    415415}
    416416
  • trunk/JavaScriptCore/kjs/identifier.cpp

    r12317 r12321  
    139139        return &UString::Rep::empty;
    140140   
    141     return *identifierTable().insert<const char *, CStringTranslator>(c).first;
     141    return *identifierTable().add<const char *, CStringTranslator>(c).first;
    142142}
    143143
     
    180180   
    181181    UCharBuffer buf = {s, length};
    182     return *identifierTable().insert<UCharBuffer, UCharBufferTranslator>(buf).first;
     182    return *identifierTable().add<UCharBuffer, UCharBufferTranslator>(buf).first;
    183183}
    184184
     
    191191        return &UString::Rep::empty;
    192192
    193     UString::Rep *result = *identifierTable().insert(r).first;
     193    UString::Rep *result = *identifierTable().add(r).first;
    194194    if (result == r)
    195195        r->isIdentifier = true;
  • trunk/JavaScriptCore/kxmlcore/HashCountedSet.h

    r12301 r12321  
    5656
    5757        // increases the count if an equal value is already present
    58         // returns value is a pair of an interator to the new value's location,
    59         // and a bool that is true if an actual new insertion was done
    60         std::pair<iterator, bool> insert(const ValueType &value);
     58        // the return value is a pair of an interator to the new value's location,
     59        // and a bool that is true if an new entry was added
     60        std::pair<iterator, bool> add(const ValueType &value);
    6161       
    6262        // reduces the count of the value, and removes it if count
     
    138138   
    139139    template<typename Value, typename HashFunctions, typename Traits>
    140     inline std::pair<typename HashCountedSet<Value, HashFunctions, Traits>::iterator, bool> HashCountedSet<Value, HashFunctions, Traits>::insert(const ValueType &value)
     140    inline std::pair<typename HashCountedSet<Value, HashFunctions, Traits>::iterator, bool> HashCountedSet<Value, HashFunctions, Traits>::add(const ValueType &value)
    141141    {
    142142        pair<iterator, bool> result = m_impl.add(value, 0);
  • trunk/JavaScriptCore/kxmlcore/HashMap.h

    r12301 r12321  
    174174pair<typename HashMap<Key, Mapped, HashFunctions, KeyTraits, MappedTraits>::iterator, bool> HashMap<Key, Mapped, HashFunctions, KeyTraits, MappedTraits>::inlineAdd(const KeyType &key, const MappedType &mapped)
    175175{
    176     return m_impl.template insert<KeyType, MappedType, TranslatorType>(key, mapped);
     176    return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
    177177}
    178178
  • trunk/JavaScriptCore/kxmlcore/HashSet.h

    r12301 r12321  
    8080        bool contains(const ValueType& value) const;
    8181       
    82         std::pair<iterator, bool> insert(const ValueType &value);
    83        
    84         // a special version of insert() that finds the object by hashing and comparing
     82        // the return value is a pair of an interator to the new value's location,
     83        // and a bool that is true if an new entry was added
     84        std::pair<iterator, bool> add(const ValueType &value);
     85       
     86        // a special version of add() that finds the object by hashing and comparing
    8587        // with some other type, to avoid the cost of type conversion if the object is already
    8688        // in the table. HashTranslator should have the following methods:
     
    8991        //   static translate(ValueType&, const T&, unsigned hashCode);
    9092        template<typename T, typename HashTranslator>
    91         std::pair<iterator, bool> insert(const T& value);
     93        std::pair<iterator, bool> add(const T& value);
    9294       
    9395        void remove(const ValueType& value);
     
    160162   
    161163    template<typename Value, typename HashFunctions, typename Traits>
    162     std::pair<typename HashSet<Value, HashFunctions, Traits>::iterator, bool> HashSet<Value, HashFunctions, Traits>::insert(const ValueType &value)
    163     {
    164         return m_impl.insert(value);
     164    std::pair<typename HashSet<Value, HashFunctions, Traits>::iterator, bool> HashSet<Value, HashFunctions, Traits>::add(const ValueType &value)
     165    {
     166        return m_impl.add(value);
    165167    }
    166168   
    167169    template<typename Value, typename HashFunctions, typename Traits>
    168170    template<typename T, typename HashSetTranslator>
    169     std::pair<typename HashSet<Value, HashFunctions, Traits>::iterator, bool> HashSet<Value, HashFunctions, Traits>::insert(const T& value)
    170     {
    171         return m_impl.template insert<T, T, HashSetTranslatorAdapter<ValueType, T, HashSetTranslator> >(value, value);
     171    std::pair<typename HashSet<Value, HashFunctions, Traits>::iterator, bool> HashSet<Value, HashFunctions, Traits>::add(const T& value)
     172    {
     173        return m_impl.template add<T, T, HashSetTranslatorAdapter<ValueType, T, HashSetTranslator> >(value, value);
    172174    }
    173175   
  • trunk/JavaScriptCore/kxmlcore/HashTable.h

    r12301 r12321  
    285285        int capacity() const { return m_tableSize; }
    286286
    287         pair<iterator, bool> insert(const ValueType& value) { return insert<KeyType, ValueType, IdentityTranslatorType>(ExtractKey(value), value); }
    288 
    289         // A special version of insert() that finds the object by hashing and comparing
     287        pair<iterator, bool> add(const ValueType& value) { return add<KeyType, ValueType, IdentityTranslatorType>(ExtractKey(value), value); }
     288
     289        // A special version of add() that finds the object by hashing and comparing
    290290        // with some other type, to avoid the cost of type conversion if the object is already
    291291        // in the table.
    292         template<typename T, typename Extra, typename HashTranslator> pair<iterator, bool> insert(const T& key, const Extra&);
     292        template<typename T, typename Extra, typename HashTranslator> pair<iterator, bool> add(const T& key, const Extra&);
    293293
    294294        iterator find(const KeyType&);
     
    416416    template<typename Key, typename Value, const Key& ExtractKey(const Value&), typename HashFunctions, typename Traits, typename KeyTraits>
    417417    template<typename T, typename Extra, typename HashTranslator>
    418     inline pair<typename HashTable<Key, Value, ExtractKey, HashFunctions, Traits, KeyTraits>::iterator, bool> HashTable<Key, Value, ExtractKey, HashFunctions, Traits, KeyTraits>::insert(const T& key, const Extra &extra)
     418    inline pair<typename HashTable<Key, Value, ExtractKey, HashFunctions, Traits, KeyTraits>::iterator, bool> HashTable<Key, Value, ExtractKey, HashFunctions, Traits, KeyTraits>::add(const T& key, const Extra &extra)
    419419    {
    420420        invalidateIterators();
     
    632632#endif
    633633    {
    634         // Copy the hash table the dumb way, by inserting each element into the new table.
     634        // Copy the hash table the dumb way, by adding each element to the new table.
    635635        // It might be more efficient to copy the table slots, but it's not clear that efficiency is needed.
    636636        const_iterator end = other.end();
    637637        for (const_iterator it = other.begin(); it != end; ++it)
    638             insert(*it);
     638            add(*it);
    639639    }
    640640
Note: See TracChangeset for help on using the changeset viewer.