Category
php-in-php · php-src-strict
Problem
strrchr() JIT still calls libc via lookupFunction('strrchr') in ext/standard/JitStrrchr.php; VM SSOT is VmString::strrchr(). Sibling readlink() already uses ReadlinkJitHelper + StringReadlink PHP bridges (#15353).
php-src reference
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/compliance/cases/stdlib/strrchr.phpt
php bin/jit.php test/compliance/cases/stdlib/strrchr_jit.phpt'
Implementation (PHP-in-PHP)
ext/standard/StrrchrJitHelper.php — delegate to VmString::strrchr()
lib/JIT/Builtin/StringStrrchr.php — LLVM bridge (__phpc_jit_strrchr)
- Shrink
ext/standard/JitStrrchr.php to thin wrapper (drop libc strrchr + manual slice)
- Compliance guards exist (
strrchr.phpt, strrchr_jit.phpt)
Done when
Related
Category
php-in-php· php-src-strictProblem
strrchr()JIT still calls libc vialookupFunction('strrchr')inext/standard/JitStrrchr.php; VM SSOT isVmString::strrchr(). Siblingreadlink()already usesReadlinkJitHelper+StringReadlinkPHP bridges (#15353).php-src reference
PHP_FUNCTION(strrchr)Repro
Implementation (PHP-in-PHP)
ext/standard/StrrchrJitHelper.php— delegate toVmString::strrchr()lib/JIT/Builtin/StringStrrchr.php— LLVM bridge (__phpc_jit_strrchr)ext/standard/JitStrrchr.phpto thin wrapper (drop libcstrrchr+ manual slice)strrchr.phpt,strrchr_jit.phpt)Done when
strrchrinJitStrrchr.phpStrrchrRuntimeShrinkTest+ spine bundle includes helperRelated