CodeBlock: Size m_callLinkInfos and m_byValInfos to fit earlier.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Jan 2014 01:11:56 +0000 (01:11 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Jan 2014 01:11:56 +0000 (01:11 +0000)
commitb2f1ca1b6bdc08c688c4705befe5b1965d17ef86
tree0f4c1540bd982fbe86a70e60d788a71669bf20ff
parent310e77046e14ce1d6c8f8436e27daecd8364d1f9
CodeBlock: Size m_callLinkInfos and m_byValInfos to fit earlier.
<https://webkit.org/b/127239>

Reviewed by Anders Carlsson.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::setNumberOfByValInfos):
(JSC::CodeBlock::setNumberOfCallLinkInfos):

    Use resizeToFit() instead of grow() for these vectors, since
    we know the final size here.

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

    No need to shrink here anymore. We were not even shrinking
    m_byValInfo before!

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