You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #12982, all standalone preg_* except preg_replace_callback route through PregMatchRuntime + PregJitHelper PHP. lib/JIT/Builtin/StringPregMatchStandaloneLlvm.php remains ~1272 LOC with libpcre2-8 external calls — the largest remaining JIT LLVM monolith outside ArrayBuiltinHelper.
Status: blocked for this run — needs dedicated callback-ABI design.
Investigation:StringPregMatchStandaloneLlvm (~1272 LOC) remains solely for __compiler_preg_replace_callback — libpcre2-8 match loop + VM callback invoke at runtime. PregMatchRuntime already routes all other preg_* through PregJitHelper PHP (#12982); only callback form still needs native PCRE + function-pointer ABI.
Blocker:PregJitHelper has no replaceCallbackArgv() yet; VmPregReplaceCallback is VM-only. Embed JIT must invoke compiled user callbacks — JitPregReplaceCallback.php resolves callback to functions['name'] pointer. PHP-bridge path needs nested JIT compile of callback dispatch or thin trampoline preserving current ABI.
Next step: Add PregJitHelper::replaceCallbackArgv() delegating to new VmPregNative::pregReplaceCallback() with match→callback loop in PHP, plus LLVM bridge for callback fn ptr (similar to ArrayMapRuntime closure path). Expect multi-file PR touching VmPregNative, PregMatchRuntime, delete implementReplaceCallbackOnly slice.
Activity
PurHur commentedon Jun 29, 2026
claim: PHP Runtime → PHP — batch (#13736 blocked after #13735 merge)
Status: blocked for this run — needs dedicated callback-ABI design.
Investigation:
StringPregMatchStandaloneLlvm(~1272 LOC) remains solely for__compiler_preg_replace_callback— libpcre2-8 match loop + VM callback invoke at runtime.PregMatchRuntimealready routes all other preg_* throughPregJitHelperPHP (#12982); only callback form still needs native PCRE + function-pointer ABI.Blocker:
PregJitHelperhas noreplaceCallbackArgv()yet;VmPregReplaceCallbackis VM-only. Embed JIT must invoke compiled user callbacks —JitPregReplaceCallback.phpresolves callback tofunctions['name']pointer. PHP-bridge path needs nested JIT compile of callback dispatch or thin trampoline preserving current ABI.Next step: Add
PregJitHelper::replaceCallbackArgv()delegating to newVmPregNative::pregReplaceCallback()with match→callback loop in PHP, plus LLVM bridge for callback fn ptr (similar toArrayMapRuntimeclosure path). Expect multi-file PR touchingVmPregNative,PregMatchRuntime, deleteimplementReplaceCallbackOnlyslice.Ref:
lib/JIT/Builtin/StringPregMatchStandaloneLlvm.php:1249(implementReplaceCallbackOnly)PurHur commentedon Jun 29, 2026
claim: PHP Runtime → PHP — batch (#13736)
php-in-php: route preg_replace_callback through PregJitHelper PHP (#1…
PurHur commentedon Jun 29, 2026
Merged via #13743.
Verification: JIT
preg_replace_callback_jitcompliance green; runtime-shrink unit tests green;make bootstrap-selfhost-vm-driver-execute-probeOK.LOC: deleted
StringPregMatchStandaloneLlvm.php(1272 lines); net −1021 in PR.