Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1def424e4f3b3df95e4e2c3dfcecbbe3531ae06e
      
https://github.com/WebKit/WebKit/commit/1def424e4f3b3df95e4e2c3dfcecbbe3531ae06e
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    A JSTests/stress/regexp-boyer-moore-simd-begin-index.js
    A JSTests/stress/regexp-skip-until-bit-in-table-edge-cases.js
    A JSTests/stress/regexp-skip-until-bit-in-table-simd.js
    M Source/JavaScriptCore/assembler/ARM64Assembler.h
    M Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
    M Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp
    M Source/JavaScriptCore/yarr/YarrJIT.cpp

  Log Message:
  -----------
  [YARR] Implement BitInTable SIMD search in RegExp
https://bugs.webkit.org/show_bug.cgi?id=307604
rdar://170186063

Reviewed by Keith Miller.

This patch implements V8's SkipUntilBitInTable optimization in YarrJIT
as well. Basically what it is doing is pretty much SIMD version of
BoyerMoore search which we already have as a scalar version. We
spread BoyerMoore Bitmap into a vector register and bulk compare (for
each 16 characters) to detect potential matching candidate so we can
walk the characters with 16 characters stride.

Currently, it is enabled only when Char8 size, and only when stride is 1.
This *stride* means that BM search's stride we already have (we are
collecting pattern information, and we can say "when this bitmap does
not match, we can skip N characters"). Because this larger stride can be
really efficient, we are currently using our SIMD search only when
stride is 1.

We also fixed a bug in A64DOpcode, we strip the upper bits for dump when
the value looks like a pointer (because of PAC tag). But this makes it
hard to read. So let's just dump the full content regardless.

Tests: JSTests/stress/regexp-skip-until-bit-in-table-edge-cases.js
       JSTests/stress/regexp-skip-until-bit-in-table-simd.js

* JSTests/stress/regexp-boyer-moore-simd-begin-index.js: Added.
(testBoyerMooreSIMDBeginIndex):
* JSTests/stress/regexp-skip-until-bit-in-table-edge-cases.js: Added.
(shouldBe):
(testCaseInsensitive):
(testNibbleBoundaries):
(testLongStrings):
(testMultipleCharClasses):
(testSpecialCharsInString):
(testExec):
(testMatch):
(testReplace):
(testNoFalsePositives):
* JSTests/stress/regexp-skip-until-bit-in-table-simd.js: Added.
(shouldBe):
(testCharacterClass):
(testBoundaries):
(testAllCandidates):
(testLongerPatterns):
(stressTest):
(testRegexDnaPatterns):
* Source/JavaScriptCore/assembler/ARM64Assembler.h:
* Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::vectorUshrInt8):
(JSC::MacroAssemblerARM64::vectorTest):
(JSC::MacroAssemblerARM64::vectorShrnInt8):
* Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp:
(JSC::ARM64Disassembler::A64DOpcode::maybeAnnotateBuiltConstant):
* Source/JavaScriptCore/yarr/YarrJIT.cpp:

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



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

Reply via email to