Title: [288363] trunk/Source/_javascript_Core
- Revision
- 288363
- Author
- [email protected]
- Date
- 2022-01-21 08:11:23 -0800 (Fri, 21 Jan 2022)
Log Message
Fix build when using Visual Studio 2022
https://bugs.webkit.org/show_bug.cgi?id=235440
Reviewed by Antti Koivisto.
It doesn't like having a switch with a default but no cases.
This is cleaner with if statements anyways.
Also make members const because I can.
* jit/JITCode.cpp:
(JSC::JITCode::calleeSaveRegisters const):
* jit/JITCode.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (288362 => 288363)
--- trunk/Source/_javascript_Core/ChangeLog 2022-01-21 15:08:18 UTC (rev 288362)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-01-21 16:11:23 UTC (rev 288363)
@@ -1,3 +1,18 @@
+2022-01-21 Alex Christensen <[email protected]>
+
+ Fix build when using Visual Studio 2022
+ https://bugs.webkit.org/show_bug.cgi?id=235440
+
+ Reviewed by Antti Koivisto.
+
+ It doesn't like having a switch with a default but no cases.
+ This is cleaner with if statements anyways.
+ Also make members const because I can.
+
+ * jit/JITCode.cpp:
+ (JSC::JITCode::calleeSaveRegisters const):
+ * jit/JITCode.h:
+
2022-01-21 Lauro Moura <[email protected]>
[CMake] Cannot link libTestRunnerInjectedBundle.so in non unified build
Modified: trunk/Source/_javascript_Core/jit/JITCode.cpp (288362 => 288363)
--- trunk/Source/_javascript_Core/jit/JITCode.cpp 2022-01-21 15:08:18 UTC (rev 288362)
+++ trunk/Source/_javascript_Core/jit/JITCode.cpp 2022-01-21 16:11:23 UTC (rev 288363)
@@ -99,22 +99,19 @@
const RegisterAtOffsetList* JITCode::calleeSaveRegisters() const
{
- switch (jitType()) {
#if ENABLE(FTL_JIT)
- case JITType::FTLJIT:
+ if (m_jitType == JITType::FTLJIT)
return static_cast<const FTL::JITCode*>(this)->calleeSaveRegisters();
#endif
#if ENABLE(DFG_JIT)
- case JITType::DFGJIT:
+ if (m_jitType == JITType::DFGJIT)
return &RegisterAtOffsetList::dfgCalleeSaveRegisters();
#endif
- default:
#if !ENABLE(C_LOOP)
- return &RegisterAtOffsetList::llintBaselineCalleeSaveRegisters();
+ return &RegisterAtOffsetList::llintBaselineCalleeSaveRegisters();
#else
- return nullptr;
+ return nullptr;
#endif
- }
}
JITCodeWithCodeRef::JITCodeWithCodeRef(JITType jitType)
Modified: trunk/Source/_javascript_Core/jit/JITCode.h (288362 => 288363)
--- trunk/Source/_javascript_Core/jit/JITCode.h 2022-01-21 15:08:18 UTC (rev 288362)
+++ trunk/Source/_javascript_Core/jit/JITCode.h 2022-01-21 16:11:23 UTC (rev 288363)
@@ -232,8 +232,8 @@
const RegisterAtOffsetList* calleeSaveRegisters() const;
private:
- JITType m_jitType;
- ShareAttribute m_shareAttribute;
+ const JITType m_jitType;
+ const ShareAttribute m_shareAttribute;
protected:
Intrinsic m_intrinsic { NoIntrinsic }; // Effective only in NativeExecutable.
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes