Skip to content

Refactor op array loops in JIT #19335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2025
Merged

Conversation

nielsdos
Copy link
Member

Reuse the helper zend_foreach_op_array() that we move to the zend_optimizer.h header to be usable in opcache.
Note that applying this to other op_array loops is not easy because they either:

  • start from EG(persistent_classes_count)
  • or only apply to classes

Reuse the helper zend_foreach_op_array() that we move to the
zend_optimizer.h header to be usable in opcache.
Note that applying this to other op_array loops is not easy because they either:
- start from EG(persistent_classes_count)
- or only apply to classes
@nielsdos nielsdos marked this pull request as ready for review July 31, 2025 19:55
@nielsdos nielsdos requested a review from dstogov as a code owner July 31, 2025 19:55
@nielsdos nielsdos requested a review from iluuu1994 July 31, 2025 19:55
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that applying this to other op_array loops is not easy because they either:

  • or only apply to classes

We could solve that part by simply splitting out that section of zend_foreach_op_array() into zend_foreach_method(). But for now this looks fine, given we can't use it for preload_link(), at least without complicating the API further.

@nielsdos nielsdos merged commit 15990de into php:master Jul 31, 2025
9 checks passed
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.

2 participants