Changeset 185409 in webkit


Ignore:
Timestamp:
Jun 10, 2015 3:15:12 AM (9 years ago)
Author:
akling@apple.com
Message:

[JSC] InlineCallFrame::arguments should be sized-to-fit.
<https://webkit.org/b/145782>

Reviewed by Darin Adler.

I spotted this Vector<ValueRecovery> looking a bit chubby in Instruments,
with 354 kB of memory allocated on cnet.com.

Use resizeToFit() instead of resize() since we know the final size up front.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r185387 r185409  
     12015-06-10  Andreas Kling  <akling@apple.com>
     2
     3        [JSC] InlineCallFrame::arguments should be sized-to-fit.
     4        <https://webkit.org/b/145782>
     5
     6        Reviewed by Darin Adler.
     7
     8        I spotted this Vector<ValueRecovery> looking a bit chubby in Instruments,
     9        with 354 kB of memory allocated on cnet.com.
     10
     11        Use resizeToFit() instead of resize() since we know the final size up front.
     12
     13        * dfg/DFGByteCodeParser.cpp:
     14        (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
     15
    1162015-06-09  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r185240 r185409  
    40334033            m_inlineCallFrame->isClosureCall = true;
    40344034        m_inlineCallFrame->caller = byteCodeParser->currentCodeOrigin();
    4035         m_inlineCallFrame->arguments.resize(argumentCountIncludingThis); // Set the number of arguments including this, but don't configure the value recoveries, yet.
     4035        m_inlineCallFrame->arguments.resizeToFit(argumentCountIncludingThis); // Set the number of arguments including this, but don't configure the value recoveries, yet.
    40364036        m_inlineCallFrame->kind = kind;
    40374037       
Note: See TracChangeset for help on using the changeset viewer.