Skip to content

JIT: Record fake init calls for subtraces (fixes array_map optimization) - #23450

Open
arnaud-lb wants to merge 1 commit into
php:masterfrom
arnaud-lb:array-map-opt-loop-call
Open

JIT: Record fake init calls for subtraces (fixes array_map optimization)#23450
arnaud-lb wants to merge 1 commit into
php:masterfrom
arnaud-lb:array-map-opt-loop-call

Conversation

@arnaud-lb

@arnaud-lb arnaud-lb commented Aug 25, 2026

Copy link
Copy Markdown
Member

The array_map optimization may emit loops inside an INIT_FCALL-DO_FCALL sequence, which was not possible before. JIT doesn't expect that and forgets about pending calls when starting a subtrace for the loop.

Fix by recording fake init calls in zend_jit_trace_subtrace().

Blocks #23254

The array_map optimization may emit loops inside an INIT_FCALL-DO_FCALL
sequence, which was not possible before. JIT doesn't expect that and forgets
about pending calls when starting a subtrace for the loop.

Fix by recording fake init calls in zend_jit_trace_subtrace().
@arnaud-lb
arnaud-lb marked this pull request as ready for review August 25, 2026 14:07
@arnaud-lb
arnaud-lb requested a review from dstogov as a code owner August 25, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant