• mjs's avatar
    JavaScriptCore: · cff5e5ee
    mjs authored
            Reviewed by John.
    
    	- replace dlmalloc with tcmalloc
    	http://bugzilla.opendarwin.org/show_bug.cgi?id=5145
    
    	I also moved SharedPtr and the assertion code from WebCore into a
    	new kxmlcore directory.
    
            * JavaScriptCore.xcodeproj/project.pbxproj:
            * kjs/collector.cpp:
            (KJS::Collector::allocate):
            (KJS::Collector::collect):
            * kjs/config.h:
            * kjs/fast_malloc.cpp: Removed.
            * kjs/fast_malloc.h: Removed.
            * kjs/function.cpp:
            * kjs/function.h:
            * kjs/function_object.cpp:
            * kjs/identifier.cpp:
            (KJS::Identifier::add):
            * kjs/internal.cpp:
            * kjs/internal.h:
            * kjs/nodes.h:
            * kjs/nodes2string.cpp:
            * kjs/property_map.cpp:
            (KJS::PropertyMap::~PropertyMap):
            (KJS::PropertyMap::rehash):
            * kjs/scope_chain.h:
            * kjs/shared_ptr.h: Removed.
            * kjs/string_object.cpp:
            (StringObjectFuncImp::callAsFunction):
            * kjs/ustring.cpp:
            (KJS::UString::Rep::createCopying):
            (KJS::UString::Rep::destroy):
            (KJS::UString::expandCapacity):
            (KJS::UString::expandPreCapacity):
            (KJS::UString::UString):
            (KJS::UString::spliceSubstringsWithSeparators):
            (KJS::UString::append):
            (KJS::UString::operator=):
            (KJS::UString::detach):
            * kjs/ustring.h:
            * kxmlcore/Assertions.h: Added.
            * kxmlcore/Assertions.mm: Added.
            * kxmlcore/FastMalloc.cpp: Added.
            (KXMLCore::LgFloor):
            (KXMLCore::SizeClass):
            (KXMLCore::ByteSizeForClass):
            (KXMLCore::InitSizeClasses):
            (KXMLCore::MetaDataAlloc):
            (KXMLCore::PageHeapAllocator::Init):
            (KXMLCore::PageHeapAllocator::New):
            (KXMLCore::PageHeapAllocator::Delete):
            (KXMLCore::PageHeapAllocator::inuse):
            (KXMLCore::pages):
            (KXMLCore::AllocationSize):
            (KXMLCore::Event):
            (KXMLCore::NewSpan):
            (KXMLCore::DeleteSpan):
            (KXMLCore::DLL_Init):
            (KXMLCore::DLL_Remove):
            (KXMLCore::DLL_IsEmpty):
            (KXMLCore::DLL_Length):
            (KXMLCore::DLL_Print):
            (KXMLCore::DLL_Prepend):
            (KXMLCore::DLL_InsertOrdered):
            (KXMLCore::):
            (KXMLCore::TCMalloc_PageHeap::GetDescriptor):
            (KXMLCore::TCMalloc_PageHeap::SystemBytes):
            (KXMLCore::TCMalloc_PageHeap::FreeBytes):
            (KXMLCore::TCMalloc_PageHeap::RecordSpan):
            (KXMLCore::TCMalloc_PageHeap::TCMalloc_PageHeap):
            (KXMLCore::TCMalloc_PageHeap::New):
            (KXMLCore::TCMalloc_PageHeap::Split):
            (KXMLCore::TCMalloc_PageHeap::Carve):
            (KXMLCore::TCMalloc_PageHeap::Delete):
            (KXMLCore::TCMalloc_PageHeap::RegisterSizeClass):
            (KXMLCore::TCMalloc_PageHeap::Dump):
            (KXMLCore::TCMalloc_PageHeap::GrowHeap):
            (KXMLCore::TCMalloc_PageHeap::Check):
            (KXMLCore::TCMalloc_PageHeap::CheckList):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::Init):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::length):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::empty):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::lowwatermark):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::clear_lowwatermark):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::Push):
            (KXMLCore::TCMalloc_ThreadCache_FreeList::Pop):
            (KXMLCore::TCMalloc_ThreadCache::freelist_length):
            (KXMLCore::TCMalloc_ThreadCache::Size):
            (KXMLCore::TCMalloc_Central_FreeList::length):
            (KXMLCore::TCMalloc_Central_FreeList::Init):
            (KXMLCore::TCMalloc_Central_FreeList::Insert):
            (KXMLCore::TCMalloc_Central_FreeList::Remove):
            (KXMLCore::TCMalloc_Central_FreeList::Populate):
            (KXMLCore::TCMalloc_ThreadCache::SampleAllocation):
            (KXMLCore::TCMalloc_ThreadCache::Init):
            (KXMLCore::TCMalloc_ThreadCache::Cleanup):
            (KXMLCore::TCMalloc_ThreadCache::Allocate):
            (KXMLCore::TCMalloc_ThreadCache::Deallocate):
            (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache):
            (KXMLCore::TCMalloc_ThreadCache::ReleaseToCentralCache):
            (KXMLCore::TCMalloc_ThreadCache::Scavenge):
            (KXMLCore::TCMalloc_ThreadCache::GetCache):
            (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent):
            (KXMLCore::TCMalloc_ThreadCache::PickNextSample):
            (KXMLCore::TCMalloc_ThreadCache::InitModule):
            (KXMLCore::TCMalloc_ThreadCache::InitTSD):
            (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary):
            (KXMLCore::TCMalloc_ThreadCache::DeleteCache):
            (KXMLCore::TCMalloc_ThreadCache::RecomputeThreadCacheSize):
            (KXMLCore::TCMalloc_ThreadCache::Print):
            (KXMLCore::ExtractStats):
            (KXMLCore::DumpStats):
            (KXMLCore::PrintStats):
            (KXMLCore::DumpStackTraces):
            (KXMLCore::TCMallocImplementation::GetStats):
            (KXMLCore::TCMallocImplementation::ReadStackTraces):
            (KXMLCore::TCMallocImplementation::GetNumericProperty):
            (KXMLCore::TCMallocImplementation::SetNumericProperty):
            (KXMLCore::DoSampledAllocation):
            (KXMLCore::do_malloc):
            (KXMLCore::do_free):
            (KXMLCore::do_memalign):
            (KXMLCore::TCMallocGuard::TCMallocGuard):
            (KXMLCore::TCMallocGuard::~TCMallocGuard):
            (KXMLCore::malloc):
            (KXMLCore::free):
            (KXMLCore::calloc):
            (KXMLCore::cfree):
            (KXMLCore::realloc):
            (KXMLCore::memalign):
            (KXMLCore::posix_memalign):
            (KXMLCore::valloc):
            (KXMLCore::pvalloc):
            (KXMLCore::malloc_stats):
            (KXMLCore::mallopt):
            (KXMLCore::mallinfo):
            * kxmlcore/FastMalloc.h: Added.
            (KXMLCore::FastAllocated::operator new):
            (KXMLCore::FastAllocated::operator delete):
            (KXMLCore::FastAllocated::operator new[]):
            (KXMLCore::FastAllocated::operator delete[]):
            * kxmlcore/SharedPtr.h: Added.
            (KXMLCore::SharedPtr::SharedPtr):
            (KXMLCore::SharedPtr::~SharedPtr):
            (KXMLCore::SharedPtr::isNull):
            (KXMLCore::SharedPtr::notNull):
            (KXMLCore::SharedPtr::reset):
            (KXMLCore::SharedPtr::get):
            (KXMLCore::SharedPtr::operator*):
            (KXMLCore::SharedPtr::operator->):
            (KXMLCore::SharedPtr::operator!):
            (KXMLCore::SharedPtr::operator bool):
            (KXMLCore::::operator):
            (KXMLCore::operator==):
            (KXMLCore::operator!=):
            (KXMLCore::static_pointer_cast):
            (KXMLCore::const_pointer_cast):
            * kxmlcore/TCPageMap.h: Added.
            (TCMalloc_PageMap1::TCMalloc_PageMap1):
            (TCMalloc_PageMap1::Ensure):
            (TCMalloc_PageMap1::get):
            (TCMalloc_PageMap1::set):
            (TCMalloc_PageMap2::TCMalloc_PageMap2):
            (TCMalloc_PageMap2::get):
            (TCMalloc_PageMap2::set):
            (TCMalloc_PageMap2::Ensure):
            (TCMalloc_PageMap3::NewNode):
            (TCMalloc_PageMap3::TCMalloc_PageMap3):
            (TCMalloc_PageMap3::get):
            (TCMalloc_PageMap3::set):
            (TCMalloc_PageMap3::Ensure):
            * kxmlcore/TCSpinLock.h: Added.
            (TCMalloc_SpinLock::Init):
            (TCMalloc_SpinLock::Finalize):
            (TCMalloc_SpinLock::Lock):
            (TCMalloc_SpinLock::Unlock):
            (TCMalloc_SlowLock):
            (TCMalloc_SpinLockHolder::TCMalloc_SpinLockHolder):
            (TCMalloc_SpinLockHolder::~TCMalloc_SpinLockHolder):
            * kxmlcore/TCSystemAlloc.cpp: Added.
            (TrySbrk):
            (TryMmap):
            (TryDevMem):
            (TCMalloc_SystemAlloc):
            * kxmlcore/TCSystemAlloc.h: Added.
    
    WebCore:
    
            Reviewed by John.
    
    	- replace dlmalloc with tcmalloc
    	http://bugzilla.opendarwin.org/show_bug.cgi?id=5145
    
    	I also moved SharedPtr and the assertion code from WebCore into a
    	new kxmlcore directory.
    
            * ForwardingHeaders/kjs/shared_ptr.h: Removed.
            * ForwardingHeaders/kxmlcore/Assertions.h: Added.
            * ForwardingHeaders/kxmlcore/FastMalloc.h: Added.
            * ForwardingHeaders/kxmlcore/SharedPtr.h: Added.
            * ForwardingHeaders/misc/main_thread_malloc.h: Removed.
            * WebCore.xcodeproj/project.pbxproj:
            * khtml/css/css_base.h:
            * khtml/css/css_computedstyle.cpp:
            * khtml/css/css_ruleimpl.h:
            * khtml/css/css_valueimpl.h:
            * khtml/css/cssstyleselector.h:
            * khtml/ecma/domparser.h:
            * khtml/ecma/kjs_css.h:
            * khtml/ecma/kjs_dom.cpp:
            * khtml/ecma/kjs_dom.h:
            * khtml/ecma/kjs_events.h:
            * khtml/ecma/kjs_html.cpp:
            * khtml/ecma/kjs_html.h:
            * khtml/ecma/kjs_range.h:
            * khtml/ecma/kjs_traversal.h:
            * khtml/ecma/kjs_views.cpp:
            * khtml/ecma/kjs_views.h:
            * khtml/ecma/kjs_window.cpp:
            * khtml/ecma/xmlhttprequest.h:
            * khtml/editing/SelectionController.cpp:
            * khtml/editing/append_node_command.cpp:
            * khtml/editing/apply_style_command.cpp:
            * khtml/editing/break_blockquote_command.cpp:
            * khtml/editing/composite_edit_command.cpp:
            * khtml/editing/delete_from_text_node_command.cpp:
            * khtml/editing/delete_selection_command.cpp:
            * khtml/editing/edit_command.cpp:
            * khtml/editing/htmlediting.cpp:
            * khtml/editing/insert_into_text_node_command.cpp:
            * khtml/editing/insert_line_break_command.cpp:
            * khtml/editing/insert_node_before_command.cpp:
            * khtml/editing/insert_paragraph_separator_command.cpp:
            * khtml/editing/insert_text_command.cpp:
            * khtml/editing/join_text_nodes_command.cpp:
            * khtml/editing/markup.cpp:
            * khtml/editing/merge_identical_elements_command.cpp:
            * khtml/editing/move_selection_command.cpp:
            * khtml/editing/rebalance_whitespace_command.cpp:
            * khtml/editing/remove_css_property_command.cpp:
            * khtml/editing/remove_node_attribute_command.cpp:
            * khtml/editing/remove_node_command.cpp:
            * khtml/editing/remove_node_preserving_children_command.cpp:
            * khtml/editing/replace_selection_command.cpp:
            * khtml/editing/set_node_attribute_command.cpp:
            * khtml/editing/split_element_command.cpp:
            * khtml/editing/split_text_node_command.cpp:
            * khtml/editing/split_text_node_containing_element.cpp:
            * khtml/editing/typing_command.cpp:
            * khtml/editing/visible_position.cpp:
            * khtml/editing/visible_position.h:
            * khtml/editing/wrap_contents_in_dummy_span_command.cpp:
            * khtml/html/html_imageimpl.h:
            * khtml/html/html_tableimpl.h:
            * khtml/html/htmlparser.cpp:
            * khtml/khtmlpart_p.h:
            * khtml/misc/arena.cpp:
            (ArenaAllocate):
            (FreeArenaList):
            (ArenaFinish):
            * khtml/misc/hashtable.h:
            (khtml::HashTable::~HashTable):
            (khtml::::allocateTable):
            (khtml::::rehash):
            (khtml::::clear):
            (khtml::::HashTable):
            * khtml/misc/loader.cpp:
            * khtml/misc/main_thread_malloc.cpp: Removed.
            * khtml/misc/main_thread_malloc.h: Removed.
            * khtml/misc/shared.h:
            * khtml/rendering/render_style.h:
            * khtml/xml/dom2_eventsimpl.h:
            * khtml/xml/dom2_rangeimpl.h:
            * khtml/xml/dom2_traversalimpl.h:
            * khtml/xml/dom2_viewsimpl.h:
            * khtml/xml/dom_docimpl.h:
            * khtml/xml/dom_elementimpl.cpp:
            (NamedAttrMapImpl::clearAttributes):
            (NamedAttrMapImpl::operator=):
            (NamedAttrMapImpl::addAttribute):
            (NamedAttrMapImpl::removeAttribute):
            * khtml/xml/dom_elementimpl.h:
            * khtml/xml/dom_nodeimpl.cpp:
            * khtml/xml/dom_nodeimpl.h:
            * khtml/xml/dom_position.cpp:
            * khtml/xml/dom_stringimpl.h:
            * kwq/DOM-CSS.mm:
            * kwq/DOM.mm:
            * kwq/DOMEvents.mm:
            * kwq/DOMHTML.mm:
            * kwq/DOMInternal.mm:
            * kwq/DOMViews.mm:
            * kwq/KWQAccObject.mm:
            * kwq/KWQAccObjectCache.mm:
            * kwq/KWQArrayImpl.h:
            * kwq/KWQArrayImpl.mm:
            (KWQArrayImpl::KWQArrayPrivate::KWQArrayPrivate):
            (KWQArrayImpl::KWQArrayPrivate::~KWQArrayPrivate):
            (KWQArrayImpl::resize):
            * kwq/KWQAssertions.h: Removed.
            * kwq/KWQAssertions.m: Removed.
            * kwq/KWQButton.mm:
            * kwq/KWQCString.mm:
            * kwq/KWQClipboard.h:
            * kwq/KWQClipboard.mm:
            * kwq/KWQColor.mm:
            * kwq/KWQComboBox.mm:
            * kwq/KWQEditCommand.mm:
            * kwq/KWQExceptions.h:
            * kwq/KWQFileButton.mm:
            * kwq/KWQFontFamily.h:
            * kwq/KWQFormData.mm:
            * kwq/KWQKHTMLPart.h:
            * kwq/KWQKHTMLPart.mm:
            * kwq/KWQKPartsBrowserInterface.mm:
            * kwq/KWQKURL.mm:
            * kwq/KWQListBox.mm:
            * kwq/KWQListImpl.mm:
            * kwq/KWQLogging.h:
            * kwq/KWQLogging.m:
            * kwq/KWQMapImpl.h:
            * kwq/KWQMapImpl.mm:
            * kwq/KWQObject.mm:
            * kwq/KWQPageState.mm:
            * kwq/KWQPainter.mm:
            * kwq/KWQResourceLoader.mm:
            * kwq/KWQSignal.mm:
            * kwq/KWQSlot.mm:
            * kwq/KWQString.h:
            * kwq/KWQString.mm:
            (ALLOC_QCHAR):
            (QString::setBufferFromCFString):
            (allocatePageNode):
            * kwq/KWQTextArea.mm:
            * kwq/KWQTextCodec.mm:
            * kwq/KWQTextEdit.mm:
            * kwq/KWQTextField.mm:
            * kwq/KWQTimer.mm:
            * kwq/KWQValueListImpl.h:
            * kwq/KWQValueListImpl.mm:
            * kwq/WebCoreBridge.mm:
            * kwq/WebCoreCookieAdapter.m:
            * kwq/WebCoreGraphicsBridge.m:
            * kwq/WebCoreImageRendererFactory.m:
            * kwq/WebCoreKeyGenerator.m:
            * kwq/WebCoreTextRendererFactory.mm:
            * kwq/WebCoreViewFactory.m:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cff5e5ee
delete_selection_command.cpp 33.4 KB