Templatize GC's destructor invocation for dtor type.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 22:14:20 +0000 (22:14 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 22:14:20 +0000 (22:14 +0000)
commite46e4ae18a1818198334da60c0ba67f834bc8d09
treecefffcd0897f2c553aa83a8f87e482b18eaa93ce
parenta4be0a7d1e52c5877cacd7d7079ced906098728b
Templatize GC's destructor invocation for dtor type.
<https://webkit.org/b/133231>

Get rid of a branch in callDestructor() by templatizing it for
the DestructorType. Removed JSCell::methodTableForDestruction()
since this was the only call site and it was jumping through
a bunch of unnecessary hoops.

Reviewed by Geoffrey Garen.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::callDestructor):
(JSC::MarkedBlock::specializedSweep):
* heap/MarkedBlock.h:
* runtime/JSCell.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::methodTableForDestruction): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/MarkedBlock.cpp
Source/JavaScriptCore/heap/MarkedBlock.h
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSCellInlines.h