Reviewed by Maciej.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2007 00:46:32 +0000 (00:46 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Nov 2007 00:46:32 +0000 (00:46 +0000)
commit256d80bbf10cd1f79cde0a2240fecce570e45c2b
treeb2ab013a3960838265aef21b34befbcd744907e5
parent0f9b3de23cbcb6b00c7a95622ab3033b0d6267c8
    Reviewed by Maciej.

        - http://bugs.webkit.org/show_bug.cgi?id=15791
          change property map data structure for less memory use, better speed

        The property map now has an array of indices and a separate array of
        property map entries. This slightly slows down lookup because of a second
        memory acess, but makes property maps smaller and faster to iterate in
        functions like mark().

        SunSpider says this is 1.2% faster, although it makes the bitwise-end test
        more than 10% slower. To fix that we'll need to optimize global variable lookup.

        * kjs/property_map.cpp:
        (KJS::PropertyMapEntry::PropertyMapEntry):
        (KJS::PropertyMapHashTable::entries):
        (KJS::PropertyMapHashTable::allocationSize):
        (KJS::SavedProperties::SavedProperties):
        (KJS::SavedProperties::~SavedProperties):
        (KJS::PropertyMap::checkConsistency):
        (KJS::PropertyMap::~PropertyMap):
        (KJS::PropertyMap::clear):
        (KJS::PropertyMap::get):
        (KJS::PropertyMap::getLocation):
        (KJS::PropertyMap::put):
        (KJS::PropertyMap::insert):
        (KJS::PropertyMap::createTable):
        (KJS::PropertyMap::rehash):
        (KJS::PropertyMap::remove):
        (KJS::PropertyMap::mark):
        (KJS::comparePropertyMapEntryIndices):
        (KJS::PropertyMap::containsGettersOrSetters):
        (KJS::PropertyMap::getEnumerablePropertyNames):
        (KJS::PropertyMap::save):
        (KJS::PropertyMap::restore):
        * kjs/property_map.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/property_map.cpp
JavaScriptCore/kjs/property_map.h