DFG::Worklist can be shrunk by 16 bytes
authorrmorisset@apple.com <rmorisset@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2019 16:41:50 +0000 (16:41 +0000)
committerrmorisset@apple.com <rmorisset@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2019 16:41:50 +0000 (16:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195490

Reviewed by Darin Adler.

* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::Worklist):
* dfg/DFGWorklist.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGWorklist.cpp
Source/JavaScriptCore/dfg/DFGWorklist.h

index 3c70c37..71b2021 100644 (file)
@@ -1,3 +1,14 @@
+2019-03-14  Robin Morisset  <rmorisset@apple.com>
+
+        DFG::Worklist can be shrunk by 16 bytes
+        https://bugs.webkit.org/show_bug.cgi?id=195490
+
+        Reviewed by Darin Adler.
+
+        * dfg/DFGWorklist.cpp:
+        (JSC::DFG::Worklist::Worklist):
+        * dfg/DFGWorklist.h:
+
 2019-03-14  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Audit: provide a way to get the contents of resources
index d48b86b..e6c2221 100644 (file)
@@ -185,9 +185,8 @@ static CString createWorklistName(CString&& tierName)
 
 Worklist::Worklist(CString&& tierName)
     : m_threadName(createWorklistName(WTFMove(tierName)))
-    , m_lock(Box<Lock>::create())
     , m_planEnqueued(AutomaticThreadCondition::create())
-    , m_numberOfActiveThreads(0)
+    , m_lock(Box<Lock>::create())
 {
 }
 
index 396ebb8..82473a7 100644 (file)
@@ -96,7 +96,9 @@ private:
 
     void dump(const AbstractLocker&, PrintStream&) const;
     
+    unsigned m_numberOfActiveThreads { 0 };
     CString m_threadName;
+    Vector<std::unique_ptr<ThreadData>> m_threads;
     
     // Used to inform the thread about what work there is left to do.
     Deque<RefPtr<Plan>> m_queue;
@@ -111,15 +113,11 @@ private:
     // Used to quickly find which plans have been compiled and are ready to
     // be completed.
     Vector<RefPtr<Plan>, 16> m_readyPlans;
+    Ref<AutomaticThreadCondition> m_planEnqueued;
+    Condition m_planCompiled;
 
     Lock m_suspensionLock;
-    
     Box<Lock> m_lock;
-    Ref<AutomaticThreadCondition> m_planEnqueued;
-    Condition m_planCompiled;
-    
-    Vector<std::unique_ptr<ThreadData>> m_threads;
-    unsigned m_numberOfActiveThreads;
 };
 
 JS_EXPORT_PRIVATE unsigned setNumberOfDFGCompilerThreads(unsigned);