CodeBlock: Size m_exceptionHandlers to fit from creation.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 23:09:48 +0000 (23:09 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 23:09:48 +0000 (23:09 +0000)
commitb278ac3bd6861f4bf63f42f8cf7e7d33a72860b6
tree7c1fa98d0918889e182fe503f66c66c7ee685947
parent630a69bdfe143859ad4d9376a2831390e84b166d
CodeBlock: Size m_exceptionHandlers to fit from creation.
<https://webkit.org/b/127234>

Avoid allocation churn for CodeBlock::m_exceptionHandlers.

Reviewed by Anders Carlsson.

* bytecode/CodeBlock.h:

    Removed unused CodeBlock::allocateHandlers() function.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):

    Use resizeToFit() instead of grow() for m_exceptionHandlers
    since we know it's never going to change size.

(JSC::CodeBlock::shrinkToFit):

    No need to shrink m_exceptionHandlers here since it's already
    the perfect size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/CodeBlock.h