Ignore:
Timestamp:
Jan 21, 2022, 8:11:23 AM (3 years ago)
Author:
[email protected]
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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITCode.cpp

    r287596 r288363  
    100100const RegisterAtOffsetList* JITCode::calleeSaveRegisters() const
    101101{
    102     switch (jitType()) {
    103102#if ENABLE(FTL_JIT)
    104     case JITType::FTLJIT:
     103    if (m_jitType == JITType::FTLJIT)
    105104        return static_cast<const FTL::JITCode*>(this)->calleeSaveRegisters();
    106105#endif
    107106#if ENABLE(DFG_JIT)
    108     case JITType::DFGJIT:
     107    if (m_jitType == JITType::DFGJIT)
    109108        return &RegisterAtOffsetList::dfgCalleeSaveRegisters();
    110109#endif
    111     default:
    112110#if !ENABLE(C_LOOP)
    113         return &RegisterAtOffsetList::llintBaselineCalleeSaveRegisters();
     111    return &RegisterAtOffsetList::llintBaselineCalleeSaveRegisters();
    114112#else
    115         return nullptr;
    116 #endif
    117     }
     113    return nullptr;
     114#endif
    118115}
    119116
Note: See TracChangeset for help on using the changeset viewer.