Title: [153006] branches/safari-537-branch/Source

Diff

Modified: branches/safari-537-branch/Source/_javascript_Core/ChangeLog (153005 => 153006)


--- branches/safari-537-branch/Source/_javascript_Core/ChangeLog	2013-07-22 22:23:14 UTC (rev 153005)
+++ branches/safari-537-branch/Source/_javascript_Core/ChangeLog	2013-07-22 22:26:31 UTC (rev 153006)
@@ -1,5 +1,25 @@
 2013-07-22  Lucas Forschler  <[email protected]>
 
+        Merge r152848
+
+    2013-07-18  Andreas Kling  <[email protected]>
+
+            CodeBlock::m_argumentValueProfiles wastes a lot of memory.
+            <http://webkit.org/b/118852>
+            <rdar://problem/14481659>
+
+            Reviewed by Anders Carlsson.
+
+            Use Vector::resizeToFit() for CodeBlock::m_argumentValueProfiles. We don't need any padding
+            for growth, since we won't be appending to it anyway.
+
+            921 KB progression on <http://twitter.com/awesomekling>
+
+            * bytecode/CodeBlock.cpp:
+            (JSC::CodeBlock::setNumParameters):
+
+2013-07-22  Lucas Forschler  <[email protected]>
+
         Merge r152737
 
     2013-07-16  Mark Hahnenberg  <[email protected]>

Modified: branches/safari-537-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp (153005 => 153006)


--- branches/safari-537-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp	2013-07-22 22:23:14 UTC (rev 153005)
+++ branches/safari-537-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp	2013-07-22 22:26:31 UTC (rev 153006)
@@ -2018,7 +2018,7 @@
     m_numParameters = newValue;
 
 #if ENABLE(VALUE_PROFILER)
-    m_argumentValueProfiles.resize(newValue);
+    m_argumentValueProfiles.resizeToFit(newValue);
 #endif
 }
 
@@ -2501,8 +2501,6 @@
     m_callLinkInfos.shrinkToFit();
 #endif
 #if ENABLE(VALUE_PROFILER)
-    if (shrinkMode == EarlyShrink)
-        m_argumentValueProfiles.shrinkToFit();
     m_rareCaseProfiles.shrinkToFit();
     m_specialFastCaseProfiles.shrinkToFit();
 #endif

Modified: branches/safari-537-branch/Source/WTF/ChangeLog (153005 => 153006)


--- branches/safari-537-branch/Source/WTF/ChangeLog	2013-07-22 22:23:14 UTC (rev 153005)
+++ branches/safari-537-branch/Source/WTF/ChangeLog	2013-07-22 22:26:31 UTC (rev 153006)
@@ -1,3 +1,20 @@
+2013-07-22  Lucas Forschler  <[email protected]>
+
+        Merge r152848
+
+    2013-07-18  Andreas Kling  <[email protected]>
+
+            CodeBlock::m_argumentValueProfiles wastes a lot of memory.
+            <http://webkit.org/b/118852>
+            <rdar://problem/14481659>
+
+            Reviewed by Anders Carlsson.
+
+            Add Vector::resizeToFit(size), like resize() but without growth padding.
+
+            * wtf/Vector.h:
+            (WTF::::resizeToFit):
+
 2013-07-10  Lucas Forschler  <[email protected]>
 
         Merge r152429

Modified: branches/safari-537-branch/Source/WTF/wtf/Vector.h (153005 => 153006)


--- branches/safari-537-branch/Source/WTF/wtf/Vector.h	2013-07-22 22:23:14 UTC (rev 153005)
+++ branches/safari-537-branch/Source/WTF/wtf/Vector.h	2013-07-22 22:26:31 UTC (rev 153006)
@@ -608,6 +608,7 @@
         void shrink(size_t size);
         void grow(size_t size);
         void resize(size_t size);
+        void resizeToFit(size_t size);
         void reserveCapacity(size_t newCapacity);
         bool tryReserveCapacity(size_t newCapacity);
         void reserveInitialCapacity(size_t initialCapacity);
@@ -897,6 +898,13 @@
     }
 
     template<typename T, size_t inlineCapacity, typename OverflowHandler>
+    void Vector<T, inlineCapacity, OverflowHandler>::resizeToFit(size_t size)
+    {
+        reserveCapacity(size);
+        resize(size);
+    }
+
+    template<typename T, size_t inlineCapacity, typename OverflowHandler>
     void Vector<T, inlineCapacity, OverflowHandler>::shrink(size_t size)
     {
         ASSERT(size <= m_size);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to