1. 26 Mar, 2008 3 commits
  2. 28 Oct, 2007 1 commit
    • mjs's avatar
      Reviewed by Oliver. · 205a6c15
      mjs authored
              
              - numerous HashTable performance improvements
              
              This does not quite add up to a measurable win on SunSpider, but it allows a
              follow-on > 3% improvement and probably helps WebCore too.
              
              I made the following improvements, among others:
              
              - Made HashFunctions note whether it is ok to compare a real value with the equal() function
              to the empty or deleted value, and used this to optimize the comparisons done in hash lookup.
              
              - Specialized lookup so it doesn't have to do so many extra branches and build so many extra
              std::pairs for cases that don't need them. There are now four versions, one for read-only access,
              two for writing, and one folded directly into add() (these all were improvments).
              
              - Made HashMap::get() use lookup() directly instead of find() to avoid having to build iterators.
              
              - Made a special constructor for iterators that knows it points to
              a valid filled cell and so skips updating itself.
      
              - Reordered memory accesses in the various lookup functions for better codegetion
              
              - Made simple translators avoid passing a hash code around
              
              - Other minor tweaks
              
              * wtf/HashTable.h:
              (WTF::):
              (WTF::HashTableConstIterator::HashTableConstIterator):
              (WTF::HashTableIterator::HashTableIterator):
              (WTF::IdentityHashTranslator::translate):
              (WTF::HashTable::end):
              (WTF::HashTable::lookup):
              (WTF::HashTable::lookupForWriting):
              (WTF::HashTable::makeKnownGoodIterator):
              (WTF::HashTable::makeKnownGoodConstIterator):
              (WTF::::lookup):
              (WTF::::lookupForWriting):
              (WTF::::fullLookupForWriting):
              (WTF::::add):
              (WTF::::addPassingHashCode):
              (WTF::::reinsert):
              (WTF::::find):
              (WTF::::contains):
              * kjs/identifier.cpp:
              (WTF::):
              * wtf/HashFunctions.h:
              (WTF::):
              * wtf/HashMap.h:
              (WTF::):
              (WTF::::get):
              * wtf/HashSet.h:
              (WTF::):
              (WTF::::add):
              * wtf/ListHashSet.h:
              (WTF::ListHashSetTranslator::translate):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      205a6c15
  3. 12 Oct, 2007 1 commit
    • oliver's avatar
      Reviewed by Maciej. · f443bfbc
      oliver authored
              Use intHash to hash floats and doubles too.
      
              * ChangeLog:
              * wtf/HashFunctions.h:
              (WTF::FloatHash::hash):
              (WTF::FloatHash::equal):
              (WTF::):
              * wtf/HashTraits.h:
              (WTF::FloatHashTraits::emptyValue):
              (WTF::FloatHashTraits::deletedValue):
              (WTF::):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f443bfbc
  4. 27 Oct, 2006 1 commit
    • darin's avatar
      Reviewed by Geoff. · b847b44b
      darin authored
              - made changes so the code compiles with the highest warning level
                under MSVC (disabling some warnings, making some code fixes)
      
              * API/JSCallbackConstructor.cpp:
              (KJS::JSCallbackConstructor::construct):
              * API/JSCallbackFunction.cpp:
              (KJS::JSCallbackFunction::callAsFunction):
              * API/JSCallbackObject.cpp:
              (KJS::JSCallbackObject::init):
              (KJS::JSCallbackObject::construct):
              (KJS::JSCallbackObject::callAsFunction):
              * API/JSObjectRef.cpp:
              (JSPropertyNameArrayGetNameAtIndex):
              * API/JSStringRef.cpp:
              (JSStringCreateWithCharacters):
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * bindings/c/c_utility.cpp:
              (KJS::Bindings::convertUTF8ToUTF16):
              (KJS::Bindings::coerceValueToNPVariantStringType):
              (KJS::Bindings::convertValueToNPVariant):
              * kjs/DateMath.h:
              (KJS::GregorianDateTime::GregorianDateTime):
              * kjs/ExecState.h:
              (KJS::ExecState::hadException):
              * kjs/JSImmediate.h:
              (KJS::JSImmediate::fromDouble):
              (KJS::JSImmediate::toDouble):
              (KJS::JSImmediate::NanAsBits):
              (KJS::JSImmediate::oneAsBits):
              * kjs/Parser.h:
              * kjs/PropertyNameArray.h:
              (KJS::PropertyNameArray::size):
              * kjs/array_object.cpp:
              (ArrayObjectImp::callAsFunction):
              * kjs/bool_object.cpp:
              (BooleanObjectImp::callAsFunction):
              * kjs/collector.cpp:
              (KJS::Collector::allocate):
              (KJS::Collector::markCurrentThreadConservatively):
              (KJS::Collector::collect):
              * kjs/completion.h:
              (KJS::Completion::isValueCompletion):
              * kjs/date_object.cpp:
              (KJS::findMonth):
              * kjs/debugger.cpp:
              (Debugger::sourceParsed):
              (Debugger::sourceUnused):
              (Debugger::exception):
              (Debugger::atStatement):
              (Debugger::callEvent):
              (Debugger::returnEvent):
              * kjs/dtoa.cpp:
              * kjs/error_object.cpp:
              (ErrorObjectImp::callAsFunction):
              (NativeErrorImp::callAsFunction):
              * kjs/function.cpp:
              (KJS::FunctionImp::processVarDecls):
              (KJS::GlobalFuncImp::callAsFunction):
              * kjs/function_object.cpp:
              (FunctionPrototype::callAsFunction):
              * kjs/grammar.y:
              * kjs/identifier.cpp:
              (KJS::CStringTranslator::translate):
              (KJS::Identifier::add):
              * kjs/internal.h:
              * kjs/lexer.cpp:
              (Lexer::lex):
              (Lexer::isIdentStart):
              (Lexer::isIdentPart):
              (isDecimalDigit):
              (Lexer::isHexDigit):
              (Lexer::isOctalDigit):
              (Lexer::matchPunctuator):
              (Lexer::singleEscape):
              (Lexer::convertOctal):
              (Lexer::convertHex):
              (Lexer::convertUnicode):
              (Lexer::record8):
              * kjs/lexer.h:
              * kjs/math_object.cpp:
              (MathFuncImp::callAsFunction):
              * kjs/number_object.cpp:
              (integer_part_noexp):
              (intPow10):
              (NumberProtoFunc::callAsFunction):
              (NumberObjectImp::callAsFunction):
              * kjs/object.cpp:
              (KJS::JSObject::deleteProperty):
              (KJS::JSObject::callAsFunction):
              (KJS::JSObject::toBoolean):
              (KJS::JSObject::toObject):
              * kjs/object.h:
              (KJS::JSObject::getPropertySlot):
              * kjs/property_map.cpp:
              (KJS::isValid):
              (KJS::PropertyMap::put):
              (KJS::PropertyMap::insert):
              (KJS::PropertyMap::containsGettersOrSetters):
              * kjs/property_map.h:
              (KJS::PropertyMap::hasGetterSetterProperties):
              * kjs/property_slot.h:
              * kjs/string_object.cpp:
              (StringInstance::getPropertyNames):
              (StringObjectImp::callAsFunction):
              (StringObjectFuncImp::callAsFunction):
              * kjs/ustring.cpp:
              (KJS::UString::Rep::computeHash):
              (KJS::UString::UString):
              (KJS::UString::from):
              (KJS::UString::append):
              (KJS::UString::ascii):
              (KJS::UString::operator=):
              (KJS::UString::find):
              (KJS::UString::rfind):
              * kjs/ustring.h:
              (KJS::UChar::high):
              (KJS::UChar::low):
              (KJS::UCharReference::low):
              (KJS::UCharReference::high):
              * kjs/value.cpp:
              (KJS::JSValue::toUInt16):
              * kjs/value.h:
              * pcre/pcre_compile.c:
              (get_othercase_range):
              * pcre/pcre_exec.c:
              (match):
              * pcre/pcre_internal.h:
              * wtf/HashFunctions.h:
              (WTF::intHash):
              (WTF::PtrHash::hash):
              * wtf/MathExtras.h:
              (isnan):
              (lround):
              (lroundf):
              * wtf/StringExtras.h:
              (strncasecmp):
              * wtf/unicode/icu/UnicodeIcu.h:
              (WTF::Unicode::isPrintableChar):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b847b44b
  5. 18 Oct, 2006 1 commit
    • mjs's avatar
      JavaScriptCore: · 98cf6e09
      mjs authored
              Reviewed by Geoff.
              
              - remove vestiges of KXMLCore name (former name of WTF).
      
              * wtf/Assertions.h:
              * wtf/FastMalloc.h:
              (operator new):
              (operator delete):
              (operator new[]):
              (operator delete[]):
              * wtf/FastMallocInternal.h:
              * wtf/Forward.h:
              * wtf/GetPtr.h:
              * wtf/HashCountedSet.h:
              * wtf/HashFunctions.h:
              * wtf/HashMap.h:
              * wtf/HashSet.h:
              * wtf/HashTable.h:
              * wtf/HashTraits.h:
              * wtf/ListRefPtr.h:
              * wtf/MathExtras.h:
              * wtf/Noncopyable.h:
              * wtf/OwnArrayPtr.h:
              * wtf/OwnPtr.h:
              * wtf/PassRefPtr.h:
              * wtf/Platform.h:
              * wtf/RefPtr.h:
              * wtf/StringExtras.h:
              (snprintf):
              * wtf/UnusedParam.h:
              * wtf/Vector.h:
              * wtf/VectorTraits.h:
      
      WebCore:
      
              Reviewed by Geoff.
      
              - remove vestiges of KXMLCore name (former name of WTF).
      
              * config.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98cf6e09
  6. 09 May, 2006 1 commit
    • mjs's avatar
      JavaScriptCore: · bb863518
      mjs authored
              Rubber stamped by Anders.
              
              - renamed kxmlcore to wtf
              
              kxmlcore --> wtf
              KXMLCore --> WTF
              WKC --> WTF
      
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bindings/c/c_instance.cpp:
              * bindings/objc/WebScriptObject.mm:
              * kjs/JSImmediate.h:
              * kjs/Parser.cpp:
              * kjs/Parser.h:
              * kjs/array_object.cpp:
              * kjs/collector.cpp:
              (KJS::Collector::registerThread):
              * kjs/collector.h:
              * kjs/config.h:
              * kjs/function.cpp:
              (KJS::isStrWhiteSpace):
              * kjs/function.h:
              * kjs/identifier.cpp:
              * kjs/internal.cpp:
              * kjs/internal.h:
              * kjs/lexer.cpp:
              (Lexer::shift):
              (Lexer::isWhiteSpace):
              (Lexer::isIdentStart):
              (Lexer::isIdentPart):
              * kjs/lookup.cpp:
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              * kjs/number_object.cpp:
              * kjs/object.h:
              * kjs/property_map.cpp:
              * kjs/property_map.h:
              * kjs/string_object.cpp:
              (StringProtoFunc::callAsFunction):
              * kjs/testkjs.cpp:
              (testIsInteger):
              * kjs/ustring.cpp:
              * kjs/ustring.h:
              * kxmlcore: Removed.
              * kxmlcore/AlwaysInline.h: Removed.
              * kxmlcore/Assertions.cpp: Removed.
              * kxmlcore/Assertions.h: Removed.
              * kxmlcore/FastMalloc.cpp: Removed.
              * kxmlcore/FastMalloc.h: Removed.
              * kxmlcore/FastMallocInternal.h: Removed.
              * kxmlcore/Forward.h: Removed.
              * kxmlcore/HashCountedSet.h: Removed.
              * kxmlcore/HashFunctions.h: Removed.
              * kxmlcore/HashMap.h: Removed.
              * kxmlcore/HashSet.h: Removed.
              * kxmlcore/HashTable.cpp: Removed.
              * kxmlcore/HashTable.h: Removed.
              * kxmlcore/HashTraits.h: Removed.
              * kxmlcore/ListRefPtr.h: Removed.
              * kxmlcore/Noncopyable.h: Removed.
              * kxmlcore/OwnArrayPtr.h: Removed.
              * kxmlcore/OwnPtr.h: Removed.
              * kxmlcore/PassRefPtr.h: Removed.
              * kxmlcore/Platform.h: Removed.
              * kxmlcore/RefPtr.h: Removed.
              * kxmlcore/TCPageMap.h: Removed.
              * kxmlcore/TCSpinLock.h: Removed.
              * kxmlcore/TCSystemAlloc.cpp: Removed.
              * kxmlcore/TCSystemAlloc.h: Removed.
              * kxmlcore/UnusedParam.h: Removed.
              * kxmlcore/Vector.h: Removed.
              * kxmlcore/VectorTraits.h: Removed.
              * kxmlcore/unicode: Removed.
              * kxmlcore/unicode/Unicode.h: Removed.
              * kxmlcore/unicode/UnicodeCategory.h: Removed.
              * kxmlcore/unicode/icu: Removed.
              * kxmlcore/unicode/icu/UnicodeIcu.h: Removed.
              * kxmlcore/unicode/posix: Removed.
              * kxmlcore/unicode/qt3: Removed.
              * kxmlcore/unicode/qt4: Removed.
              * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed.
              * pcre/pcre_get.c:
              * wtf: Added.
              * wtf/Assertions.cpp:
              * wtf/Assertions.h:
              * wtf/FastMalloc.cpp:
              (WTF::TCMalloc_ThreadCache::Scavenge):
              (WTF::do_malloc):
              (WTF::do_free):
              (WTF::TCMallocGuard::TCMallocGuard):
              (WTF::malloc):
              (WTF::free):
              (WTF::calloc):
              (WTF::cfree):
              (WTF::realloc):
              * wtf/FastMalloc.h:
              * wtf/FastMallocInternal.h:
              * wtf/Forward.h:
              * wtf/HashCountedSet.h:
              * wtf/HashFunctions.h:
              * wtf/HashMap.h:
              * wtf/HashSet.h:
              * wtf/HashTable.cpp:
              * wtf/HashTable.h:
              * wtf/HashTraits.h:
              * wtf/ListRefPtr.h:
              * wtf/Noncopyable.h:
              * wtf/OwnArrayPtr.h:
              * wtf/OwnPtr.h:
              * wtf/PassRefPtr.h:
              * wtf/RefPtr.h:
              * wtf/TCSystemAlloc.cpp:
              (TCMalloc_SystemAlloc):
              * wtf/Vector.h:
              * wtf/VectorTraits.h:
              * wtf/unicode/UnicodeCategory.h:
              * wtf/unicode/icu/UnicodeIcu.h:
      
      JavaScriptGlue:
      
              Rubber stamped by Anders.
              
              - renamed kxmlcore to wtf
              
              kxmlcore --> wtf
              KXMLCore --> WTF
              WKC --> WTF
      
              * config.h:
              * kxmlcore: Removed.
              * kxmlcore/AlwaysInline.h: Removed.
              * kxmlcore/Assertions.h: Removed.
              * kxmlcore/FastMalloc.h: Removed.
              * kxmlcore/Forward.h: Removed.
              * kxmlcore/HashCountedSet.h: Removed.
              * kxmlcore/HashSet.h: Removed.
              * kxmlcore/Noncopyable.h: Removed.
              * kxmlcore/OwnArrayPtr.h: Removed.
              * kxmlcore/OwnPtr.h: Removed.
              * kxmlcore/PassRefPtr.h: Removed.
              * kxmlcore/Platform.h: Removed.
              * kxmlcore/RefPtr.h: Removed.
              * kxmlcore/Vector.h: Removed.
              * wtf: Added.
      
      WebCore:
      
              Rubber stamped by Anders.
              
              - renamed kxmlcore to wtf
              
              kxmlcore --> wtf
              KXMLCore --> WTF
              WKC --> WTF
      
              * ForwardingHeaders/kxmlcore: Removed.
              * ForwardingHeaders/kxmlcore/AlwaysInline.h: Removed.
              * ForwardingHeaders/kxmlcore/Assertions.h: Removed.
              * ForwardingHeaders/kxmlcore/FastMalloc.h: Removed.
              * ForwardingHeaders/kxmlcore/Forward.h: Removed.
              * ForwardingHeaders/kxmlcore/HashCountedSet.h: Removed.
              * ForwardingHeaders/kxmlcore/HashMap.h: Removed.
              * ForwardingHeaders/kxmlcore/HashSet.h: Removed.
              * ForwardingHeaders/kxmlcore/HashTraits.h: Removed.
              * ForwardingHeaders/kxmlcore/Noncopyable.h: Removed.
              * ForwardingHeaders/kxmlcore/OwnArrayPtr.h: Removed.
              * ForwardingHeaders/kxmlcore/OwnPtr.h: Removed.
              * ForwardingHeaders/kxmlcore/PassRefPtr.h: Removed.
              * ForwardingHeaders/kxmlcore/Platform.h: Removed.
              * ForwardingHeaders/kxmlcore/RefPtr.h: Removed.
              * ForwardingHeaders/kxmlcore/Vector.h: Removed.
              * ForwardingHeaders/wtf: Added.
              * bindings/js/JSHTMLElementWrapperFactory.h:
              * bindings/js/kjs_binding.cpp:
              * bindings/js/kjs_window.h:
              * bindings/objc/DOMImplementationFront.h:
              * bridge/JavaAppletWidget.h:
              * bridge/mac/WebCoreFrameNamespaces.mm:
              * bridge/mac/WebCorePageBridge.mm:
              (initializeLogChannel):
              * bridge/mac/WebCoreStringTruncator.mm:
              * bridge/mac/WebCoreViewFactory.m:
              * config.h:
              * css/css_base.h:
              * css/css_valueimpl.h:
              * css/csshelper.cpp:
              * css/cssparser.h:
              * dom/DOMImplementation.h:
              * dom/Document.h:
              * dom/NamedNodeMap.h:
              * dom/Node.h:
              * dom/NodeList.h:
              * dom/QualifiedName.cpp:
              * dom/Range.h:
              * dom/StyledElement.cpp:
              * dom/dom2_traversalimpl.h:
              * dom/xml_tokenizer.h:
              * editing/RebalanceWhitespaceCommand.cpp:
              * editing/RemoveCSSPropertyCommand.cpp:
              * editing/RemoveNodeAttributeCommand.cpp:
              * editing/RemoveNodeCommand.cpp:
              * editing/RemoveNodePreservingChildrenCommand.cpp:
              * editing/ReplaceSelectionCommand.h:
              * editing/Selection.cpp:
              * editing/SetNodeAttributeCommand.cpp:
              * editing/SplitElementCommand.cpp:
              * editing/SplitTextNodeCommand.cpp:
              * editing/SplitTextNodeContainingElementCommand.cpp:
              * editing/TextIterator.h:
              * editing/htmlediting.h:
              * editing/markup.h:
              * html/CanvasGradient.h:
              * html/CanvasRenderingContext2D.h:
              * html/CanvasStyle.cpp:
              * html/HTMLCollection.h:
              * html/HTMLElementFactory.h:
              * kcanvas/KCanvasFilters.cpp:
              * kcanvas/KCanvasPath.h:
              * kcanvas/RenderPath.cpp:
              * kcanvas/RenderSVGImage.cpp:
              * kcanvas/RenderSVGText.cpp:
              * kcanvas/device/quartz/KCanvasItemQuartz.mm:
              * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
              * kcanvas/device/quartz/QuartzSupport.mm:
              * ksvg2/misc/KSVGTimeScheduler.h:
              * ksvg2/misc/SVGDocumentExtensions.h:
              * ksvg2/scripts/make_names.pl:
              * ksvg2/svg/SVGDOMImplementation.cpp:
              * ksvg2/svg/SVGExternalResourcesRequired.h:
              * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
              * ksvg2/svg/SVGForeignObjectElement.cpp:
              * ksvg2/svg/SVGImageElement.cpp:
              * ksvg2/svg/SVGMaskElement.cpp:
              * ksvg2/svg/SVGStyledElement.cpp:
              * ksvg2/svg/SVGTests.h:
              * ksvg2/svg/SVGTransform.h:
              * ksvg2/svg/SVGTransformable.cpp:
              * kwq/AccessibilityObjectCache.h:
              * kwq/KWQCString.cpp:
              * kwq/KWQFormData.mm:
              * kwq/KWQListBox.mm:
              * kwq/KWQResourceLoader.mm:
              * kwq/KWQTextEdit.mm:
              * loader/Cache.h:
              * loader/CachedObject.h:
              * loader/CachedObjectClientWalker.h:
              * loader/Decoder.h:
              * loader/DocLoader.h:
              * loader/loader.cpp:
              * loader/loader.h:
              * page/DOMWindow.h:
              * page/Frame.h:
              * page/FramePrivate.h:
              * page/FrameTree.cpp:
              * page/Page.cpp:
              * page/Page.h:
              * page/Plugin.h:
              * platform/Arena.cpp:
              * platform/ArrayImpl.h:
              * platform/AtomicString.cpp:
              * platform/CharsetNames.cpp:
              * platform/Color.cpp:
              * platform/DeprecatedPtrListImpl.cpp:
              * platform/DeprecatedValueListImpl.h:
              * platform/FontFallbackList.h:
              * platform/GraphicsContext.h:
              * platform/GraphicsTypes.cpp:
              * platform/Image.h:
              * platform/KURL.cpp:
              * platform/Logging.cpp:
              * platform/Logging.h:
              * platform/PlatformString.h:
              * platform/PlugInInfoStore.h:
              * platform/StreamingTextDecoder.cpp:
              * platform/StreamingTextDecoder.h:
              * platform/String.cpp:
              * platform/StringHash.h:
              * platform/StringImpl.cpp:
              * platform/StringImpl.h:
              * platform/TextEncoding.cpp:
              * platform/Timer.cpp:
              * platform/Timer.h:
              * platform/TransferJob.h:
              * platform/TransferJobInternal.h:
              * platform/mac/BlockExceptions.mm:
              * platform/mac/ColorMac.mm:
              * platform/mac/FontData.mm:
              * platform/mac/KURLMac.mm:
              * platform/mac/QStringMac.mm:
              * platform/mac/SharedTimerMac.cpp:
              * platform/mac/TextEncodingMac.cpp:
              * platform/mac/WebCoreImageRendererFactory.m:
              * platform/mac/WebCoreKeyGenerator.m:
              * platform/mac/WebCoreTextArea.mm:
              * platform/mac/WebCoreTextField.mm:
              * platform/mac/WebTextRendererFactory.h:
              * platform/mac/WebTextRendererFactory.mm:
              * platform/win/TemporaryLinkStubs.cpp:
              (JavaAppletWidget::JavaAppletWidget):
              * rendering/InlineTextBox.cpp:
              * rendering/RenderText.cpp:
              * rendering/RenderTreeAsText.cpp:
              * rendering/bidi.cpp:
              * xml/XSLTProcessor.h:
              * xpath/impl/XPathExpressionNode.h:
              * xpath/impl/XPathParser.h:
              * xpath/impl/XPathPath.h:
              * xpath/impl/XPathUtil.h:
      
      WebKit:
      
              Rubber stamped by Anders.
              
              - renamed kxmlcore to wtf
              
              kxmlcore --> wtf
              KXMLCore --> WTF
              WKC --> WTF
      
              * Misc/WebKitLogging.h:
              * Misc/WebKitLogging.m:
              (initializeLogChannel):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb863518
  7. 05 Apr, 2006 1 commit
    • darin's avatar
      JavaScriptCore: · 6f2a3ef3
      darin authored
              Reviewed by Maciej.
      
              - JavaScriptCore part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8049
                StringImpl hash traits deleted value creates an init routine for WebCore
                <rdar://problem/4442248> REGRESSION: WebCore has init routines (8049)
      
              Change HashMap and HashSet implementation so they fold various types together.
              This allows us to implement maps and sets that use RefPtr<WebCore::StringImpl>
              and WebCore::String in terms of the underlying raw pointer type, and hence use
              -1 for the deleted value.
      
              * kxmlcore/HashTraits.h: Added a new type to HashTraits, StorageTraits, which is a
              type to be used when storing a value that has the same layout as the type itself.
              This is used only for non-key cases. In the case of keys, the hash function must also
              be considered. Moved emptyValue out of GenericHashTraitsBase into GenericHashTraits.
              Added a new bool to HashTraits, needsRef, which indicates whether the type needs
              explicit reference counting. If the type itself has needsRef true, but the storage
              type has needsRef false, then the HashSet or HashMap has to handle the reference
              counting explicitly. Added hash trait specializations for all signed integer values
              that give -1 as the deleted value. Gave all integers StorageTraits of the canonical
              integer type of the same size so int and long will share code. Gave all pointers and
              RefPtrs StorageTraits of the appropriately sized integer type. Removed redundant
              TraitType and emptyValue definitions in the pointer specialization for HashTraits.
              Added PairBaseHashTraits, which doesn't try to set up needsDestruction and deletedValue.
              Useful for types where we don't want to force the existence of deletedValue, such as
              the type of a pair in a HashMap which is not the actual storage type. Removed an
              unneeded parameter from the DeletedValueAssigner template. Added HashKeyStorageTraits
              template, which determines what type can be used to store a given hash key type with
              a given hash function, and specialized it for pointers and RefPtr so that pointer
              hash tables share an underlying HashTable that uses IntHash.
      
              * kxmlcore/HashTable.h: Added HashTableConstIteratorAdapter, HashTableIteratorAdapter,
              NeedsRef, RefCountManagerBase, RefCountManager, HashTableRefCountManagerBase, and
              HashTableRefCountManager. All are used by both HashSet and HashMap to handle hash
              tables where the type stored is not the same as the real value type.
              
              * kxmlcore/HashFunctions.h: Added a new struct named IntTypes that finds an
              integer type given a sizeof value. Renamed pointerHash to intHash and made it
              use overloading and take integer parameters. Added an IntHash struct which is
              a hash function that works for integers. Changed PtrHash to call IntHash with
              an appropriately sized integer. Made IntHash the default hash function for
              many integer types. Made PtrHash the default hash function for RefPtr as well
              as for raw pointers.
      
              * kxmlcore/HashSet.h: Changed implementation to use a separate "storage type"
              derived from the new traits. The HashTable will use the storage type and all
              necessary translation and ref/deref is done at the HashSet level. Also reorganized
              the file so that the HashSet is at the top and has no inline implementation inside
              it so it's easy to read the interface to HashSet.
      
              * kxmlcore/HashMap.h: Changed implementation to use a separate "storage type"
              derived from the new traits. The HashTable will use the storage type and all
              necessary translation and ref/deref is done at the HashMap level. Also reorganized
              the file so that the HashMap is at the top and has no inline implementation inside
              it so it's easy to read the interface to HashMap.
      
              * kxmlcore/HashMapPtrSpec.h: Removed. Superceded by optimizations in HashMap itself.
      
              * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashMapPtrSpec.h, resort files,
              and also remove some unnecessary build settings from the aggregate target that
              generates derived sources.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
      
      WebCore:
      
              Reviewed by Maciej.
      
              - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8049
                StringImpl hash traits deleted value creates an init routine for WebCore
                <rdar://problem/4442248> REGRESSION: WebCore has init routines (8049)
      
              * platform/StringHash.h: Added. Moved hash functions and such for
              WebCore::String and friends into this file so we don't have to include
              the hash traits header everywhere. Changed hashing for WebCore::StringImpl
              and WebCore::String so that they use a raw pointer for the underlying
              storage type, taking advantage of the new feature added in JavaScriptCore.
      
              * platform/AtomicString.h: Moved StrHash specialization to StringHash.h.
              * platform/PlatformString.h: Moved StrHash specialization to StringHash.h.
              * platform/StringImpl.h: Moved StrHash, CaseInsensitiveHash, and HashTraits
              to StringHash.h. Left DefaultHash behind so that you can't get the wrong
              hash function by accident if you forget to include "StringHash.h".
      
              * platform/StringImpl.cpp: Added include of StringHash.h and removed
              RefPtr<StringImpl> HashTraits<RefPtr<StringImpl> >::_deleted, which is
              the object with a global initializer causing all the trouble!
      
              * kwq/AccessibilityObjectCache.h: Changed hash function to be IntHash
              instead of PtrHash.
      
              * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to inherit from
              the generic traits in KXMLCore so we get a StorageType. Also cleaned up a
              tiny bit by adding default values to the MappedAttributeKey constructor.
      
              * platform/CharsetNames.cpp: Changed hash traits here to be a new
              TextEncodingIDHashTraits struct rather than defining new default traits
              for the integer type since more integer types have default traits in
              HashTraits.h now. Also added a specialization so this class will share
              the underlying implementation (since InvalidEncoding happens to be -1).
      
              * bridge/mac/FrameMac.h:
              * dom/Document.h:
              * dom/xml_tokenizer.h:
              * khtml/xsl/XSLTProcessor.h:
              * kwq/JavaAppletWidget.h:
              * page/FramePrivate.h:
              * page/Page.cpp:
              * platform/AtomicString.cpp:
              * platform/TransferJob.h:
              * rendering/render_applet.h:
              Added include of StringHash.h.
      
              * WebCore.xcodeproj/project.pbxproj: Added StringHash.h. Remove unneeded
              CREATE_HASH_TABLE variable in build settings. Re-sorted some file lists.
              Added quotes to the CREATE_HASH_TABLE initialization in the rule that
              builds generated files. Removed various unneeded build settings for that
              target as well.
      
              * ForwardingHeaders/kxmlcore/HashTraits.h: Added.
      
              - other minor cleanup
      
              * bridge/mac/FrameMac.mm: Sorted includes.
              * dom/Node.cpp: Removed bogus symbol after #endif.
      
              * khtml/xsl/XSLTProcessor.cpp: Sorted includes. Removed redundant using
              namespace WebCore.
              * loader/Cache.cpp: Ditto.
      
      WebKitTools:
      
              Reviewed by Maciej.
      
              * Scripts/check-for-global-initializers: Remove StringImpl from the list of files that
              are allowed to have global initializers.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f2a3ef3
  8. 25 Jan, 2006 1 commit
  9. 24 Jan, 2006 1 commit
    • mjs's avatar
      JavaScriptCore: · 7ad7ee64
      mjs authored
              Reviewed by Eric.
      
              - renamed PointerHash to PtrHash
              - made PtrHash the default hash function for int and pointer types that aren't further specialized
              - added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings
              - did appropriate consequent cleanup (very few places now need to declare a hash function)
              http://bugzilla.opendarwin.org/show_bug.cgi?id=6752
              
              * kjs/array_object.cpp:
              (ArrayProtoFunc::callAsFunction): no need to mention PointerHash
              * kjs/collector.cpp: ditto
              * kjs/identifier.cpp:
              (KXMLCore::): declare DefaultHash the new way
              * kjs/internal.cpp: no need to mention PointerHash
              * kjs/ustring.h:
              * kxmlcore/HashCountedSet.h: change how we get the default hash to make it
              easier to specialize on PtrHash
              * kxmlcore/HashFunctions.h:
              (KXMLCore::): renamed PointerHash to PtrHash; changed DefaultHash so that it has
              a Hash typedef rather than being a hash function class itself; declared DefaultHash
              for int and partializy specialized for pointer types
              * kxmlcore/HashMapPtrSpec.h:
              (KXMLCore::PtrHashIteratorAdapter::PtrHashIteratorAdapter): Slight tweaks for new
              way of handling pointer hash
              (KXMLCore::PtrHashConstIteratorAdapter::PtrHashConstIteratorAdapter): ditto
              (KXMLCore::): ditto
              * kxmlcore/HashMap.h: ditto
              * kxmlcore/HashSet.h: ditto
      
      WebCore:
      
              Reviewed by Eric.
      
              - renamed PointerHash to PtrHash
              - made PtrHash the default hash function for int and pointer types that aren't further specialized
              - added an AtomicStringImpl class to make it easier and more typesafe to identity hash atomic strings
              - did appropriate consequent cleanup (very few places now need to declare a hash function)
              http://bugzilla.opendarwin.org/show_bug.cgi?id=6752
              
              * bindings/objc/DOM.mm:
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge elementWithName:inForm:]):
              * css/cssstyleselector.cpp:
              (WebCore::CSSRuleSet::getIDRules):
              (WebCore::CSSRuleSet::getClassRules):
              (WebCore::CSSRuleSet::getTagRules):
              (WebCore::CSSRuleSet::addToRuleSet):
              * khtml/dom/dom_string.h:
              (KXMLCore::):
              * khtml/ecma/kjs_binding.cpp:
              (KJS::UString::UString):
              * khtml/ecma/kjs_dom.cpp:
              (KJS::DOMNode::mark):
              * khtml/ecma/kjs_html.cpp:
              (KJS::KJS::HTMLElement::classInfo):
              (KJS::HTMLElement::accessors):
              (KJS::HTMLElement::selectSetter):
              (KJS::HTMLElement::inputSetter):
              (KJS::HTMLElement::textAreaSetter):
              (KJS::HTMLElement::buttonSetter):
              * khtml/ecma/kjs_window.h:
              * khtml/editing/apply_style_command.cpp:
              (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
              * khtml/html/HTMLCollectionImpl.h:
              * khtml/html/HTMLElementImpl.cpp:
              (WebCore::HTMLElementImpl::isRecognizedTagName):
              (WebCore::inlineTagList):
              (WebCore::blockTagList):
              * khtml/html/HTMLFormCollectionImpl.cpp:
              (WebCore::HTMLFormCollectionImpl::updateNameCache):
              * khtml/html/HTMLGenericFormElementImpl.cpp:
              (WebCore::HTMLGenericFormElementImpl::name):
              (WebCore::HTMLGenericFormElementImpl::setName):
              * khtml/html/HTMLGenericFormElementImpl.h:
              * khtml/html/HTMLInputElementImpl.cpp:
              (WebCore::HTMLInputElementImpl::name):
              * khtml/html/HTMLInputElementImpl.h:
              * khtml/html/htmlfactory.cpp:
              (DOM::HTMLElementFactory::createHTMLElement):
              * khtml/html/htmlparser.cpp:
              (HTMLParser::isHeaderTag):
              (HTMLParser::isResidualStyleTag):
              (HTMLParser::isAffectedByResidualStyle):
              * khtml/xml/DocumentImpl.cpp:
              (WebCore::DocumentImpl::checkedRadioButtonForGroup):
              (WebCore::DocumentImpl::removeRadioButtonGroup):
              * khtml/xml/DocumentImpl.h:
              * khtml/xml/NodeImpl.h:
              * khtml/xml/dom_atomicstring.h:
              (DOM::AtomicString::AtomicString):
              (DOM::AtomicString::impl):
              (KXMLCore::):
              * khtml/xml/dom_stringimpl.cpp:
              (DOM::equal):
              * khtml/xml/dom_stringimpl.h:
              (KXMLCore::):
              * khtml/xml/xml_tokenizer.h:
              * ksvg2/misc/KSVGTimeScheduler.cpp:
              (KSVG::SVGTimer::notifyAll):
              * kwq/KWQKJobClasses.h:
              * kwq/KWQObject.cpp:
              * loader/CachedObject.h:
              * loader/CachedObjectClientWalker.h:
              * loader/loader.h:
              * page/Frame.cpp:
              (Frame::endAllLifeSupport):
              * rendering/render_canvas.cpp:
              (RenderCanvas::selectionRect):
              (RenderCanvas::setSelection):
              * rendering/render_canvas.h:
              * rendering/render_object.h:
              * xml/xmlhttprequest.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ad7ee64
  10. 22 Jan, 2006 1 commit
  11. 22 Dec, 2005 1 commit
    • mjs's avatar
      JavaScriptCore: · ed5d76d4
      mjs authored
              Reviewed by Darin.
      
              - Make HashMap/HashSet support non-POD types
              http://bugzilla.opendarwin.org/show_bug.cgi?id=5332
      
              The changes for support are relatively simple, but I also made extensive changes to
              avoid copying, so that there isn't refcount thrash when you put RefPtrs into a HashMap.
      
              * kxmlcore/HashTable.h:
              (KXMLCore::swap): specialize swap for pairs, to swap elements individually,
      	so that excess copies can be avoided.
              (KXMLCore::Mover::move): Template function to either copy or swap, used
      	when transferring elements from old table to new.
              (KXMLCore::IdentityHashTranslator::hash): The old "converting lookup" templates
      	that took two or three function parameters now take a class parameter, this is
      	the class used to do a normal lookup.
              (KXMLCore::IdentityHashTranslator::equal): Ditto.
              (KXMLCore::IdentityHashTranslator::translate): Ditto. Translate now takes a reference
      	to write into instead of returning a value to avoid redundant copies.
              (KXMLCore::HashTable::~HashTable): Use deallocateTable instead of freeing directly.
              (KXMLCore::HashTable::insert): Based on HashTranslator now instead of separate
      	functions. Added a FIXME about a remaining rare excess copy.
              (KXMLCore::HashTable::isEmptyBucket): Use KeyTraits directly instead of unwrapping
      	the key from Traits, to avoid creating and destroying pair, which copies.
              (KXMLCore::HashTable::isDeletedBucket): ditto
              (KXMLCore::HashTable::lookup): Use HashTranslator now instead of separate functions.
              (KXMLCore::HashTable::initializeBucket): Renamed from emptyBucket. Use placement new to
      	work right for non-POD types.
              (KXMLCore::HashTable::deleteBucket): Use assignDeleted to avoid excess copies.
              (KXMLCore::HashTable::reinsert): use Mover template to copy or swap as appropriate
              (KXMLCore::HashTable::allocateTable): Initialize every bucket if calloc won't do.
              (KXMLCore::HashTable::deallocateTable): Destruct every bucket if needed.
              (KXMLCore::HashTable::rehash): Avoid copy before reinserting, so that swap can do its magic.
              (KXMLCore::HashTable::clear): use deallocateTable instead of freeing directly.
              (KXMLCore::HashTable::HashTable): be more dumb when copying to ensure that non-POD types
      	work right
              * kxmlcore/HashFunctions.h:
              (KXMLCore::PointerHash): Specialize PointerHash for RefPtr
              * kxmlcore/HashMap.h:
              (KXMLCore::extractFirst): Return a reference not a full object to avoid
      	copies.
              (KXMLCore::HashMapTranslator::hash): Use a special translator for insertion
      	to defer making the pair as long as possible, thus avoiding needless copies.
              (KXMLCore::HashMapTranslator::equal): ditto
              (KXMLCore::HashMapTranslator::translate): ditto
              (KXMLCore::::inlineAdd): Shared by set and add to insert using HashMapTranslator
              (KXMLCore::::set): Use inlineAdd
              (KXMLCore::::add): Use inlineAdd
              * kxmlcore/HashMapPtrSpec.h:
              (KXMLCore::): Pass KeyTraits along
              * kxmlcore/HashSet.h:
              (KXMLCore::identityExtract): Return a reference not a full object to avoid copies.
              (KXMLCore::HashSetTranslatorAdapter::hash): Redo adapter stuff to work with
      	the new HashTranslator approach.
              (KXMLCore::HashSetTranslatorAdapter::equal): ditto
              (KXMLCore::HashSetTranslatorAdapter::translate): ditto
              (KXMLCore::::insert): ditto
              * kxmlcore/HashTraits.h:
              (KXMLCore::GenericHashTraits): This is intended be used as a base class for
      	customized traits: sensible defaults.
              (KXMLCore::): Use it a bunch
              (KXMLCore::assignDeleted): template function to allow pairs to be assigned the
      	deleted value w/o excess copies.
              (KXMLCore::PairHashTraits::emptyValue): Updated
              (KXMLCore::PairHashTraits::deletedValue): Updated
              (KXMLCore::PairHashTraits::assignDeletedValue): part of assignDeleted hack
              (KXMLCore::DeletedValueAssigner::assignDeletedValue): Use template magic
      	to either use use deletedValue or assignDeletedValue for the cases where we care.
              * kxmlcore/RefPtr.h:
              (KXMLCore::RefPtr::swap): Added swap method.
              (KXMLCore::swap): Added swap free function.
              * kjs/identifier.cpp:
              (KJS::CStringTranslator::hash): Use new HashTranslator class approach to
      	alternate type based insertion.
              (KJS::CStringTranslator::equal): ditto
              (KJS::CStringTranslator::translate): ditto
              (KJS::Identifier::add): ditto
              (KJS::UCharBufferTranslator::hash): ditto
              (KJS::UCharBufferTranslator::equal): ditto
              (KJS::UCharBufferTranslator::translate): ditto
      
      	- irrelevant change:
      
              * kjs/array_object.cpp:
              (ArrayProtoFunc::callAsFunction): Removed a stray space.
      
      WebCore:
      
              Reviewed by Darin.
      
              - update for new HashTranslator stuff
      
              * khtml/xml/dom_atomicstring.cpp:
              (DOM::CStringTranslator::hash):
              (DOM::CStringTranslator::equal):
              (DOM::CStringTranslator::translate):
              (DOM::AtomicString::equal):
              (DOM::AtomicString::add):
              (DOM::QCharBufferTranslator::hash):
              (DOM::QCharBufferTranslator::equal):
              (DOM::QCharBufferTranslator::translate):
              * khtml/xml/dom_qname.cpp:
              (DOM::QNameComponentsTranslator::hash):
              (DOM::QNameComponentsTranslator::equal):
              (DOM::QNameComponentsTranslator::translate):
              (DOM::QualifiedName::QualifiedName):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed5d76d4
  12. 13 Dec, 2005 1 commit
    • mjs's avatar
      JavaScriptCore: · c4bb2950
      mjs authored
              Reviewed by Eric.
      
      	- added a new HashCountedSet class for the common pattern of mapping items to counts that can change
      
              * kxmlcore/HashCountedSet.h: Added.
              (KXMLCore::HashCountedSet::*): Implemented, on top of HashMap.
              * kxmlcore/HashMap.h:
              (KXMLCore::HashMap::add): New method - does not replace existing value if key already present
      	but otherwise like set().
              (KXMLCore::HashMap::set): Improved comments.
              * kxmlcore/HashMapPtrSpec.h:
              (KXMLCore::HashMap::add): Added to specializations too.
              * JavaScriptCore.xcodeproj/project.pbxproj: Add new  file.
              * kxmlcore/HashFunctions.h: Added include of stdint.h
      
      	- replaced the custom hashtable for values protected from GC with HashCountedSet
      
              * kjs/collector.cpp:
              (KJS::Collector::protect): Moved code here from ProtectedValues::increaseProtectCount
      	since the code is so simple now.
              (KJS::Collector::unprotect): Ditto for ProtectedValues::decreaseProtectCount.
              (KJS::Collector::markProtectedObjects): Updated for new way of doing things, now
      	simpler and safer.
              (KJS::Collector::numReferencedObjects): ditto
              (KJS::Collector::rootObjectClasses): ditto
              * kjs/collector.h: Added protect and unprotect static methods
              * kjs/protect.h:
              (KJS::gcProtect): Updated for removal of ProtectedValues class
              (KJS::gcUnprotect): likewise
              * kjs/protected_values.cpp: Removed.
              * kjs/protected_values.h: Removed.
      
      WebCore:
      
              Reviewed by Eric.
      
              - updated for new HashCountedSet class
      
              * ForwardingHeaders/kxmlcore/HashCountedSet.h: Added forwarding header.
              * khtml/ecma/kjs_binding.cpp: Moved #define to disable pointer specialization higher
      	in the file.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4bb2950
  13. 28 Sep, 2005 1 commit
    • mjs's avatar
      JavaScriptCore: · f025068f
      mjs authored
              Reviewed by Eric.
      
      	- move HashMap/HashSet code down to JavaScriptCore
      	http://bugzilla.opendarwin.org/show_bug.cgi?id=5161
      
              * 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.
      
      	- move HashMap/HashSet code down to JavaScriptCore; adapt usage to the new header location
      	http://bugzilla.opendarwin.org/show_bug.cgi?id=5161
      
              * 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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f025068f