[php-src] PR #26065: JIT: Inline array_map, array_filter and usort at the JIT frontend
| From: | highlyprofessionalscum | Date: | Fri, 04 Dec 2026 11:20:20 +0000 |
| Subject: | [php-src] PR #26065: JIT: Inline array_map, array_filter and usort at the JIT frontend | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41413@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/26065
Author: highlyprofessionalscum
## Summary
- Add a JIT frontend path that recognizes straight-line
array_map,
array_filter, and usort icalls and emits native IR loops instead of
DO_ICALL when the call shape, types, and callback are safe.
- Bail out to the existing init_fcall/icall path for strict_types callers,
observers, unsupported callbacks, register-allocated results, and other guarded cases.
- Hook both function JIT and tracing JIT at ZEND_INIT_FCALL; add opcache JIT behavioral
tests for function and tracing modes.
## Test plan
- [ ] Build PHP with opcache/JIT enabled on Windows and Linux
- [ ] run-tests.php ext/opcache/tests/jit/callback_builtin_001.phpt
- [ ] run-tests.php ext/opcache/tests/jit/callback_builtin_002.phpt
- [ ] run-tests.php ext/opcache/tests/jit/callback_builtin_003.phpt
- [ ] Smoke ext/opcache/tests/jit/ for regressions