Ignore:
Timestamp:
Mar 26, 2022, 7:41:15 AM (3 years ago)
Author:
[email protected]
Message:

Use unary static_assert
https://bugs.webkit.org/show_bug.cgi?id=238412

Reviewed by Mark Lam.

Source/bmalloc:

  • bmalloc/Algorithm.h:

(bmalloc::isPowerOfTwo):

  • bmalloc/Gigacage.h:
  • bmalloc/IsoHeapImpl.h:

Source/JavaScriptCore:

Replace static_assert(..., ""); with static_assert(...);

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::relinkJumpOrCall):

  • assembler/AssemblerBuffer.h:

(JSC::AssemblerBuffer::putIntegralUnchecked):

  • assembler/MacroAssemblerCodeRef.h:
  • bytecode/AdaptiveInferredPropertyValueWatchpointBase.h:
  • bytecode/ArrayProfile.h:
  • bytecode/CodeBlockHash.cpp:

(JSC::CodeBlockHash::CodeBlockHash):

  • bytecode/ParseHash.cpp:

(JSC::ParseHash::ParseHash):

  • bytecode/Watchpoint.h:
  • dfg/DFGNode.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):
(JSC::RegisterSet::dfgCalleeSaveRegisters):
(JSC::RegisterSet::ftlCalleeSaveRegisters):

  • runtime/CachedBytecode.cpp:

(JSC::CachedBytecode::commitUpdates const):

  • runtime/ClonedArguments.h:
  • runtime/DirectArguments.h:
  • runtime/DirectEvalExecutable.h:
  • runtime/ErrorConstructor.h:
  • runtime/IndirectEvalExecutable.h:
  • runtime/JSArrayBufferView.cpp:
  • runtime/JSBoundFunction.h:
  • runtime/JSLexicalEnvironment.h:

(JSC::JSLexicalEnvironment::subspaceFor):

  • runtime/JSString.cpp:

(JSC::JSRopeString::RopeBuilder<RecordOverflow>::expand):

  • runtime/JSString.h:
  • runtime/NativeFunction.h:
  • runtime/Operations.h:

(JSC::jsString):

  • runtime/RegExpObject.h:
  • runtime/ScopedArguments.h:
  • runtime/ScopedArgumentsTable.cpp:
  • runtime/TypedArrayAdaptors.h:

(JSC::IntegralTypedArrayAdaptor::toJSValue):

  • runtime/TypedArrayType.h:
  • runtime/WeakMapImpl.h:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::AirIRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::AirIRGenerator::emitModOrDiv):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::DisjunctionContext::allocationSize):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::allocationSize):

Source/WebCore:

  • Modules/entriesapi/FileSystemDirectoryEntry.h:
  • Modules/entriesapi/FileSystemFileEntry.h:
  • css/DOMMatrix.h:
  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):

  • dom/DOMPoint.h:
  • dom/DOMRect.h:
  • html/HTMLAllCollection.h:
  • html/track/AudioTrackList.h:
  • html/track/VideoTrackList.h:
  • layout/formattingContexts/inline/InlineItem.cpp:
  • layout/formattingContexts/inline/InlineTextItem.cpp:
  • platform/KeyedCoding.h:

(WebCore::KeyedDecoder::decodeBytes):

  • xml/XMLHttpRequestEventTarget.h:

Source/WebKit:

  • Shared/API/c/WKContextMenuItem.cpp:
  • UIProcess/mac/LegacySessionStateCoding.cpp:

(WebKit::HistoryEntryDataEncoder::encodeArithmeticType):
(WebKit::HistoryEntryDataDecoder::decodeArithmeticType):

Source/WTF:

  • wtf/CompactPointerTuple.h:
  • wtf/FastMalloc.h:
  • wtf/FunctionTraits.h:

(WTF::slotsForCCallArgument):

  • wtf/Int128.cpp:
  • wtf/MallocPtr.h:
  • wtf/Markable.h:

(WTF::std::underlying_type<EnumType>::type>::max):

  • wtf/PtrTag.h:

(WTF::tagInt):

  • wtf/Seconds.h:
  • wtf/StdLibExtras.h:

(WTF::roundUpToMultipleOf):

  • wtf/SystemFree.h:
  • wtf/UnalignedAccess.h:

(WTF::unalignedLoad):
(WTF::unalignedStore):

  • wtf/UniqueArray.h:

(WTF::makeUniqueArray):

  • wtf/WTFAssertions.cpp:
  • wtf/text/StringConcatenate.h:

(WTF::tryMakeStringFromAdapters):

  • wtf/text/StringImpl.h:
  • wtf/text/SymbolImpl.h:

Tools:

  • TestWebKitAPI/Tests/WTF/EnumTraits.cpp:
  • TestWebKitAPI/Tests/WTF/HashMap.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/Int128.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/Packed.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/RobinHoodHashMap.cpp:

(TestWebKitAPI::TEST):

File:
1 edited

Legend:

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

    r291752 r291937  
    1528915289    m_jit.and32(maskGPR, indexGPR);
    1529015290    if (node->child1().useKind() == WeakSetObjectUse) {
    15291         static_assert(sizeof(WeakMapBucket<WeakMapBucketDataKey>) == sizeof(void*), "");
     15291        static_assert(sizeof(WeakMapBucket<WeakMapBucketDataKey>) == sizeof(void*));
    1529215292        m_jit.zeroExtend32ToWord(indexGPR, bucketGPR);
    1529315293        m_jit.lshiftPtr(MacroAssembler::Imm32(sizeof(void*) == 4 ? 2 : 3), bucketGPR);
     
    1529515295    } else {
    1529615296        ASSERT(node->child1().useKind() == WeakMapObjectUse);
    15297         static_assert(sizeof(WeakMapBucket<WeakMapBucketDataKeyValue>) == 16, "");
     15297        static_assert(sizeof(WeakMapBucket<WeakMapBucketDataKeyValue>) == 16);
    1529815298        m_jit.zeroExtend32ToWord(indexGPR, bucketGPR);
    1529915299        m_jit.lshiftPtr(MacroAssembler::Imm32(4), bucketGPR);
     
    1614016140    }
    1614116141
    16142     static_assert(StringImpl::flagIs8Bit() == JSRopeString::is8BitInPointer, "");
     16142    static_assert(StringImpl::flagIs8Bit() == JSRopeString::is8BitInPointer);
    1614316143    m_jit.and32(TrustedImm32(StringImpl::flagIs8Bit()), scratchGPR);
    1614416144    m_jit.orPtr(opGPRs[0], scratchGPR);
Note: See TracChangeset for help on using the changeset viewer.