Unreviewed build fix after r149836.
authorch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 May 2013 22:40:44 +0000 (22:40 +0000)
committerch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 May 2013 22:40:44 +0000 (22:40 +0000)
It broke at least EFL and GTK builds. Move new static members initialization
outside the class. Those need to have a definition outside the class because
their address is used (e.g. CodeCacheMap::nonGlobalWorkingSetMaxEntries).

* runtime/CodeCache.cpp:
(JSC):
* runtime/CodeCache.h:
(CodeCacheMap):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CodeCache.cpp
Source/JavaScriptCore/runtime/CodeCache.h

index bb44a37..072e9b2 100644 (file)
@@ -1,3 +1,16 @@
+2013-05-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Unreviewed build fix after r149836.
+
+        It broke at least EFL and GTK builds. Move new static members initialization
+        outside the class. Those need to have a definition outside the class because
+        their address is used (e.g. CodeCacheMap::nonGlobalWorkingSetMaxEntries).
+
+        * runtime/CodeCache.cpp:
+        (JSC):
+        * runtime/CodeCache.h:
+        (CodeCacheMap):
+
 2013-05-08  Oliver Hunt  <oliver@apple.com>
 
         Code cache stores bogus var references for functions in eval code
index 1c7fa29..cddb75e 100644 (file)
 namespace JSC {
 
 const double CodeCacheMap::workingSetTime = 10.0;
+const int64_t CodeCacheMap::globalWorkingSetMaxBytes = 16000000;
+const size_t CodeCacheMap::globalWorkingSetMaxEntries = 2000;
+const unsigned CodeCacheMap::nonGlobalWorkingSetScale = 20;
+const int64_t CodeCacheMap::nonGlobalWorkingSetMaxBytes = CodeCacheMap::globalWorkingSetMaxBytes / CodeCacheMap::nonGlobalWorkingSetScale;
+const size_t CodeCacheMap::nonGlobalWorkingSetMaxEntries = CodeCacheMap::globalWorkingSetMaxEntries / CodeCacheMap::nonGlobalWorkingSetScale;
 
 void CodeCacheMap::pruneSlowCase()
 {
index ebaa969..986b266 100644 (file)
@@ -194,15 +194,15 @@ public:
 
     int64_t age() { return m_age; }
 
-    static const int64_t globalWorkingSetMaxBytes = 16000000;
-    static const size_t globalWorkingSetMaxEntries = 2000;
+    static const int64_t globalWorkingSetMaxBytes;
+    static const size_t globalWorkingSetMaxEntries;
 
     // We have a smaller cap for the per-codeblock CodeCache that approximates the
     // linked EvalCodeCache limits, but still allows us to keep large string based
     // evals at least partially cached.
-    static const unsigned nonGlobalWorkingSetScale = 20;
-    static const int64_t nonGlobalWorkingSetMaxBytes = globalWorkingSetMaxBytes / nonGlobalWorkingSetScale;
-    static const size_t nonGlobalWorkingSetMaxEntries = globalWorkingSetMaxEntries / nonGlobalWorkingSetScale;
+    static const unsigned nonGlobalWorkingSetScale;
+    static const int64_t nonGlobalWorkingSetMaxBytes;
+    static const size_t nonGlobalWorkingSetMaxEntries;
 
 private:
     // This constant factor biases cache capacity toward allowing a minimum