Fix compilation when MASM_PROBE (and therefore DFG) are disabled
authorguijemont@igalia.com <guijemont@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Oct 2017 23:14:12 +0000 (23:14 +0000)
committerguijemont@igalia.com <guijemont@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Oct 2017 23:14:12 +0000 (23:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178134

Reviewed by Saam Barati.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
Disable some code when building without DFG_JIT.

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

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

index e3d9aec..524fe04 100644 (file)
@@ -1,3 +1,14 @@
+2017-10-10  Guillaume Emont  <guijemont@igalia.com>
+
+        Fix compilation when MASM_PROBE (and therefore DFG) are disabled
+        https://bugs.webkit.org/show_bug.cgi?id=178134
+
+        Reviewed by Saam Barati.
+
+        * bytecode/CodeBlock.cpp:
+        * bytecode/CodeBlock.h:
+        Disable some code when building without DFG_JIT.
+
 2017-10-10  Sam Weinig  <sam@webkit.org>
 
         Replace copyKeysToVector/copyValuesToVector with copyToVector(map.keys())/copyToVector(map.values())
index 75d1c0a..428ea68 100644 (file)
@@ -2320,6 +2320,7 @@ bool CodeBlock::checkIfOptimizationThresholdReached()
     return m_jitExecuteCounter.checkIfThresholdCrossedAndSet(this);
 }
 
+#if ENABLE(DFG_JIT)
 auto CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize(DFG::OSRExitState& exitState) -> OptimizeAction
 {
     DFG::OSRExitBase& exit = exitState.exit;
@@ -2366,6 +2367,7 @@ auto CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize(DFG::OSRExitState
     baselineCodeBlock->m_jitExecuteCounter.setNewThresholdForOSRExit(exitState.activeThreshold, exitState.memoryUsageAdjustedThreshold);
     return OptimizeAction::None;
 }
+#endif
 
 void CodeBlock::optimizeNextInvocation()
 {
index decf9c7..ea9cc02 100644 (file)
 
 namespace JSC {
 
+#if ENABLE(DFG_JIT)
 namespace DFG {
 struct OSRExitState;
 } // namespace DFG
+#endif
 
 class BytecodeLivenessAnalysis;
 class CodeBlockSet;
@@ -767,7 +769,9 @@ public:
     void countOSRExit() { m_osrExitCounter++; }
 
     enum class OptimizeAction { None, ReoptimizeNow };
+#if ENABLE(DFG_JIT)
     OptimizeAction updateOSRExitCounterAndCheckIfNeedToReoptimize(DFG::OSRExitState&);
+#endif
 
     static ptrdiff_t offsetOfOSRExitCounter() { return OBJECT_OFFSETOF(CodeBlock, m_osrExitCounter); }