Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b23dfb2b0212faead661a312fa02e40775838b88
      
https://github.com/WebKit/WebKit/commit/b23dfb2b0212faead661a312fa02e40775838b88
  Author: Keith Miller <[email protected]>
  Date:   2026-02-23 (Mon, 23 Feb 2026)

  Changed paths:
    M Source/JavaScriptCore/b3/B3Effects.h
    M Source/JavaScriptCore/b3/B3LowerMacros.cpp
    M Source/JavaScriptCore/b3/B3Procedure.cpp
    M Source/JavaScriptCore/b3/B3Procedure.h
    M Source/JavaScriptCore/b3/B3StackmapGenerationParams.cpp
    M Source/JavaScriptCore/b3/B3StackmapGenerationParams.h
    M Source/JavaScriptCore/b3/B3StackmapSpecial.cpp
    M Source/JavaScriptCore/b3/B3StackmapSpecial.h
    M Source/JavaScriptCore/b3/B3StackmapValue.h
    M Source/JavaScriptCore/b3/B3ValueRep.cpp
    M Source/JavaScriptCore/b3/B3ValueRep.h
    M 
Source/JavaScriptCore/b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp
    M Source/JavaScriptCore/b3/air/AirAllocateRegistersAndStackAndGenerateCode.h
    M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
    M Source/JavaScriptCore/b3/air/AirCCallSpecial.cpp
    M Source/JavaScriptCore/b3/air/AirCCallSpecial.h
    M Source/JavaScriptCore/b3/air/AirCode.cpp
    M Source/JavaScriptCore/b3/air/AirCode.h
    M Source/JavaScriptCore/b3/air/AirCustom.cpp
    M Source/JavaScriptCore/b3/air/AirFixPartialRegisterStalls.cpp
    M Source/JavaScriptCore/b3/air/AirHandleCalleeSaves.cpp
    M Source/JavaScriptCore/b3/air/AirHandleCalleeSaves.h
    M Source/JavaScriptCore/b3/air/AirInst.h
    M Source/JavaScriptCore/b3/air/AirInstInlines.h
    M Source/JavaScriptCore/b3/air/AirLowerAfterRegAlloc.cpp
    M Source/JavaScriptCore/b3/air/AirPrintSpecial.cpp
    M Source/JavaScriptCore/b3/air/AirPrintSpecial.h
    M Source/JavaScriptCore/b3/air/AirSpecial.h
    M Source/JavaScriptCore/b3/air/AirTmpWidth.cpp
    M Source/JavaScriptCore/b3/air/testair.cpp
    M Source/JavaScriptCore/b3/testb3_3.cpp
    M Source/JavaScriptCore/b3/testb3_4.cpp
    M Source/JavaScriptCore/b3/testb3_5.cpp
    M Source/JavaScriptCore/b3/testb3_6.cpp
    M Source/JavaScriptCore/b3/testb3_7.cpp
    M Source/JavaScriptCore/b3/testb3_8.cpp
    M Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.cpp
    M Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.h
    M Source/JavaScriptCore/bytecode/CodeBlock.h
    M Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp
    M Source/JavaScriptCore/bytecode/StructureStubInfo.cpp
    M Source/JavaScriptCore/dfg/DFGJITCode.cpp
    M Source/JavaScriptCore/dfg/DFGJITCode.h
    M Source/JavaScriptCore/dfg/DFGOSREntry.cpp
    M Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp
    M Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.h
    M Source/JavaScriptCore/dfg/DFGRegisterBank.h
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
    M Source/JavaScriptCore/ftl/FTLJITCode.cpp
    M Source/JavaScriptCore/ftl/FTLJITCode.h
    M Source/JavaScriptCore/ftl/FTLLazySlowPath.cpp
    M Source/JavaScriptCore/ftl/FTLLazySlowPath.h
    M Source/JavaScriptCore/ftl/FTLLocation.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
    M Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
    M Source/JavaScriptCore/ftl/FTLSaveRestore.cpp
    M Source/JavaScriptCore/ftl/FTLSlowPathCall.cpp
    M Source/JavaScriptCore/ftl/FTLSlowPathCall.h
    M Source/JavaScriptCore/ftl/FTLThunks.cpp
    M Source/JavaScriptCore/interpreter/InterpreterInlines.h
    M Source/JavaScriptCore/jit/AssemblyHelpers.cpp
    M Source/JavaScriptCore/jit/AssemblyHelpers.h
    M Source/JavaScriptCore/jit/CCallHelpers.cpp
    M Source/JavaScriptCore/jit/CCallHelpers.h
    M Source/JavaScriptCore/jit/CallFrameShuffleData.cpp
    M Source/JavaScriptCore/jit/CallFrameShuffler.cpp
    M Source/JavaScriptCore/jit/JITCall.cpp
    M Source/JavaScriptCore/jit/JITCode.cpp
    M Source/JavaScriptCore/jit/JITCode.h
    M Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp
    M Source/JavaScriptCore/jit/JITInlineCacheGenerator.h
    M Source/JavaScriptCore/jit/JITPropertyAccess.cpp
    M Source/JavaScriptCore/jit/RegisterAtOffsetList.cpp
    M Source/JavaScriptCore/jit/RegisterSet.cpp
    M Source/JavaScriptCore/jit/RegisterSet.h
    M Source/JavaScriptCore/jit/SimpleRegisterAllocator.h
    M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
    M Source/JavaScriptCore/lol/LOLJIT.h
    M Source/JavaScriptCore/lol/LOLRegisterAllocator.h
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT64.h
    M Source/JavaScriptCore/wasm/WasmCallingConvention.cpp
    M Source/JavaScriptCore/wasm/WasmCallingConvention.h
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.cpp
    M Source/JavaScriptCore/wasm/WasmThunks.cpp
    M Source/JavaScriptCore/wasm/js/JSToWasm.cpp

  Log Message:
  -----------
  [JSC] Merge RegisterSetBuilder into RegisterSet
https://bugs.webkit.org/show_bug.cgi?id=308395
rdar://170884748

Reviewed by Yusuke Suzuki.

This patch eliminates the RegisterSetBuilder class by merging its API
into RegisterSet. As I understand it, RegisterSetBuilder was added when
we were adding SIMD support to help catch places where we meant to use a
vector bit width but didn't. To that end there were some
`ASSERT(m_bits.count() >= m_upperBits.count())` checks that I believe
were intended to check that the m_bits were a superset of the
m_upperBits. The actual ASSERT is sorta meaningless though since it's
very easy to get a false positive.

  The key changes in this patch are:

  - All RegisterSetBuilder methods (filter, exclude, merge,
    forEachWithWidthAndPreserved, static factories, etc.) are folded
    into RegisterSet. RegisterSetBuilder is deleted entirely.

  - buildAndValidate() calls are removed -- callers use RegisterSet
    directly. buildWithLowerBits() is replaced by an explicit
    normalizeWidths() method that merges upperBits into bits as that's
    what buildWithLowerBits() did already.

  - buildScalarRegisterSet() is renamed to toScalarRegisterSet().

  - RegisterSetBuilderHash is renamed to ScalarRegisterSetHash. It was
    only used for ScalarRegisterSet anyway.

  - registersToSaveForJSCall/registersToSaveForCCall now take and return
    RegisterSet instead of RegisterSetBuilder.

  - The ASSERTs that checked m_bits.count() >= m_upperBits.count()
  are
    removed. As mentioned above, these didn't make sense because the two
    counts are independent.

  - Add forEach, merge, filter, exclude, subsumes, isEmpty, methods as
    well as iterator support to ScalarRegisterSet giving it roughly the
    same API as RegisterSet.

  - GPR-only operations (e.g. adding a GPRReg) get overloads that don't
    require the IgnoreVectorsTag since vectors are irrelevant for scalar
    GPR operations. The IgnoreVectorsTag parameter is made optional
    (defaulted) in ScalarRegisterSet as well, since it has no upper bits
  to
    track. The tag still exists for template code that needs to work
    uniformly with either RegisterSet or ScalarRegisterSet.

All of the non-rename changes are in RegisterSet.h/cpp

No new tests, covered by existing tests.

Canonical link: https://commits.webkit.org/308063@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to