Ignore:
Timestamp:
Jul 25, 2012, 6:22:59 PM (13 years ago)
Author:
[email protected]
Message:

JSC GC object copying APIs should allow for greater flexibility
https://bugs.webkit.org/show_bug.cgi?id=92316

Reviewed by Mark Hahnenberg.

It's now the case that visitChildren() methods can directly pin and allocate in new space during copying.
They can also do the copying and marking themselves. This new API is only used for JSObjects for now.

(JSC::SlotVisitor::allocateNewSpaceSlow):
(JSC::SlotVisitor::allocateNewSpaceOrPin):
(JSC):
(JSC::SlotVisitor::copyAndAppend):

  • heap/MarkStack.h:

(MarkStack):
(JSC::MarkStack::appendUnbarrieredValue):
(JSC):

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlineMethods.h: Added.

(JSC):
(JSC::SlotVisitor::checkIfShouldCopyAndPinOtherwise):
(JSC::SlotVisitor::allocateNewSpace):

  • runtime/JSObject.cpp:

(JSC::JSObject::visitOutOfLineStorage):
(JSC):
(JSC::JSObject::visitChildren):
(JSC::JSFinalObject::visitChildren):

  • runtime/JSObject.h:

(JSObject):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/MarkStack.h

    r121806 r123690  
    254254        template<typename T>
    255255        void appendUnbarrieredPointer(T**);
     256        void appendUnbarrieredValue(JSValue*);
    256257       
    257258        void addOpaqueRoot(void*);
     
    454455    }
    455456
     457    ALWAYS_INLINE void MarkStack::appendUnbarrieredValue(JSValue* slot)
     458    {
     459        ASSERT(slot);
     460        internalAppend(*slot);
     461    }
     462
    456463    ALWAYS_INLINE void MarkStack::append(JSCell** slot)
    457464    {
Note: See TracChangeset for help on using the changeset viewer.