Title: [233620] trunk/Source/_javascript_Core
Revision
233620
Author
[email protected]
Date
2018-07-07 13:29:01 -0700 (Sat, 07 Jul 2018)

Log Message

[JSC] Optimize layout of ValueProfile to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187439

Reviewed by Mark Lam.

Reduce the size of ValueProfile from 40 to 32 by reordering members.

* bytecode/ValueProfile.h:
(JSC::ValueProfileBase::ValueProfileBase):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (233619 => 233620)


--- trunk/Source/_javascript_Core/ChangeLog	2018-07-07 18:40:33 UTC (rev 233619)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-07-07 20:29:01 UTC (rev 233620)
@@ -1,3 +1,15 @@
+2018-07-07  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Optimize layout of ValueProfile to reduce padding
+        https://bugs.webkit.org/show_bug.cgi?id=187439
+
+        Reviewed by Mark Lam.
+
+        Reduce the size of ValueProfile from 40 to 32 by reordering members.
+
+        * bytecode/ValueProfile.h:
+        (JSC::ValueProfileBase::ValueProfileBase):
+
 2018-07-05  Saam Barati  <[email protected]>
 
         ProgramExecutable may be collected as we checkSyntax on it

Modified: trunk/Source/_javascript_Core/bytecode/ValueProfile.h (233619 => 233620)


--- trunk/Source/_javascript_Core/bytecode/ValueProfile.h	2018-07-07 18:40:33 UTC (rev 233619)
+++ trunk/Source/_javascript_Core/bytecode/ValueProfile.h	2018-07-07 20:29:01 UTC (rev 233620)
@@ -45,8 +45,6 @@
     
     ValueProfileBase()
         : m_bytecodeOffset(-1)
-        , m_prediction(SpecNone)
-        , m_numberOfSamplesInPrediction(0)
     {
         for (unsigned i = 0; i < totalNumberOfBuckets; ++i)
             m_buckets[i] = JSValue::encode(JSValue());
@@ -54,8 +52,6 @@
     
     ValueProfileBase(int bytecodeOffset)
         : m_bytecodeOffset(bytecodeOffset)
-        , m_prediction(SpecNone)
-        , m_numberOfSamplesInPrediction(0)
     {
         for (unsigned i = 0; i < totalNumberOfBuckets; ++i)
             m_buckets[i] = JSValue::encode(JSValue());
@@ -147,9 +143,9 @@
     }
     
     int m_bytecodeOffset; // -1 for prologue
+    unsigned m_numberOfSamplesInPrediction { 0 };
     
-    SpeculatedType m_prediction;
-    unsigned m_numberOfSamplesInPrediction;
+    SpeculatedType m_prediction { SpecNone };
     
     EncodedJSValue m_buckets[totalNumberOfBuckets];
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to