Make all jit & non-jit combos build cleanly
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2013 20:22:45 +0000 (20:22 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2013 20:22:45 +0000 (20:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=119102

Reviewed by Anders Carlsson.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::counterValueForOptimizeSoon):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::numberOfDFGCompiles):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/CodeBlock.h

index 9e1adf1..97c7e4b 100644 (file)
@@ -1,5 +1,18 @@
 2013-07-25  Oliver Hunt  <oliver@apple.com>
 
+        Make all jit & non-jit combos build cleanly
+        https://bugs.webkit.org/show_bug.cgi?id=119102
+
+        Reviewed by Anders Carlsson.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::counterValueForOptimizeSoon):
+        * bytecode/CodeBlock.h:
+        (JSC::CodeBlock::optimizeAfterWarmUp):
+        (JSC::CodeBlock::numberOfDFGCompiles):
+
+2013-07-25  Oliver Hunt  <oliver@apple.com>
+
         32 bit portion of load validation logic
         https://bugs.webkit.org/show_bug.cgi?id=118878
 
index c184c8b..15d382a 100644 (file)
@@ -3013,7 +3013,6 @@ int32_t CodeBlock::counterValueForOptimizeSoon()
         optimizationThresholdScalingFactor() *
         (1 << reoptimizationRetryCounter()));
 }
-#endif
 
 bool CodeBlock::checkIfOptimizationThresholdReached()
 {
@@ -3108,6 +3107,8 @@ void CodeBlock::setOptimizationThresholdBasedOnCompilationResult(CompilationResu
     }
 }
 
+#endif
+    
 static bool structureStubInfoLessThan(const StructureStubInfo& a, const StructureStubInfo& b)
 {
     return a.callReturnLocation.executableAddress() < b.callReturnLocation.executableAddress();
index 42f28f4..3924629 100644 (file)
@@ -792,7 +792,7 @@ public:
     // to avoid thrashing.
     unsigned reoptimizationRetryCounter() const;
     void countReoptimization();
-    
+#if ENABLE(JIT)
     unsigned numberOfDFGCompiles();
 
     int32_t codeTypeThresholdMultiplier() const;
@@ -875,12 +875,14 @@ public:
 
     static ptrdiff_t offsetOfOSRExitCounter() { return OBJECT_OFFSETOF(CodeBlock, m_osrExitCounter); }
 
-#if ENABLE(JIT)
     uint32_t adjustedExitCountThreshold(uint32_t desiredThreshold);
     uint32_t exitCountThresholdForReoptimization();
     uint32_t exitCountThresholdForReoptimizationFromLoop();
     bool shouldReoptimizeNow();
     bool shouldReoptimizeFromLoopNow();
+#else // No JIT
+    void optimizeAfterWarmUp() { }
+    unsigned numberOfDFGCompiles() { return 0; }
 #endif
 
 #if ENABLE(VALUE_PROFILER)