Title: [185409] trunk/Source/_javascript_Core
Revision
185409
Author
[email protected]
Date
2015-06-10 03:15:12 -0700 (Wed, 10 Jun 2015)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (185408 => 185409)


--- trunk/Source/_javascript_Core/ChangeLog	2015-06-10 08:54:33 UTC (rev 185408)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-06-10 10:15:12 UTC (rev 185409)
@@ -1,3 +1,18 @@
+2015-06-10  Andreas Kling  <[email protected]>
+
+        [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):
+
 2015-06-09  Chris Dumez  <[email protected]>
 
         Allow one sync GC per gcTimer interval on critical memory pressure warning

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (185408 => 185409)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2015-06-10 08:54:33 UTC (rev 185408)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2015-06-10 10:15:12 UTC (rev 185409)
@@ -4032,7 +4032,7 @@
         } else
             m_inlineCallFrame->isClosureCall = true;
         m_inlineCallFrame->caller = byteCodeParser->currentCodeOrigin();
-        m_inlineCallFrame->arguments.resize(argumentCountIncludingThis); // Set the number of arguments including this, but don't configure the value recoveries, yet.
+        m_inlineCallFrame->arguments.resizeToFit(argumentCountIncludingThis); // Set the number of arguments including this, but don't configure the value recoveries, yet.
         m_inlineCallFrame->kind = kind;
         
         byteCodeParser->buildOperandMapsIfNecessary();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to