Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4a3ab620c332b169ab7a2487a0e3100fd12d68ca
      
https://github.com/WebKit/WebKit/commit/4a3ab620c332b169ab7a2487a0e3100fd12d68ca
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    A JSTests/microbenchmarks/regexp-deep-nested-paren-context.js
    M Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
    M Source/JavaScriptCore/yarr/YarrJIT.cpp

  Log Message:
  -----------
  [YARR] Use loop for massive save and restore of subpattern captures
https://bugs.webkit.org/show_bug.cgi?id=319528
rdar://182353166

Reviewed by Yijia Huang.

We observed that significant bloating of JIT code when YarrJIT is having
huge amount of nested paren contexts. The reason is that we need to save
and restore state, and it becomes sequence of store / load, and
generating entire code sequentially and making code size large. This
patch adds a threshold and generating a loop when it exceeds a
threshold. We use newly introduced regT3 to cleanly and efficiently do this.

Test: JSTests/microbenchmarks/regexp-deep-nested-paren-context.js

* JSTests/microbenchmarks/regexp-deep-nested-paren-context.js: Added.
(ipv6):
(0.9.1.9.0.9.1.0.9.0.9.2.0.4.0.9.25.0.5):
* Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::transfer64):
(JSC::MacroAssemblerARM64::transferPair64):
* Source/JavaScriptCore/yarr/YarrJIT.cpp:

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



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

Reply via email to