CodeBlock: Size m_function{Exprs,Decls} to fit from creation.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 23:35:34 +0000 (23:35 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Jan 2014 23:35:34 +0000 (23:35 +0000)
commitb795f31100da6d566c8bdcb668b8f49e333a5474
treeefc7b6dc0dfc880b9bc92ae38115971305d47cbb
parent83bfd69360e5c6ac150770c2abda405b1685d92b
CodeBlock: Size m_function{Exprs,Decls} to fit from creation.
<https://webkit.org/b/127238>

Reviewed by Anders Carlsson.

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

    Use resizeToFit() instead of grow() for m_functionExprs and
    m_functionDecls since we know they will never change size.

(JSC::CodeBlock::shrinkToFit):

    No need to shrink them here anymore.

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