Title: [288085] trunk/Source
Revision
288085
Author
[email protected]
Date
2022-01-16 21:18:06 -0800 (Sun, 16 Jan 2022)

Log Message

Fix C++20 build warnings with GCC
https://bugs.webkit.org/show_bug.cgi?id=235023

Reviewed by Alex Christensen.

Mostly related to deprecating operations between enums of different
types and not capturing this by default in lambdas.

Source/_javascript_Core:

* assembler/X86Assembler.h: Casting enums to same type.
(JSC::X86Assembler::cmovcc):
(JSC::X86Assembler::jccRel32):
(JSC::X86Assembler::setccOpcode):
* b3/B3CheckSpecial.cpp: Capture this in lambda.
(JSC::B3::CheckSpecial::generate):
* b3/B3Type.cpp: Replace is_pod_v is is_standard_layout_v and
is_trivial_v
* bytecode/AccessCase.cpp: Capture this in lambda.
(JSC::AccessCase::generateImpl):
* bytecode/CallLinkInfo.cpp: Ditto.
(JSC::OptimizingCallLinkInfo::emitDirectFastPath):
(JSC::OptimizingCallLinkInfo::emitDirectTailCallFastPath):
(JSC::OptimizingCallLinkInfo::initializeDirectCall):
* dfg/DFGSpeculativeJIT.cpp: Ditto.
* dfg/DFGSpeculativeJIT64.cpp: Ditto.
(JSC::DFG::SpeculativeJIT::compile):
* jit/ICStats.h: Cast enums to same type.
(JSC::ICEvent::hash const):
* jit/JITArithmetic.cpp: Capture this in lambda.
(JSC::JIT::emitMathICSlow):
* jit/JITSizeStatistics.cpp: Ditto.
(JSC::JITSizeStatistics::markEnd):
* runtime/VM.cpp: Ditto.
(JSC::VM::deleteAllLinkedCode):
(JSC::VM::deleteAllCode):
(JSC::VM::shrinkFootprintWhenIdle):
* wasm/WasmAirIRGenerator.cpp: Ditto.
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addTableInit):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::addTableCopy):
(JSC::Wasm::AirIRGenerator::addMemoryFill):
(JSC::Wasm::AirIRGenerator::addMemoryCopy):
(JSC::Wasm::AirIRGenerator::addMemoryInit):
(JSC::Wasm::AirIRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::AirIRGenerator::emitAtomicLoadOp):
(JSC::Wasm::AirIRGenerator::emitAtomicStoreOp):
(JSC::Wasm::AirIRGenerator::emitAtomicBinaryRMWOp):
(JSC::Wasm::AirIRGenerator::emitAtomicCompareExchange):
(JSC::Wasm::AirIRGenerator::atomicWait):
(JSC::Wasm::AirIRGenerator::atomicNotify):
(JSC::Wasm::AirIRGenerator::emitEntryTierUpCheck):
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::AirIRGenerator::addCallRef):
(JSC::Wasm::AirIRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF32>):
* wasm/WasmB3IRGenerator.cpp: Ditto.
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addTableInit):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addTableCopy):
(JSC::Wasm::B3IRGenerator::emitIndirectCall):
(JSC::Wasm::B3IRGenerator::addMemoryFill):
(JSC::Wasm::B3IRGenerator::addMemoryInit):
(JSC::Wasm::B3IRGenerator::addMemoryCopy):
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffsetForAtomicOps):
(JSC::Wasm::B3IRGenerator::atomicWait):
(JSC::Wasm::B3IRGenerator::atomicNotify):
(JSC::Wasm::B3IRGenerator::emitEntryTierUpCheck):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::B3IRGenerator::addCallRef):
(JSC::Wasm::B3IRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):
* yarr/YarrJIT.cpp: Ditto.

Source/WebCore:

* dom/ViewportArguments.h: Replace enum with constexpr ints as they're
compared to doubles in various places through ViewportArguments.cpp.
* dom/WheelEvent.h: Replace single-valued enum with constexpr
variable.
* platform/animation/Animation.h: Ditto.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
Ditto.
(WebCore::CoordinatedGraphicsLayer::shouldDirectlyCompositeImage const):
* rendering/style/RenderStyleConstants.h: Merge two enums that are
used only in the context of being combined to form a third enum.

Source/WebKit:

* WebProcess/Inspector/WebInspector.cpp: Capture this in lambdas.
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::startElementSelection):
(WebKit::WebInspector::stopElementSelection):

Source/WTF:

* wtf/AutomaticThread.cpp: Capture this in lambda.
(WTF::AutomaticThread::start):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (288084 => 288085)


--- trunk/Source/_javascript_Core/ChangeLog	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-01-17 05:18:06 UTC (rev 288085)
@@ -1,3 +1,100 @@
+2022-01-16  Lauro Moura  <[email protected]>
+
+        Fix C++20 build warnings with GCC
+        https://bugs.webkit.org/show_bug.cgi?id=235023
+
+        Reviewed by Alex Christensen.
+
+        Mostly related to deprecating operations between enums of different
+        types and not capturing this by default in lambdas.
+
+        * assembler/X86Assembler.h: Casting enums to same type.
+        (JSC::X86Assembler::cmovcc):
+        (JSC::X86Assembler::jccRel32):
+        (JSC::X86Assembler::setccOpcode):
+        * b3/B3CheckSpecial.cpp: Capture this in lambda.
+        (JSC::B3::CheckSpecial::generate):
+        * b3/B3Type.cpp: Replace is_pod_v is is_standard_layout_v and
+        is_trivial_v
+        * bytecode/AccessCase.cpp: Capture this in lambda.
+        (JSC::AccessCase::generateImpl):
+        * bytecode/CallLinkInfo.cpp: Ditto.
+        (JSC::OptimizingCallLinkInfo::emitDirectFastPath):
+        (JSC::OptimizingCallLinkInfo::emitDirectTailCallFastPath):
+        (JSC::OptimizingCallLinkInfo::initializeDirectCall):
+        * dfg/DFGSpeculativeJIT.cpp: Ditto.
+        * dfg/DFGSpeculativeJIT64.cpp: Ditto.
+        (JSC::DFG::SpeculativeJIT::compile):
+        * jit/ICStats.h: Cast enums to same type.
+        (JSC::ICEvent::hash const):
+        * jit/JITArithmetic.cpp: Capture this in lambda.
+        (JSC::JIT::emitMathICSlow):
+        * jit/JITSizeStatistics.cpp: Ditto.
+        (JSC::JITSizeStatistics::markEnd):
+        * runtime/VM.cpp: Ditto.
+        (JSC::VM::deleteAllLinkedCode):
+        (JSC::VM::deleteAllCode):
+        (JSC::VM::shrinkFootprintWhenIdle):
+        * wasm/WasmAirIRGenerator.cpp: Ditto.
+        (JSC::Wasm::AirIRGenerator::AirIRGenerator):
+        (JSC::Wasm::AirIRGenerator::addTableGet):
+        (JSC::Wasm::AirIRGenerator::addTableSet):
+        (JSC::Wasm::AirIRGenerator::addTableInit):
+        (JSC::Wasm::AirIRGenerator::addTableFill):
+        (JSC::Wasm::AirIRGenerator::addTableCopy):
+        (JSC::Wasm::AirIRGenerator::addMemoryFill):
+        (JSC::Wasm::AirIRGenerator::addMemoryCopy):
+        (JSC::Wasm::AirIRGenerator::addMemoryInit):
+        (JSC::Wasm::AirIRGenerator::emitCheckAndPreparePointer):
+        (JSC::Wasm::AirIRGenerator::emitAtomicLoadOp):
+        (JSC::Wasm::AirIRGenerator::emitAtomicStoreOp):
+        (JSC::Wasm::AirIRGenerator::emitAtomicBinaryRMWOp):
+        (JSC::Wasm::AirIRGenerator::emitAtomicCompareExchange):
+        (JSC::Wasm::AirIRGenerator::atomicWait):
+        (JSC::Wasm::AirIRGenerator::atomicNotify):
+        (JSC::Wasm::AirIRGenerator::emitEntryTierUpCheck):
+        (JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
+        (JSC::Wasm::AirIRGenerator::addCallIndirect):
+        (JSC::Wasm::AirIRGenerator::addCallRef):
+        (JSC::Wasm::AirIRGenerator::emitChecksForModOrDiv):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncSF64>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncSF32>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncUF64>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncUF32>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncSF64>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF64>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncSF32>):
+        (JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF32>):
+        * wasm/WasmB3IRGenerator.cpp: Ditto.
+        (JSC::Wasm::B3IRGenerator::B3IRGenerator):
+        (JSC::Wasm::B3IRGenerator::addTableGet):
+        (JSC::Wasm::B3IRGenerator::addTableSet):
+        (JSC::Wasm::B3IRGenerator::addTableInit):
+        (JSC::Wasm::B3IRGenerator::addTableFill):
+        (JSC::Wasm::B3IRGenerator::addTableCopy):
+        (JSC::Wasm::B3IRGenerator::emitIndirectCall):
+        (JSC::Wasm::B3IRGenerator::addMemoryFill):
+        (JSC::Wasm::B3IRGenerator::addMemoryInit):
+        (JSC::Wasm::B3IRGenerator::addMemoryCopy):
+        (JSC::Wasm::B3IRGenerator::fixupPointerPlusOffsetForAtomicOps):
+        (JSC::Wasm::B3IRGenerator::atomicWait):
+        (JSC::Wasm::B3IRGenerator::atomicNotify):
+        (JSC::Wasm::B3IRGenerator::emitEntryTierUpCheck):
+        (JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
+        (JSC::Wasm::B3IRGenerator::addCall):
+        (JSC::Wasm::B3IRGenerator::addCallIndirect):
+        (JSC::Wasm::B3IRGenerator::addCallRef):
+        (JSC::Wasm::B3IRGenerator::emitChecksForModOrDiv):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
+        (JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):
+        * yarr/YarrJIT.cpp: Ditto.
+
 2022-01-15  Yusuke Suzuki  <[email protected]>
 
         [JSC] Fix Date functions' argument coercion

Modified: trunk/Source/_javascript_Core/assembler/X86Assembler.h (288084 => 288085)


--- trunk/Source/_javascript_Core/assembler/X86Assembler.h	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/assembler/X86Assembler.h	2022-01-17 05:18:06 UTC (rev 288085)
@@ -335,17 +335,17 @@
     
     TwoByteOpcodeID cmovcc(Condition cond)
     {
-        return (TwoByteOpcodeID)(OP2_CMOVCC + cond);
+        return (TwoByteOpcodeID)(OP2_CMOVCC + static_cast<TwoByteOpcodeID>(cond));
     }
 
     TwoByteOpcodeID jccRel32(Condition cond)
     {
-        return (TwoByteOpcodeID)(OP2_JCC_rel32 + cond);
+        return (TwoByteOpcodeID)(OP2_JCC_rel32 + static_cast<TwoByteOpcodeID>(cond));
     }
 
     TwoByteOpcodeID setccOpcode(Condition cond)
     {
-        return (TwoByteOpcodeID)(OP_SETCC + cond);
+        return (TwoByteOpcodeID)(OP_SETCC + static_cast<TwoByteOpcodeID>(cond));
     }
 
     typedef enum {

Modified: trunk/Source/_javascript_Core/b3/B3CheckSpecial.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/b3/B3CheckSpecial.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/b3/B3CheckSpecial.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -176,7 +176,7 @@
 
     context.latePaths.append(
         createSharedTask<GenerationContext::LatePathFunction>(
-            [=] (CCallHelpers& jit, GenerationContext& context) {
+            [=, this] (CCallHelpers& jit, GenerationContext& context) {
                 fail.link(&jit);
 
                 // If necessary, undo the operation.

Modified: trunk/Source/_javascript_Core/b3/B3Type.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/b3/B3Type.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/b3/B3Type.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -59,7 +59,7 @@
     RELEASE_ASSERT_NOT_REACHED();
 }
 
-static_assert(std::is_pod_v<JSC::B3::TypeKind>);
+static_assert(std::is_standard_layout_v<JSC::B3::TypeKind> && std::is_trivial_v<JSC::B3::TypeKind>);
 } // namespace WTF
 
 

Modified: trunk/Source/_javascript_Core/bytecode/AccessCase.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/bytecode/AccessCase.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/bytecode/AccessCase.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -2108,7 +2108,7 @@
             bool callHasReturnValue = isGetter();
             restoreLiveRegistersFromStackForCall(spillState, callHasReturnValue);
 
-            jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+            jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
                 this->as<GetterSetterAccessCase>().callLinkInfo()->setCodeLocations(
                     linkBuffer.locationOf<JSInternalPtrTag>(slowPathStart),
                     linkBuffer.locationOf<JSInternalPtrTag>(doneLocation));
@@ -2172,7 +2172,7 @@
                 operationCall = jit.call(OperationPtrTag);
             else
                 operationCall = jit.call(CustomAccessorPtrTag);
-            jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+            jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
                 if (Options::useJITCage()) {
                     if (m_type == CustomValueGetter || m_type == CustomAccessorGetter)
                         linkBuffer.link(operationCall, FunctionPtr<OperationPtrTag>(vmEntryCustomGetter));

Modified: trunk/Source/_javascript_Core/bytecode/CallLinkInfo.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/bytecode/CallLinkInfo.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/bytecode/CallLinkInfo.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -463,7 +463,7 @@
     setUsesDataICs(UseDataIC::No);
 
     auto call = jit.nearCall();
-    jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+    jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
         m_callLocation = linkBuffer.locationOfNearCall<JSInternalPtrTag>(call);
     });
     jit.addLateLinkTask([this] (LinkBuffer&) {
@@ -478,7 +478,7 @@
     setUsesDataICs(UseDataIC::No);
 
     auto fastPathStart = jit.label();
-    jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+    jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
         m_fastPathStart = linkBuffer.locationOf<JSInternalPtrTag>(fastPathStart);
     });
 
@@ -488,7 +488,7 @@
 
     prepareForTailCall();
     auto call = jit.nearTailCall();
-    jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+    jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
         m_callLocation = linkBuffer.locationOfNearCall<JSInternalPtrTag>(call);
     });
     jit.addLateLinkTask([this] (LinkBuffer&) {
@@ -504,7 +504,7 @@
         RELEASE_ASSERT(fastPathStart());
         CCallHelpers::emitJITCodeOver(fastPathStart(), scopedLambda<void(CCallHelpers&)>([&](CCallHelpers& jit) {
             auto jump = jit.jump();
-            jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+            jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
                 linkBuffer.link(jump, slowPathStart());
             });
         }), "initialize direct call");

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -5392,7 +5392,7 @@
 
         auto done = m_jit.label();
 
-        addSlowPathGeneratorLambda([=, savePlans = WTFMove(savePlans)] () {
+        addSlowPathGeneratorLambda([=, this, savePlans = WTFMove(savePlans)] () {
             addICGenerationState->slowPathJumps.link(&m_jit);
             addICGenerationState->slowPathStart = m_jit.label();
 #if ENABLE(MATH_IC_STATS)
@@ -6015,7 +6015,7 @@
 
         auto done = m_jit.label();
 
-        addSlowPathGeneratorLambda([=, savePlans = WTFMove(savePlans)] () {
+        addSlowPathGeneratorLambda([=, this, savePlans = WTFMove(savePlans)] () {
             icGenerationState->slowPathJumps.link(&m_jit);
             icGenerationState->slowPathStart = m_jit.label();
 #if ENABLE(MATH_IC_STATS)

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -5950,7 +5950,7 @@
         silentSpillAllRegistersImpl(false, savePlans, InvalidGPRReg);
         BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
 
-        addSlowPathGeneratorLambda([=]() {
+        addSlowPathGeneratorLambda([=, this]() {
             callTierUp.link(&m_jit);
 
             silentSpill(savePlans);
@@ -6002,7 +6002,7 @@
         unsigned streamIndex = m_stream->size();
         m_jit.jitCode()->bytecodeIndexToStreamIndex.add(bytecodeIndex, streamIndex);
 
-        addSlowPathGeneratorLambda([=]() {
+        addSlowPathGeneratorLambda([=, this]() {
             forceOSREntry.link(&m_jit);
             overflowedCounter.link(&m_jit);
 

Modified: trunk/Source/_javascript_Core/jit/ICStats.h (288084 => 288085)


--- trunk/Source/_javascript_Core/jit/ICStats.h	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/jit/ICStats.h	2022-01-17 05:18:06 UTC (rev 288085)
@@ -150,8 +150,8 @@
     unsigned hash() const
     {
         if (m_propertyName.isNull())
-            return m_kind + m_propertyLocation + WTF::PtrHash<const ClassInfo*>::hash(m_classInfo);
-        return m_kind + m_propertyLocation + WTF::PtrHash<const ClassInfo*>::hash(m_classInfo) + StringHash::hash(m_propertyName.string());
+            return static_cast<unsigned>(m_kind) + static_cast<unsigned>(m_propertyLocation) + WTF::PtrHash<const ClassInfo*>::hash(m_classInfo);
+        return static_cast<unsigned>(m_kind) + static_cast<unsigned>(m_propertyLocation) + WTF::PtrHash<const ClassInfo*>::hash(m_classInfo) + StringHash::hash(m_propertyName.string());
     }
     
     bool isHashTableDeletedValue() const

Modified: trunk/Source/_javascript_Core/jit/JITArithmetic.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/jit/JITArithmetic.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/jit/JITArithmetic.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -858,7 +858,7 @@
 
     emitPutVirtualRegister(result, resultRegs);
 
-    addLinkTask([=] (LinkBuffer& linkBuffer) {
+    addLinkTask([=, this] (LinkBuffer& linkBuffer) {
         MathICGenerationState& mathICGenerationState = m_instructionToMathICGenerationState.find(currentInstruction)->value.get();
         mathIC->finalizeInlineCode(mathICGenerationState, linkBuffer);
     });
@@ -919,7 +919,7 @@
 
     emitPutVirtualRegister(result, resultRegs);
 
-    addLinkTask([=] (LinkBuffer& linkBuffer) {
+    addLinkTask([=, this] (LinkBuffer& linkBuffer) {
         MathICGenerationState& mathICGenerationState = m_instructionToMathICGenerationState.find(currentInstruction)->value.get();
         mathIC->finalizeInlineCode(mathICGenerationState, linkBuffer);
     });

Modified: trunk/Source/_javascript_Core/jit/JITSizeStatistics.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/jit/JITSizeStatistics.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/jit/JITSizeStatistics.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -45,9 +45,9 @@
 void JITSizeStatistics::markEnd(Marker marker, CCallHelpers& jit)
 {
     CCallHelpers::Label end = jit.labelIgnoringWatchpoints();
-    jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+    jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
         size_t size = linkBuffer.locationOf<NoPtrTag>(end).untaggedExecutableAddress<char*>() - linkBuffer.locationOf<NoPtrTag>(marker.start).untaggedExecutableAddress<char*>();
-        linkBuffer.addMainThreadFinalizationTask([=] {
+        linkBuffer.addMainThreadFinalizationTask([=, this] {
             auto& entry = m_data.add(marker.identifier, Entry { }).iterator->value;
             ++entry.count;
             entry.totalBytes += size;

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -774,7 +774,7 @@
 
 void VM::deleteAllLinkedCode(DeleteAllCodeEffort effort)
 {
-    whenIdle([=] () {
+    whenIdle([=, this] () {
         heap.deleteAllCodeBlocks(effort);
     });
 }
@@ -781,7 +781,7 @@
 
 void VM::deleteAllCode(DeleteAllCodeEffort effort)
 {
-    whenIdle([=] () {
+    whenIdle([=, this] () {
         m_codeCache->clear();
         m_regExpCache->deleteAllCode();
         heap.deleteAllCodeBlocks(effort);
@@ -792,7 +792,7 @@
 
 void VM::shrinkFootprintWhenIdle()
 {
-    whenIdle([=] () {
+    whenIdle([=, this] () {
         sanitizeStackForVM(*this);
         deleteAllCode(DeleteAllCodeIfNotCollecting);
         heap.collectNow(Synchronousness::Sync, CollectionScope::Full);

Modified: trunk/Source/_javascript_Core/wasm/WasmAirIRGenerator.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/wasm/WasmAirIRGenerator.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/wasm/WasmAirIRGenerator.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -963,7 +963,7 @@
 
     m_prologueWasmContextGPR = Context::useFastTLS() ? wasmCallingConvention().prologueScratchGPRs[1] : m_wasmContextInstanceGPR;
 
-    m_prologueGenerator = createSharedTask<B3::Air::PrologueGeneratorFunction>([=] (CCallHelpers& jit, B3::Air::Code& code) {
+    m_prologueGenerator = createSharedTask<B3::Air::PrologueGeneratorFunction>([=, this] (CCallHelpers& jit, B3::Air::Code& code) {
         AllowMacroScratchRegisterUsage allowScratch(jit);
         code.emitDefaultPrologue(jit);
 
@@ -1329,7 +1329,7 @@
     emitCCall(&operationGetWasmTableElement, result, instanceValue(), addConstant(Types::I32, tableIndex), index);
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1348,7 +1348,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), shouldThrow, shouldThrow);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1375,7 +1375,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1425,7 +1425,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1452,7 +1452,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1527,7 +1527,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
     });
 
@@ -1552,7 +1552,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1578,7 +1578,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::Zero), result, result);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTableAccess);
     });
 
@@ -1785,7 +1785,7 @@
 
         emitCheck([&] {
             return Inst(Branch64, nullptr, Arg::relCond(MacroAssembler::AboveOrEqual), temp, Tmp(m_boundsCheckingSizeGPR));
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
         break;
@@ -1811,7 +1811,7 @@
 
             emitCheck([&] {
                 return Inst(Branch64, nullptr, Arg::relCond(MacroAssembler::AboveOrEqual), temp, sizeMax);
-            }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+            }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
                 this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
             });
         }
@@ -2382,7 +2382,7 @@
     if (accessWidth(op) != B3::Width8) {
         emitCheck([&] {
             return Inst(BranchTest64, nullptr, Arg::resCond(MacroAssembler::NonZero), newPtr, isX86() ? Arg::bitImm(sizeOfAtomicOpMemoryAccess(op) - 1) : Arg::bitImm64(sizeOfAtomicOpMemoryAccess(op) - 1));
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2454,7 +2454,7 @@
     if (accessWidth(op) != B3::Width8) {
         emitCheck([&] {
             return Inst(BranchTest64, nullptr, Arg::resCond(MacroAssembler::NonZero), newPtr, isX86() ? Arg::bitImm(sizeOfAtomicOpMemoryAccess(op) - 1) : Arg::bitImm64(sizeOfAtomicOpMemoryAccess(op) - 1));
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2508,7 +2508,7 @@
     if (accessWidth(op) != B3::Width8) {
         emitCheck([&] {
             return Inst(BranchTest64, nullptr, Arg::resCond(MacroAssembler::NonZero), newPtr, isX86() ? Arg::bitImm(sizeOfAtomicOpMemoryAccess(op) - 1) : Arg::bitImm64(sizeOfAtomicOpMemoryAccess(op) - 1));
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2680,7 +2680,7 @@
     if (accessWidth != B3::Width8) {
         emitCheck([&] {
             return Inst(BranchTest64, nullptr, Arg::resCond(MacroAssembler::NonZero), newPtr, isX86() ? Arg::bitImm(sizeOfAtomicOpMemoryAccess(op) - 1) : Arg::bitImm64(sizeOfAtomicOpMemoryAccess(op) - 1));
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2778,7 +2778,7 @@
         emitCCall(&operationMemoryAtomicWait64, result, instanceValue(), pointer, addConstant(Types::I32, offset), value, timeout);
     emitCheck([&] {
         return Inst(Branch32, nullptr, Arg::relCond(MacroAssembler::LessThan), result, Arg::imm(0));
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
     });
 
@@ -2792,7 +2792,7 @@
     emitCCall(&operationMemoryAtomicNotify, result, instanceValue(), pointer, addConstant(Types::I32, offset), count);
     emitCheck([&] {
         return Inst(Branch32, nullptr, Arg::relCond(MacroAssembler::LessThan), result, Arg::imm(0));
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
     });
 
@@ -3029,13 +3029,13 @@
     patch->effects = effects;
     patch->clobber(RegisterSet::macroScratchRegisters());
 
-    patch->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+    patch->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
         AllowMacroScratchRegisterUsage allowScratch(jit);
 
         CCallHelpers::Jump tierUp = jit.branchAdd32(CCallHelpers::PositiveOrZero, CCallHelpers::TrustedImm32(TierUpCount::functionEntryIncrement()), CCallHelpers::Address(params[0].gpr()));
         CCallHelpers::Label tierUpResume = jit.label();
 
-        params.addLatePath([=] (CCallHelpers& jit) {
+        params.addLatePath([=, this] (CCallHelpers& jit) {
             tierUp.link(&jit);
 
             const unsigned extraPaddingBytes = 0;
@@ -3093,7 +3093,7 @@
     TierUpCount::TriggerReason* forceEntryTrigger = &(m_tierUp->osrEntryTriggers().last());
     static_assert(!static_cast<uint8_t>(TierUpCount::TriggerReason::DontTrigger), "the JIT code assumes non-zero means 'enter'");
     static_assert(sizeof(TierUpCount::TriggerReason) == 1, "branchTest8 assumes this size");
-    patch->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+    patch->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
         AllowMacroScratchRegisterUsage allowScratch(jit);
         CCallHelpers::Jump forceOSREntry = jit.branchTest8(CCallHelpers::NonZero, CCallHelpers::AbsoluteAddress(forceEntryTrigger));
         CCallHelpers::Jump tierUp = jit.branchAdd32(CCallHelpers::PositiveOrZero, CCallHelpers::TrustedImm32(TierUpCount::loopIncrement()), CCallHelpers::Address(params[0].gpr()));
@@ -3610,7 +3610,7 @@
             // FIXME: We shouldn't have to do this: https://bugs.webkit.org/show_bug.cgi?id=172181
             patchpoint->clobberLate(PinnedRegisterInfo::get().toSave(MemoryMode::BoundsChecking));
 
-            patchpoint->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+            patchpoint->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
                 AllowMacroScratchRegisterUsage allowScratch(jit);
                 exceptionHandle.generate(jit, params, this);
                 CCallHelpers::Call call = jit.threadSafePatchableNearCall();
@@ -3639,7 +3639,7 @@
             // We pessimistically assume we could be calling to something that is bounds checking.
             // FIXME: We shouldn't have to do this: https://bugs.webkit.org/show_bug.cgi?id=172181
             patchpoint->clobberLate(PinnedRegisterInfo::get().toSave(MemoryMode::BoundsChecking));
-            patchpoint->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+            patchpoint->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
                 AllowMacroScratchRegisterUsage allowScratch(jit);
                 exceptionHandle.generate(jit, params, this);
                 jit.call(params[params.proc().resultCount(params.value()->type())].gpr(), WasmEntryPtrTag);
@@ -3659,7 +3659,7 @@
         // We need to clobber the size register since the LLInt always bounds checks
         if (m_mode == MemoryMode::Signaling || m_info.memory.isShared())
             patchpoint->clobberLate(RegisterSet { PinnedRegisterInfo::get().boundsCheckingSizeRegister });
-        patchpoint->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+        patchpoint->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
             AllowMacroScratchRegisterUsage allowScratch(jit);
             exceptionHandle.generate(jit, params, this);
             CCallHelpers::Call call = jit.threadSafePatchableNearCall();
@@ -3709,7 +3709,7 @@
     // Check the index we are looking for is valid.
     emitCheck([&] {
         return Inst(Branch32, nullptr, Arg::relCond(MacroAssembler::AboveOrEqual), calleeIndex, callableFunctionBufferLength);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsCallIndirect);
     });
 
@@ -3736,7 +3736,7 @@
         emitCheck([&] {
             static_assert(Signature::invalidIndex == 0, "");
             return Inst(BranchTest64, nullptr, Arg::resCond(MacroAssembler::Zero), calleeSignatureIndex, calleeSignatureIndex);
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::NullTableEntry);
         });
 
@@ -3744,7 +3744,7 @@
         append(Move, Arg::bigImm(SignatureInformation::get(signature)), expectedSignatureIndex);
         emitCheck([&] {
             return Inst(Branch64, nullptr, Arg::relCond(MacroAssembler::NotEqual), calleeSignatureIndex, expectedSignatureIndex);
-        }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::BadSignature);
         });
     }
@@ -3769,7 +3769,7 @@
     append(Move, Arg::bigImm(JSValue::encode(jsNull())), tmpForNull);
     emitCheck([&] {
         return Inst(Branch64, nullptr, Arg::relCond(MacroAssembler::Equal), calleeFunction, tmpForNull);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::NullReference);
     });
 
@@ -3852,7 +3852,7 @@
 
     patchpoint->clobberLate(PinnedRegisterInfo::get().toSave(MemoryMode::BoundsChecking));
 
-    patchpoint->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+    patchpoint->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
         AllowMacroScratchRegisterUsage allowScratch(jit);
         exceptionHandle.generate(jit, params, this);
         jit.call(params[params.proc().resultCount(params.value()->type())].gpr(), WasmEntryPtrTag);
@@ -3967,7 +3967,7 @@
 
     emitCheck([&] {
         return Inst(sizeof(IntType) == 4 ? BranchTest32 : BranchTest64, nullptr, Arg::resCond(MacroAssembler::Zero), right, right);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::DivisionByZero);
     });
 
@@ -3990,7 +3990,7 @@
         emitCheck([&] {
             return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), minTmp, negOne);
         },
-        [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitThrowException(jit, ExceptionType::IntegerOverflow);
         });
     }
@@ -4351,7 +4351,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4380,7 +4380,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4409,7 +4409,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4437,7 +4437,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4465,7 +4465,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4494,7 +4494,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4541,7 +4541,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -4569,7 +4569,7 @@
 
     emitCheck([&] {
         return Inst(BranchTest32, nullptr, Arg::resCond(MacroAssembler::NonZero), temp2, temp2);
-    }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+    }, [=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
         this->emitThrowException(jit, ExceptionType::OutOfBoundsTrunc);
     });
 

Modified: trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -642,7 +642,7 @@
     }
 
     if (info.memory) {
-        m_proc.setWasmBoundsCheckGenerator([=] (CCallHelpers& jit, GPRReg pinnedGPR) {
+        m_proc.setWasmBoundsCheckGenerator([=, this] (CCallHelpers& jit, GPRReg pinnedGPR) {
             AllowMacroScratchRegisterUsage allowScratch(jit);
             switch (m_mode) {
             case MemoryMode::BoundsChecking:
@@ -714,7 +714,7 @@
         stackOverflowCheck->appendSomeRegister(framePointer());
         stackOverflowCheck->clobber(RegisterSet::macroScratchRegisters());
         stackOverflowCheck->numGPScratchRegisters = 2;
-        stackOverflowCheck->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+        stackOverflowCheck->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
             const Checked<int32_t> wasmFrameSize = params.proc().frameSize();
             const unsigned minimumParentCheckSize = WTF::roundUpToMultipleOf(stackAlignmentBytes(), 1024);
             const unsigned extraFrameSize = WTF::roundUpToMultipleOf(stackAlignmentBytes(), std::max<uint32_t>(
@@ -949,7 +949,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const64Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -968,7 +968,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), shouldThrow, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -1001,7 +1001,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -1049,7 +1049,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -1071,7 +1071,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -1146,7 +1146,7 @@
 
     B3::Type returnType = toB3ResultType(&signature);
     Value* callResult = createCallPatchpoint(m_currentBlock, origin(), signature, args,
-        scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
+        scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=, this] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
             patchpoint->effects.writesPinned = true;
             patchpoint->effects.readsPinned = true;
             // We need to clobber all potential pinned registers since we might be leaving the instance.
@@ -1157,7 +1157,7 @@
             patchpoint->clobberLate(PinnedRegisterInfo::get().toSave(MemoryMode::BoundsChecking));
 
             patchpoint->append(calleeCode, ValueRep::SomeRegister);
-            patchpoint->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
+            patchpoint->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
                 AllowMacroScratchRegisterUsage allowScratch(jit);
                 handle->generate(jit, params, this);
                 jit.call(params[params.proc().resultCount(returnType)].gpr(), WasmEntryPtrTag);
@@ -1227,7 +1227,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -1248,7 +1248,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -1268,7 +1268,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTableAccess);
         });
     }
@@ -1730,7 +1730,7 @@
     if (accessWidth(op) != B3::Width8) {
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, BitAnd, origin(), pointer, constant(pointerType(), sizeOfAtomicOpMemoryAccess(op) - 1)));
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2057,7 +2057,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, LessThan, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2075,7 +2075,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, LessThan, origin(), resultValue, m_currentBlock->appendNew<Const32Value>(m_proc, origin(), 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsMemoryAccess);
         });
     }
@@ -2280,12 +2280,12 @@
     patch->clobber(RegisterSet::macroScratchRegisters());
 
     patch->append(countDownLocation, ValueRep::SomeRegister);
-    patch->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
+    patch->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams& params) {
         AllowMacroScratchRegisterUsage allowScratch(jit);
         CCallHelpers::Jump tierUp = jit.branchAdd32(CCallHelpers::PositiveOrZero, CCallHelpers::TrustedImm32(TierUpCount::functionEntryIncrement()), CCallHelpers::Address(params[0].gpr()));
         CCallHelpers::Label tierUpResume = jit.label();
 
-        params.addLatePath([=] (CCallHelpers& jit) {
+        params.addLatePath([=, this] (CCallHelpers& jit) {
             tierUp.link(&jit);
 
             const unsigned extraPaddingBytes = 0;
@@ -2356,7 +2356,7 @@
     TierUpCount::TriggerReason* forceEntryTrigger = &(m_tierUp->osrEntryTriggers().last());
     static_assert(!static_cast<uint8_t>(TierUpCount::TriggerReason::DontTrigger), "the JIT code assumes non-zero means 'enter'");
     static_assert(sizeof(TierUpCount::TriggerReason) == 1, "branchTest8 assumes this size");
-    patch->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
+    patch->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams& params) {
         AllowMacroScratchRegisterUsage allowScratch(jit);
         CCallHelpers::Jump forceOSREntry = jit.branchTest8(CCallHelpers::NonZero, CCallHelpers::AbsoluteAddress(forceEntryTrigger));
         CCallHelpers::Jump tierUp = jit.branchAdd32(CCallHelpers::PositiveOrZero, CCallHelpers::TrustedImm32(TierUpCount::loopIncrement()), CCallHelpers::Address(params[0].gpr()));
@@ -2879,7 +2879,7 @@
         m_currentBlock->appendNewControlValue(m_proc, B3::Branch, origin(), isWasmCall, FrequentedBlock(isWasmBlock), FrequentedBlock(isEmbedderBlock));
 
         Value* wasmCallResult = createCallPatchpoint(isWasmBlock, origin(), signature, args,
-            scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
+            scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=, this] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
                 patchpoint->effects.writesPinned = true;
                 patchpoint->effects.readsPinned = true;
                 // We need to clobber all potential pinned registers since we might be leaving the instance.
@@ -2906,7 +2906,7 @@
             Load, pointerType(), origin(), instanceValue(), safeCast<int32_t>(Instance::offsetOfWasmToEmbedderStub(functionIndex)));
 
         Value* embedderCallResult = createCallPatchpoint(isEmbedderBlock, origin(), signature, args,
-            scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
+            scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=, this] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
                 patchpoint->effects.writesPinned = true;
                 patchpoint->effects.readsPinned = true;
                 patchpoint->append(jumpDestination, ValueRep::SomeRegister);
@@ -2937,7 +2937,7 @@
     } else {
 
         Value* patch = createCallPatchpoint(m_currentBlock, origin(), signature, args,
-            scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
+            scopedLambdaRef<void(PatchpointValue*, Box<PatchpointExceptionHandle>)>([=, this] (PatchpointValue* patchpoint, Box<PatchpointExceptionHandle> handle) -> void {
                 patchpoint->effects.writesPinned = true;
                 patchpoint->effects.readsPinned = true;
 
@@ -2989,7 +2989,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, AboveEqual, origin(), calleeIndex, callableFunctionBufferLength));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsCallIndirect);
         });
     }
@@ -3013,7 +3013,7 @@
                     calleeSignatureIndex,
                     m_currentBlock->appendNew<Const64Value>(m_proc, origin(), Signature::invalidIndex)));
 
-            check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+            check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
                 this->emitExceptionCheck(jit, ExceptionType::NullTableEntry);
             });
         }
@@ -3024,7 +3024,7 @@
             CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
                 m_currentBlock->appendNew<Value>(m_proc, NotEqual, origin(), calleeSignatureIndex, expectedSignatureIndex));
 
-            check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+            check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
                 this->emitExceptionCheck(jit, ExceptionType::BadSignature);
             });
         }
@@ -3064,7 +3064,7 @@
     {
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), callee, m_currentBlock->appendNew<Const64Value>(m_proc, origin(), JSValue::encode(jsNull()))));
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::NullReference);
         });
     }
@@ -3227,7 +3227,7 @@
         CheckValue* check = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(),
             m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), right, constant(type, 0)));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::DivisionByZero);
         });
     }
@@ -3240,7 +3240,7 @@
                 m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), left, constant(type, min)),
                 m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), right, constant(type, -1))));
 
-        check->setGenerator([=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
+        check->setGenerator([=, this] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
             this->emitExceptionCheck(jit, ExceptionType::IntegerOverflow);
         });
     }
@@ -3517,7 +3517,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterThan, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
     PatchpointValue* patchpoint = m_currentBlock->appendNew<PatchpointValue>(m_proc, Int32, origin());
@@ -3541,7 +3541,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterEqual, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
     PatchpointValue* patchpoint = m_currentBlock->appendNew<PatchpointValue>(m_proc, Int32, origin());
@@ -3566,7 +3566,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterThan, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
     PatchpointValue* patchpoint = m_currentBlock->appendNew<PatchpointValue>(m_proc, Int32, origin());
@@ -3590,7 +3590,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterThan, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
     PatchpointValue* patchpoint = m_currentBlock->appendNew<PatchpointValue>(m_proc, Int32, origin());
@@ -3614,7 +3614,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterEqual, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
     PatchpointValue* patchpoint = m_currentBlock->appendNew<PatchpointValue>(m_proc, Int64, origin());
@@ -3638,7 +3638,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterThan, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
 
@@ -3682,7 +3682,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterEqual, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
     PatchpointValue* patchpoint = m_currentBlock->appendNew<PatchpointValue>(m_proc, Int64, origin());
@@ -3706,7 +3706,7 @@
         m_currentBlock->appendNew<Value>(m_proc, GreaterThan, origin(), arg, min));
     outOfBounds = m_currentBlock->appendNew<Value>(m_proc, Equal, origin(), outOfBounds, constant(Int32, 0));
     CheckValue* trap = m_currentBlock->appendNew<CheckValue>(m_proc, Check, origin(), outOfBounds);
-    trap->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams&) {
+    trap->setGenerator([=, this] (CCallHelpers& jit, const StackmapGenerationParams&) {
         this->emitExceptionCheck(jit, ExceptionType::OutOfBoundsTrunc);
     });
 

Modified: trunk/Source/_javascript_Core/yarr/YarrJIT.cpp (288084 => 288085)


--- trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -4282,7 +4282,7 @@
         }
 
         if (!m_tryReadUnicodeCharacterCalls.isEmpty()) {
-            m_jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+            m_jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
                 CodeLocationLabel<NoPtrTag> tryReadUnicodeCharacterHelper = linkBuffer.locationOf<NoPtrTag>(m_tryReadUnicodeCharacterEntry);
 
                 for (auto call : m_tryReadUnicodeCharacterCalls)
@@ -4401,7 +4401,7 @@
         }
 
         if (!m_tryReadUnicodeCharacterCalls.isEmpty()) {
-            m_jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
+            m_jit.addLinkTask([=, this] (LinkBuffer& linkBuffer) {
                 CodeLocationLabel<NoPtrTag> tryReadUnicodeCharacterHelper = linkBuffer.locationOf<NoPtrTag>(m_tryReadUnicodeCharacterEntry);
 
                 for (auto call : m_tryReadUnicodeCharacterCalls)

Modified: trunk/Source/WTF/ChangeLog (288084 => 288085)


--- trunk/Source/WTF/ChangeLog	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WTF/ChangeLog	2022-01-17 05:18:06 UTC (rev 288085)
@@ -1,3 +1,16 @@
+2022-01-16  Lauro Moura  <[email protected]>
+
+        Fix C++20 build warnings with GCC
+        https://bugs.webkit.org/show_bug.cgi?id=235023
+
+        Reviewed by Alex Christensen.
+
+        Mostly related to deprecating operations between enums of different
+        types and not capturing this by default in lambdas.
+
+        * wtf/AutomaticThread.cpp: Capture this in lambda.
+        (WTF::AutomaticThread::start):
+
 2022-01-16  David Kilzer  <[email protected]>
 
         [WTF] Add TollFreeBridging.h to Xcode project

Modified: trunk/Source/WTF/wtf/AutomaticThread.cpp (288084 => 288085)


--- trunk/Source/WTF/wtf/AutomaticThread.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WTF/wtf/AutomaticThread.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -170,7 +170,7 @@
     
     Thread::create(
         name(),
-        [=] () {
+        [=, this] () {
             if (verbose)
                 dataLog(RawPointer(this), ": Running automatic thread!\n");
             

Modified: trunk/Source/WebCore/ChangeLog (288084 => 288085)


--- trunk/Source/WebCore/ChangeLog	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebCore/ChangeLog	2022-01-17 05:18:06 UTC (rev 288085)
@@ -1,3 +1,24 @@
+2022-01-16  Lauro Moura  <[email protected]>
+
+        Fix C++20 build warnings with GCC
+        https://bugs.webkit.org/show_bug.cgi?id=235023
+
+        Reviewed by Alex Christensen.
+
+        Mostly related to deprecating operations between enums of different
+        types and not capturing this by default in lambdas.
+
+        * dom/ViewportArguments.h: Replace enum with constexpr ints as they're
+        compared to doubles in various places through ViewportArguments.cpp.
+        * dom/WheelEvent.h: Replace single-valued enum with constexpr
+        variable.
+        * platform/animation/Animation.h: Ditto.
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        Ditto.
+        (WebCore::CoordinatedGraphicsLayer::shouldDirectlyCompositeImage const):
+        * rendering/style/RenderStyleConstants.h: Merge two enums that are
+        used only in the context of being combined to form a third enum.
+
 2022-01-16  Brady Eidson  <[email protected]>
 
         database names leak cross-origin within the same browser session

Modified: trunk/Source/WebCore/dom/ViewportArguments.h (288084 => 288085)


--- trunk/Source/WebCore/dom/ViewportArguments.h	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebCore/dom/ViewportArguments.h	2022-01-17 05:18:06 UTC (rev 288085)
@@ -74,13 +74,11 @@
         CSSDeviceAdaptation
     } type;
 
-    enum {
-        ValueAuto = -1,
-        ValueDeviceWidth = -2,
-        ValueDeviceHeight = -3,
-        ValuePortrait = -4,
-        ValueLandscape = -5
-    };
+    static constexpr int ValueAuto = -1;
+    static constexpr int ValueDeviceWidth = -2;
+    static constexpr int ValueDeviceHeight = -3;
+    static constexpr int ValuePortrait = -4;
+    static constexpr int ValueLandscape = -5;
 
     explicit ViewportArguments(Type type = Implicit)
         : type(type)

Modified: trunk/Source/WebCore/dom/WheelEvent.h (288084 => 288085)


--- trunk/Source/WebCore/dom/WheelEvent.h	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebCore/dom/WheelEvent.h	2022-01-17 05:18:06 UTC (rev 288085)
@@ -32,7 +32,7 @@
 class WheelEvent final : public MouseEvent {
     WTF_MAKE_ISO_ALLOCATED(WheelEvent);
 public:
-    enum { TickMultiplier = 120 };
+    static constexpr int TickMultiplier = 120;
 
     enum {
         DOM_DELTA_PIXEL = 0,

Modified: trunk/Source/WebCore/platform/animation/Animation.h (288084 => 288085)


--- trunk/Source/WebCore/platform/animation/Animation.h	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebCore/platform/animation/Animation.h	2022-01-17 05:18:06 UTC (rev 288085)
@@ -129,7 +129,7 @@
         bool isIdentifier { false };
     };
 
-    enum { IterationCountInfinite = -1 };
+    static constexpr double IterationCountInfinite = -1;
     double iterationCount() const { return m_iterationCount; }
     const Name& name() const { return m_name; }
     Style::ScopeOrdinal nameStyleScopeOrdinal() const { return m_nameStyleScopeOrdinal; }

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (288084 => 288085)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -638,7 +638,7 @@
     if (!image || !image->isBitmapImage())
         return false;
 
-    enum { MaxDimenstionForDirectCompositing = 2000 };
+    static constexpr float MaxDimenstionForDirectCompositing = 2000;
     if (image->width() > MaxDimenstionForDirectCompositing || image->height() > MaxDimenstionForDirectCompositing)
         return false;
 

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (288084 => 288085)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2022-01-17 05:18:06 UTC (rev 288085)
@@ -1073,12 +1073,9 @@
 #endif
 
 static const size_t GridAutoFlowBits = 4;
-enum InternalGridAutoFlowAlgorithm {
+enum InternalGridAutoFlow {
     InternalAutoFlowAlgorithmSparse = 1 << 0,
     InternalAutoFlowAlgorithmDense  = 1 << 1,
-};
-
-enum InternalGridAutoFlowDirection {
     InternalAutoFlowDirectionRow    = 1 << 2,
     InternalAutoFlowDirectionColumn = 1 << 3
 };

Modified: trunk/Source/WebKit/ChangeLog (288084 => 288085)


--- trunk/Source/WebKit/ChangeLog	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebKit/ChangeLog	2022-01-17 05:18:06 UTC (rev 288085)
@@ -1,3 +1,22 @@
+2022-01-16  Lauro Moura  <[email protected]>
+
+        Fix C++20 build warnings with GCC
+        https://bugs.webkit.org/show_bug.cgi?id=235023
+
+        Reviewed by Alex Christensen.
+
+        Mostly related to deprecating operations between enums of different
+        types and not capturing this by default in lambdas.
+
+        * WebProcess/Inspector/WebInspector.cpp: Capture this in lambdas.
+        (WebKit::WebInspector::showConsole):
+        (WebKit::WebInspector::showResources):
+        (WebKit::WebInspector::showMainResourceForFrame):
+        (WebKit::WebInspector::startPageProfiling):
+        (WebKit::WebInspector::stopPageProfiling):
+        (WebKit::WebInspector::startElementSelection):
+        (WebKit::WebInspector::stopElementSelection):
+
 2022-01-16  Cameron McCormack  <[email protected]>
 
         Ensure in flight layer transactions don't accumulate further canvas drawing

Modified: trunk/Source/WebKit/WebProcess/Inspector/WebInspector.cpp (288084 => 288085)


--- trunk/Source/WebKit/WebProcess/Inspector/WebInspector.cpp	2022-01-17 03:56:40 UTC (rev 288084)
+++ trunk/Source/WebKit/WebProcess/Inspector/WebInspector.cpp	2022-01-17 05:18:06 UTC (rev 288085)
@@ -173,7 +173,7 @@
 
     m_page->corePage()->inspectorController().show();
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::ShowConsole(), 0);
     });
 }
@@ -185,7 +185,7 @@
 
     m_page->corePage()->inspectorController().show();
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::ShowResources(), 0);
     });
 }
@@ -203,7 +203,7 @@
 
     String inspectorFrameIdentifier = m_page->corePage()->inspectorController().ensurePageAgent().frameId(frame->coreFrame());
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::ShowMainResourceForFrame(inspectorFrameIdentifier), 0);
     });
 }
@@ -215,7 +215,7 @@
 
     m_page->corePage()->inspectorController().show();
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::StartPageProfiling(), 0);
     });
 }
@@ -227,7 +227,7 @@
 
     m_page->corePage()->inspectorController().show();
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::StopPageProfiling(), 0);
     });
 }
@@ -237,7 +237,7 @@
     if (!m_page->corePage())
         return;
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::StartElementSelection(), 0);
     });
 }
@@ -247,7 +247,7 @@
     if (!m_page->corePage())
         return;
 
-    whenFrontendConnectionEstablished([=] {
+    whenFrontendConnectionEstablished([=, this] {
         m_frontendConnection->send(Messages::WebInspectorUI::StopElementSelection(), 0);
     });
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to