Timestamp:
Aug 5, 2013, 12:52:43 PM (12 years ago)
Author:
[email protected]
Message:

Copied space should be able to handle more than one copied backing store per JSCell
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:
File:
1 added

Note: See TracChangeset for help on using the changeset viewer.