• fpizlo@apple.com's avatar
    Copied space should be able to handle more than one copied backing store per JSCell · 05937580
    fpizlo@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=119471
    
    Reviewed by Mark Hahnenberg.
            
    This allows a cell to call copyLater() multiple times for multiple different
    backing stores, and then have copyBackingStore() called exactly once for each
    of those. A token tells it which backing store to copy. All backing stores
    must be named using the CopyToken, an enumeration which currently cannot
    exceed eight entries.
            
    When copyBackingStore() is called, it's up to the callee to (a) use the token
    to decide what to copy and (b) call its base class's copyBackingStore() in
    case the base class had something that needed copying. The only exception is
    that JSCell never asks anything to be copied, and so if your base is JSCell
    then you don't have to do anything.
    
    * GNUmakefile.list.am:
    * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * heap/CopiedBlock.h:
    * heap/CopiedBlockInlines.h:
    (JSC::CopiedBlock::reportLiveBytes):
    * heap/CopyToken.h: Added.
    * heap/CopyVisitor.cpp:
    (JSC::CopyVisitor::copyFromShared):
    * heap/CopyVisitor.h:
    * heap/CopyVisitorInlines.h:
    (JSC::CopyVisitor::visitItem):
    * heap/CopyWorkList.h:
    (JSC::CopyWorklistItem::CopyWorklistItem):
    (JSC::CopyWorklistItem::cell):
    (JSC::CopyWorklistItem::token):
    (JSC::CopyWorkListSegment::get):
    (JSC::CopyWorkListSegment::append):
    (JSC::CopyWorkListSegment::data):
    (JSC::CopyWorkListIterator::get):
    (JSC::CopyWorkListIterator::operator*):
    (JSC::CopyWorkListIterator::operator->):
    (JSC::CopyWorkList::append):
    * heap/SlotVisitor.h:
    * heap/SlotVisitorInlines.h:
    (JSC::SlotVisitor::copyLater):
    * runtime/ClassInfo.h:
    * runtime/JSCell.cpp:
    (JSC::JSCell::copyBackingStore):
    * runtime/JSCell.h:
    * runtime/JSObject.cpp:
    (JSC::JSObject::visitButterfly):
    (JSC::JSObject::copyBackingStore):
    * runtime/JSObject.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    05937580
JavaScriptCore.vcxproj 51.5 KB