Fix build with disabled DFG/FTL
authordinfuehr@igalia.com <dinfuehr@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2018 10:33:14 +0000 (10:33 +0000)
committerdinfuehr@igalia.com <dinfuehr@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2018 10:33:14 +0000 (10:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191256

Reviewed by Yusuke Suzuki.

Fix compilation errors and warnings with both DFG and FTL
disabled at compile-time.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::getICStatusMap):
* bytecode/InByIdStatus.cpp:
(JSC::InByIdStatus::computeFor):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::hasExitSite): Deleted.
* bytecode/PutByIdStatus.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_catch):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/InByIdStatus.cpp
Source/JavaScriptCore/bytecode/PutByIdStatus.cpp
Source/JavaScriptCore/bytecode/PutByIdStatus.h
Source/JavaScriptCore/jit/JITOpcodes.cpp

index 0d73e2e..f87b751 100644 (file)
@@ -1,3 +1,24 @@
+2018-11-17  Dominik Infuehr  <dinfuehr@igalia.com>
+
+        Fix build with disabled DFG/FTL
+        https://bugs.webkit.org/show_bug.cgi?id=191256
+
+        Reviewed by Yusuke Suzuki.
+
+        Fix compilation errors and warnings with both DFG and FTL
+        disabled at compile-time.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::getICStatusMap):
+        * bytecode/InByIdStatus.cpp:
+        (JSC::InByIdStatus::computeFor):
+        * bytecode/PutByIdStatus.cpp:
+        (JSC::PutByIdStatus::computeFor):
+        (JSC::PutByIdStatus::hasExitSite): Deleted.
+        * bytecode/PutByIdStatus.h:
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_catch):
+
 2018-11-16  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Local Inspector)
index 7b7623f..05a9092 100644 (file)
@@ -1387,6 +1387,7 @@ void CodeBlock::getICStatusMap(const ConcurrentJSLocker&, ICStatusMap& result)
             result.add(callLinkInfo->codeOrigin(), ICStatus()).iterator->value.callLinkInfo = callLinkInfo;
         for (ByValInfo* byValInfo : m_byValInfos)
             result.add(CodeOrigin(byValInfo->bytecodeIndex), ICStatus()).iterator->value.byValInfo = byValInfo;
+#if ENABLE(DFG_JIT)
         if (JITCode::isOptimizingJIT(jitType())) {
             DFG::CommonData* dfgCommon = m_jitCode->dfgCommon();
             for (auto& pair : dfgCommon->recordedStatuses.calls)
@@ -1398,6 +1399,7 @@ void CodeBlock::getICStatusMap(const ConcurrentJSLocker&, ICStatusMap& result)
             for (auto& pair : dfgCommon->recordedStatuses.ins)
                 result.add(pair.first, ICStatus()).iterator->value.inStatus = pair.second.get();
         }
+#endif
     }
 #else
     UNUSED_PARAM(result);
index 25fc2b3..3460bed 100644 (file)
@@ -89,6 +89,7 @@ InByIdStatus InByIdStatus::computeFor(
             return result;
         };
         
+#if ENABLE(DFG_JIT)
         if (status.stubInfo) {
             InByIdStatus result;
             {
@@ -98,6 +99,7 @@ InByIdStatus InByIdStatus::computeFor(
             if (result.isSet())
                 return bless(result);
         }
+#endif
         
         if (status.inStatus)
             return bless(*status.inStatus);
index 6709511..ff7da8d 100644 (file)
@@ -47,13 +47,6 @@ bool PutByIdStatus::appendVariant(const PutByIdVariant& variant)
     return appendICStatusVariant(m_variants, variant);
 }
 
-#if ENABLE(DFG_JIT)
-ExitFlag PutByIdStatus::hasExitSite(CodeBlock* profiledBlock, unsigned bytecodeIndex)
-{
-    return hasBadCacheExitSite(profiledBlock, bytecodeIndex);
-}
-#endif
-
 PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, UniquedStringImpl* uid)
 {
     VM& vm = *profiledBlock->vm();
@@ -118,6 +111,8 @@ PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, ICStatusMap& m
     return result;
 #else // ENABLE(JIT)
     UNUSED_PARAM(map);
+    UNUSED_PARAM(didExit);
+    UNUSED_PARAM(callExitSiteData);
     return PutByIdStatus(NoInformation);
 #endif // ENABLE(JIT)
 }
@@ -244,7 +239,7 @@ PutByIdStatus PutByIdStatus::computeFor(CodeBlock* baselineBlock, ICStatusMap& b
 {
     CallLinkStatus::ExitSiteData callExitSiteData =
         CallLinkStatus::computeExitSiteData(baselineBlock, codeOrigin.bytecodeIndex);
-    ExitFlag didExit = hasExitSite(baselineBlock, codeOrigin.bytecodeIndex);
+    ExitFlag didExit = hasBadCacheExitSite(baselineBlock, codeOrigin.bytecodeIndex);
 
     for (ICStatusContext* context : contextStack) {
         ICStatus status = context->get(codeOrigin);
index 02869ff..4c45785 100644 (file)
@@ -125,9 +125,6 @@ public:
     void dump(PrintStream&) const;
     
 private:
-#if ENABLE(DFG_JIT)
-    static ExitFlag hasExitSite(CodeBlock*, unsigned bytecodeIndex);
-#endif
 #if ENABLE(JIT)
     static PutByIdStatus computeForStubInfo(
         const ConcurrentJSLocker&, CodeBlock*, StructureStubInfo*, UniquedStringImpl* uid,
index cd48d51..f4270be 100644 (file)
@@ -651,7 +651,6 @@ void JIT::emit_op_to_object(const Instruction* currentInstruction)
 void JIT::emit_op_catch(const Instruction* currentInstruction)
 {
     auto bytecode = currentInstruction->as<OpCatch>();
-    auto& metadata = bytecode.metadata(m_codeBlock);
 
     restoreCalleeSavesFromEntryFrameCalleeSavesBuffer(vm()->topEntryFrame);
 
@@ -679,6 +678,7 @@ void JIT::emit_op_catch(const Instruction* currentInstruction)
     // argument type proofs, storing locals to the buffer, etc
     // https://bugs.webkit.org/show_bug.cgi?id=175598
 
+    auto& metadata = bytecode.metadata(m_codeBlock);
     ValueProfileAndOperandBuffer* buffer = metadata.buffer;
     if (buffer || !shouldEmitProfiling())
         callOperation(operationTryOSREnterAtCatch, m_bytecodeOffset);