Ignore:
Timestamp:
Sep 28, 2005, 3:01:41 PM (20 years ago)
Author:
mjs
Message:

JavaScriptCore:

Reviewed by Eric.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • kjs/internal.cpp: (KJS::interpreterMap): Function that fetches the interpreter map on demand. (KJS::InterpreterImp::InterpreterImp): Replace use of InterpreterMap class with an appropriate HashMap. (KJS::InterpreterImp::clear): ditto (KJS::InterpreterImp::interpreterWithGlobalObject): ditto
  • kjs/interpreter_map.cpp: Removed.
  • kjs/interpreter_map.h: Removed.

The HashMap/HashSet code (copied and slightly tweaked from WebCore)

  • kxmlcore/HashFunctions.h: Added. (KXMLCore::4): (KXMLCore::8): (KXMLCore::): (KXMLCore::PointerHash::hash): (KXMLCore::PointerHash::equal):
  • kxmlcore/HashMap.h: Added. (KXMLCore::extractFirst): (KXMLCore::HashMap::HashMap): (KXMLCore::::size): (KXMLCore::::capacity): (KXMLCore::::isEmpty): (KXMLCore::::begin): (KXMLCore::::end): (KXMLCore::::find): (KXMLCore::::contains): (KXMLCore::::set): (KXMLCore::::get): (KXMLCore::::remove): (KXMLCore::::clear): (KXMLCore::deleteAllValues):
  • kxmlcore/HashMapPtrSpec.h: Added. (KXMLCore::PointerHashIteratorAdapter::PointerHashIteratorAdapter): (KXMLCore::PointerHashIteratorAdapter::operator*): (KXMLCore::PointerHashIteratorAdapter::operator->): (KXMLCore::PointerHashIteratorAdapter::operator++): (KXMLCore::PointerHashIteratorAdapter::operator==): (KXMLCore::PointerHashIteratorAdapter::operator!=): (KXMLCore::PointerHashConstIteratorAdapter::PointerHashConstIteratorAdapter): (KXMLCore::PointerHashConstIteratorAdapter::operator*): (KXMLCore::PointerHashConstIteratorAdapter::operator->): (KXMLCore::PointerHashConstIteratorAdapter::operator++): (KXMLCore::PointerHashConstIteratorAdapter::operator==): (KXMLCore::PointerHashConstIteratorAdapter::operator!=): (KXMLCore::):
  • kxmlcore/HashSet.h: Added. (KXMLCore::identityExtract): (KXMLCore::convertAdapter): (KXMLCore::HashSet::HashSet): (KXMLCore::::size): (KXMLCore::::capacity): (KXMLCore::::isEmpty): (KXMLCore::::begin): (KXMLCore::::end): (KXMLCore::::find): (KXMLCore::::contains): (KXMLCore::::insert): (KXMLCore::::remove): (KXMLCore::::clear):
  • kxmlcore/HashTable.cpp: Added. (KXMLCore::HashTableStats::~HashTableStats): (KXMLCore::HashTableStats::recordCollisionAtCount):
  • kxmlcore/HashTable.h: Added. (KXMLCore::HashTableIterator::skipEmptyBuckets): (KXMLCore::HashTableIterator::HashTableIterator): (KXMLCore::HashTableIterator::operator*): (KXMLCore::HashTableIterator::operator->): (KXMLCore::HashTableIterator::operator++): (KXMLCore::HashTableIterator::operator==): (KXMLCore::HashTableIterator::operator!=): (KXMLCore::HashTableConstIterator::HashTableConstIterator): (KXMLCore::HashTableConstIterator::operator*): (KXMLCore::HashTableConstIterator::operator->): (KXMLCore::HashTableConstIterator::skipEmptyBuckets): (KXMLCore::HashTableConstIterator::operator++): (KXMLCore::HashTableConstIterator::operator==): (KXMLCore::HashTableConstIterator::operator!=): (KXMLCore::HashTable::HashTable): (KXMLCore::HashTable::~HashTable): (KXMLCore::HashTable::begin): (KXMLCore::HashTable::end): (KXMLCore::HashTable::size): (KXMLCore::HashTable::capacity): (KXMLCore::HashTable::insert): (KXMLCore::HashTable::isEmptyBucket): (KXMLCore::HashTable::isDeletedBucket): (KXMLCore::HashTable::isEmptyOrDeletedBucket): (KXMLCore::HashTable::hash): (KXMLCore::HashTable::equal): (KXMLCore::HashTable::identityConvert): (KXMLCore::HashTable::extractKey): (KXMLCore::HashTable::lookup): (KXMLCore::HashTable::shouldExpand): (KXMLCore::HashTable::mustRehashInPlace): (KXMLCore::HashTable::shouldShrink): (KXMLCore::HashTable::shrink): (KXMLCore::HashTable::clearBucket): (KXMLCore::HashTable::deleteBucket): (KXMLCore::HashTable::makeLookupResult): (KXMLCore::HashTable::makeIterator): (KXMLCore::HashTable::makeConstIterator): (KXMLCore::::lookup): (KXMLCore::::insert): (KXMLCore::::reinsert): (KXMLCore::::find): (KXMLCore::::contains): (KXMLCore::::remove): (KXMLCore::::allocateTable): (KXMLCore::::expand): (KXMLCore::::rehash): (KXMLCore::::clear): (KXMLCore::::HashTable): (KXMLCore::::swap): (KXMLCore::::operator): (KXMLCore::::checkTableConsistency): (KXMLCore::::checkTableConsistencyExceptSize):
  • kxmlcore/HashTraits.h: Added. (KXMLCore::HashTraits::emptyValue): (KXMLCore::): (KXMLCore::PairHashTraits::emptyValue): (KXMLCore::PairHashTraits::deletedValue):

WebCore:

Reviewed by Eric.

  • ForwardingHeaders/kxmlcore/HashMap.h: Added.
  • ForwardingHeaders/kxmlcore/HashSet.h: Added.
  • ForwardingHeaders/misc/hashmap.h: Removed.
  • ForwardingHeaders/misc/hashset.h: Removed.
  • ForwardingHeaders/misc/pointerhash.h: Removed.
  • WebCore.xcodeproj/project.pbxproj:
  • khtml/css/cssstyleselector.cpp: (khtml::CSSRuleSet::getIDRules): (khtml::CSSRuleSet::getClassRules): (khtml::CSSRuleSet::getTagRules): (khtml::CSSRuleSet::getUniversalRules): (khtml::CSSRuleSet::addToRuleSet):
  • khtml/css/cssstyleselector.h:
  • khtml/ecma/kjs_binding.cpp:
  • khtml/editing/jsediting.cpp:
  • khtml/html/html_documentimpl.cpp: (DOM::addItemToMap):
  • khtml/html/html_documentimpl.h:
  • khtml/html/html_elementimpl.cpp:
  • khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::radioButtonChecked):
  • khtml/html/html_formimpl.h:
  • khtml/html/htmlfactory.cpp: (DOM::HTMLElementFactory::createHTMLElement):
  • khtml/html/htmlparser.cpp: (HTMLParser::getNode):
  • khtml/xml/dom_atomicstring.cpp:
  • khtml/xml/dom_qname.cpp:
  • khtml/xml/dom_stringimpl.h: (KXMLCore::): (KXMLCore::CaseInsensitiveHash::hash): (KXMLCore::CaseInsensitiveHash::equal):
  • khtml/xml/xml_tokenizer.cpp:
  • kwq/DOM.mm: (ObjCEventListener::ObjCEventListener):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r10639 r10653  
    3333                6541BD7408E80A17002CBEE7 /* TCSystemAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6541BD7008E80A17002CBEE7 /* TCSystemAlloc.cpp */; };
    3434                6541BD7508E80A17002CBEE7 /* TCSystemAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 6541BD7108E80A17002CBEE7 /* TCSystemAlloc.h */; };
     35                6557E8F808EA5D4D0049CDFC /* HashMapPtrSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 6557E8F708EA5D4D0049CDFC /* HashMapPtrSpec.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3536                65621E6D089E859700760F35 /* property_slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* property_slot.cpp */; };
    3637                65621E6E089E859700760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3738                65621E6F089E85D300760F35 /* property_slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* property_slot.cpp */; };
    3839                65621E70089E85D300760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
     40                65DFC93008EA173A00F7300B /* HashFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92A08EA173A00F7300B /* HashFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
     41                65DFC93108EA173A00F7300B /* HashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92B08EA173A00F7300B /* HashMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
     42                65DFC93208EA173A00F7300B /* HashSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92C08EA173A00F7300B /* HashSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
     43                65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65DFC92D08EA173A00F7300B /* HashTable.cpp */; };
     44                65DFC93408EA173A00F7300B /* HashTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92E08EA173A00F7300B /* HashTable.h */; settings = {ATTRIBUTES = (Private, ); }; };
     45                65DFC93508EA173A00F7300B /* HashTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92F08EA173A00F7300B /* HashTraits.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3946                65E217BD08E7EECC0023E5F6 /* Assertions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E217B708E7EECC0023E5F6 /* Assertions.h */; settings = {ATTRIBUTES = (Private, ); }; };
    4047                65E217BE08E7EECC0023E5F6 /* Assertions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65E217B808E7EECC0023E5F6 /* Assertions.mm */; };
     
    112119                932F5B840822A1C700736975 /* NP_jsobject.h in Headers */ = {isa = PBXBuildFile; fileRef = 517BE7F40610E39600221947 /* NP_jsobject.h */; settings = {ATTRIBUTES = (Private, ); }; };
    113120                932F5B850822A1C700736975 /* npruntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 5199B1BE061B65BC0070C006 /* npruntime.h */; settings = {ATTRIBUTES = (Private, ); }; };
    114                 932F5B870822A1C700736975 /* interpreter_map.h in Headers */ = {isa = PBXBuildFile; fileRef = 65AB004906261CBA0076DE63 /* interpreter_map.h */; };
    115121                932F5B880822A1C700736975 /* protect.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C02FBB0637462A003E7EE6 /* protect.h */; settings = {ATTRIBUTES = (Private, ); }; };
    116122                932F5B890822A1C700736975 /* protected_values.h in Headers */ = {isa = PBXBuildFile; fileRef = 650B68D90639033F009D42DE /* protected_values.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    173179                932F5BCA0822A1C700736975 /* c_class.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182A53A06012C3000CBD2F2 /* c_class.cpp */; };
    174180                932F5BCB0822A1C700736975 /* npruntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5199B1BD061B65BC0070C006 /* npruntime.cpp */; };
    175                 932F5BCC0822A1C700736975 /* interpreter_map.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65AB004806261CBA0076DE63 /* interpreter_map.cpp */; };
    176181                932F5BCD0822A1C700736975 /* protected_values.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 650B68D80639033F009D42DE /* protected_values.cpp */; };
    177182                932F5BCE0822A1C700736975 /* WebScriptObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51863FC406542D3100E9E8DD /* WebScriptObject.mm */; };
     
    270275                A85D8234087B2822006A9172 /* NP_jsobject.h in Headers */ = {isa = PBXBuildFile; fileRef = 517BE7F40610E39600221947 /* NP_jsobject.h */; settings = {ATTRIBUTES = (Private, ); }; };
    271276                A85D8235087B2822006A9172 /* npruntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 5199B1BE061B65BC0070C006 /* npruntime.h */; settings = {ATTRIBUTES = (Private, ); }; };
    272                 A85D8236087B2822006A9172 /* interpreter_map.h in Headers */ = {isa = PBXBuildFile; fileRef = 65AB004906261CBA0076DE63 /* interpreter_map.h */; };
    273277                A85D8237087B2822006A9172 /* protect.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C02FBB0637462A003E7EE6 /* protect.h */; settings = {ATTRIBUTES = (Private, ); }; };
    274278                A85D8238087B2822006A9172 /* protected_values.h in Headers */ = {isa = PBXBuildFile; fileRef = 650B68D90639033F009D42DE /* protected_values.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    333337                A85D8279087B2822006A9172 /* c_class.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5182A53A06012C3000CBD2F2 /* c_class.cpp */; };
    334338                A85D827A087B2822006A9172 /* npruntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5199B1BD061B65BC0070C006 /* npruntime.cpp */; };
    335                 A85D827B087B2822006A9172 /* interpreter_map.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65AB004806261CBA0076DE63 /* interpreter_map.cpp */; };
    336339                A85D827C087B2822006A9172 /* protected_values.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 650B68D80639033F009D42DE /* protected_values.cpp */; };
    337340                A85D827D087B2822006A9172 /* WebScriptObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51863FC406542D3100E9E8DD /* WebScriptObject.mm */; };
     
    500503                6541BD7008E80A17002CBEE7 /* TCSystemAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TCSystemAlloc.cpp; sourceTree = "<group>"; };
    501504                6541BD7108E80A17002CBEE7 /* TCSystemAlloc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TCSystemAlloc.h; sourceTree = "<group>"; };
     505                6557E8F708EA5D4D0049CDFC /* HashMapPtrSpec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashMapPtrSpec.h; sourceTree = "<group>"; };
    502506                6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
    503507                6560A63D04B3B69F008AE952 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
    504508                65621E6B089E859700760F35 /* property_slot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = property_slot.cpp; sourceTree = "<group>"; };
    505509                65621E6C089E859700760F35 /* property_slot.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = property_slot.h; sourceTree = "<group>"; };
    506                 65AB004806261CBA0076DE63 /* interpreter_map.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = interpreter_map.cpp; sourceTree = "<group>"; };
    507                 65AB004906261CBA0076DE63 /* interpreter_map.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = interpreter_map.h; sourceTree = "<group>"; };
    508510                65C02FBB0637462A003E7EE6 /* protect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protect.h; sourceTree = "<group>"; };
     511                65DFC92A08EA173A00F7300B /* HashFunctions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashFunctions.h; sourceTree = "<group>"; };
     512                65DFC92B08EA173A00F7300B /* HashMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashMap.h; sourceTree = "<group>"; };
     513                65DFC92C08EA173A00F7300B /* HashSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashSet.h; sourceTree = "<group>"; };
     514                65DFC92D08EA173A00F7300B /* HashTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HashTable.cpp; sourceTree = "<group>"; };
     515                65DFC92E08EA173A00F7300B /* HashTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashTable.h; sourceTree = "<group>"; };
     516                65DFC92F08EA173A00F7300B /* HashTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashTraits.h; sourceTree = "<group>"; };
    509517                65E217B708E7EECC0023E5F6 /* Assertions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Assertions.h; sourceTree = "<group>"; };
    510518                65E217B808E7EECC0023E5F6 /* Assertions.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = Assertions.mm; sourceTree = "<group>"; };
     
    704712                                652C107E08DA7B1E0020887D /* protected_reference.h */,
    705713                                650B68D90639033F009D42DE /* protected_values.h */,
    706                                 65AB004806261CBA0076DE63 /* interpreter_map.cpp */,
    707                                 65AB004906261CBA0076DE63 /* interpreter_map.h */,
    708714                                F692A84E0255597D01FF60F7 /* array_object.h */,
    709715                                F692A84D0255597D01FF60F7 /* array_object.cpp */,
     
    835841                        isa = PBXGroup;
    836842                        children = (
     843                                6557E8F708EA5D4D0049CDFC /* HashMapPtrSpec.h */,
     844                                65DFC92A08EA173A00F7300B /* HashFunctions.h */,
     845                                65DFC92B08EA173A00F7300B /* HashMap.h */,
     846                                65DFC92C08EA173A00F7300B /* HashSet.h */,
     847                                65DFC92D08EA173A00F7300B /* HashTable.cpp */,
     848                                65DFC92E08EA173A00F7300B /* HashTable.h */,
     849                                65DFC92F08EA173A00F7300B /* HashTraits.h */,
    837850                                6541BD6E08E80A17002CBEE7 /* TCPageMap.h */,
    838851                                6541BD6F08E80A17002CBEE7 /* TCSpinLock.h */,
     
    983996                                932F5B840822A1C700736975 /* NP_jsobject.h in Headers */,
    984997                                932F5B850822A1C700736975 /* npruntime.h in Headers */,
    985                                 932F5B870822A1C700736975 /* interpreter_map.h in Headers */,
    986998                                932F5B880822A1C700736975 /* protect.h in Headers */,
    987999                                932F5B890822A1C700736975 /* protected_values.h in Headers */,
     
    10051017                                6541BD7308E80A17002CBEE7 /* TCSpinLock.h in Headers */,
    10061018                                6541BD7508E80A17002CBEE7 /* TCSystemAlloc.h in Headers */,
     1019                                65DFC93008EA173A00F7300B /* HashFunctions.h in Headers */,
     1020                                65DFC93108EA173A00F7300B /* HashMap.h in Headers */,
     1021                                65DFC93208EA173A00F7300B /* HashSet.h in Headers */,
     1022                                65DFC93408EA173A00F7300B /* HashTable.h in Headers */,
     1023                                65DFC93508EA173A00F7300B /* HashTraits.h in Headers */,
     1024                                6557E8F808EA5D4D0049CDFC /* HashMapPtrSpec.h in Headers */,
    10071025                        );
    10081026                        runOnlyForDeploymentPostprocessing = 0;
     
    10741092                                A85D8234087B2822006A9172 /* NP_jsobject.h in Headers */,
    10751093                                A85D8235087B2822006A9172 /* npruntime.h in Headers */,
    1076                                 A85D8236087B2822006A9172 /* interpreter_map.h in Headers */,
    10771094                                A85D8237087B2822006A9172 /* protect.h in Headers */,
    10781095                                A85D8238087B2822006A9172 /* protected_values.h in Headers */,
     
    16361653                                932F5BCA0822A1C700736975 /* c_class.cpp in Sources */,
    16371654                                932F5BCB0822A1C700736975 /* npruntime.cpp in Sources */,
    1638                                 932F5BCC0822A1C700736975 /* interpreter_map.cpp in Sources */,
    16391655                                932F5BCD0822A1C700736975 /* protected_values.cpp in Sources */,
    16401656                                932F5BCE0822A1C700736975 /* WebScriptObject.mm in Sources */,
     
    16561672                                65E217BF08E7EECC0023E5F6 /* FastMalloc.cpp in Sources */,
    16571673                                6541BD7408E80A17002CBEE7 /* TCSystemAlloc.cpp in Sources */,
     1674                                65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */,
    16581675                        );
    16591676                        runOnlyForDeploymentPostprocessing = 0;
     
    17331750                                A85D8279087B2822006A9172 /* c_class.cpp in Sources */,
    17341751                                A85D827A087B2822006A9172 /* npruntime.cpp in Sources */,
    1735                                 A85D827B087B2822006A9172 /* interpreter_map.cpp in Sources */,
    17361752                                A85D827C087B2822006A9172 /* protected_values.cpp in Sources */,
    17371753                                A85D827D087B2822006A9172 /* WebScriptObject.mm in Sources */,
Note: See TracChangeset for help on using the changeset viewer.