JSC GC object copying APIs should allow for greater flexibility
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 01:22:59 +0000 (01:22 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 01:22:59 +0000 (01:22 +0000)
commitdba3024059254952b594625f01e45cda363b843e
tree7e7d25b426589a9115b0cbdddf6123056eca1e57
parentf0ef0d91b3cdc4c957f45533427fac68bf4d07ee
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.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/MarkStack.cpp:
(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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/heap/MarkStack.cpp
Source/JavaScriptCore/heap/MarkStack.h
Source/JavaScriptCore/heap/SlotVisitor.h
Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/JSObject.h