Changeset 292535 in webkit for trunk/Source/JavaScriptCore/dfg


Ignore:
Timestamp:
Apr 7, 2022, 7:43:36 AM (3 years ago)
Author:
[email protected]
Message:

[JSC][32bit] Use constexpr tags instead of enums
https://bugs.webkit.org/show_bug.cgi?id=238926

Patch by Geza Lore <Geza Lore> on 2022-04-07
Reviewed by Yusuke Suzuki.

The *Tag values are just 32-bit constants, so define them as
constexpr. This reduces compiler nuisance warnings about enum
comparisons.

  • dfg/DFGSpeculativeJIT.cpp:
  • runtime/JSCJSValue.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r292447 r292535  
    1167511675        m_jit.branchIfNotNumber(gpr));
    1167611676#else
    11677     IGNORE_WARNINGS_BEGIN("enum-compare")
    1167811677    static_assert(JSValue::Int32Tag >= JSValue::LowestTag, "Int32Tag is included in >= JSValue::LowestTag range.");
    11679     IGNORE_WARNINGS_END
    1168011678    GPRReg tagGPR = value.tagGPR();
    1168111679    DFG_TYPE_CHECK(
     
    1232212320        m_jit.branch64(MacroAssembler::Above, regs.gpr(), MacroAssembler::TrustedImm64(JSValue::MiscTag)));
    1232312321#else
    12324     IGNORE_WARNINGS_BEGIN("enum-compare")
    1232512322    static_assert(JSValue::Int32Tag >= JSValue::UndefinedTag, "Int32Tag is included in >= JSValue::UndefinedTag range.");
    12326     IGNORE_WARNINGS_END
    1232712323    DFG_TYPE_CHECK(
    1232812324        regs, edge, ~SpecInt32Only,
Note: See TracChangeset for help on using the changeset viewer.