Skip to content

Zend/zend_execute: minor refactorings (2026-04)#21609

Merged
Girgias merged 6 commits intophp:masterfrom
Girgias:2026-04-zend_execute-refactoring
Apr 13, 2026
Merged

Zend/zend_execute: minor refactorings (2026-04)#21609
Girgias merged 6 commits intophp:masterfrom
Girgias:2026-04-zend_execute-refactoring

Conversation

@Girgias
Copy link
Copy Markdown
Member

@Girgias Girgias commented Apr 2, 2026

Mainly adding const qualifiers and consistently mark error functions as zend_never_inline.
I haven't marked functions that only emit deprecations/warnings as never inline, but maybe they should?

@Girgias Girgias force-pushed the 2026-04-zend_execute-refactoring branch from 74ed96f to 0ec6bd2 Compare April 2, 2026 17:18
@Girgias Girgias marked this pull request as ready for review April 3, 2026 14:54
@Girgias Girgias requested a review from dstogov as a code owner April 3, 2026 14:54
@Girgias Girgias requested a review from iluuu1994 April 6, 2026 13:22
@Girgias Girgias force-pushed the 2026-04-zend_execute-refactoring branch from 0ec6bd2 to 2e21483 Compare April 6, 2026 17:37
@Girgias Girgias requested a review from iluuu1994 April 6, 2026 17:37
Copy link
Copy Markdown
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.

Ok otherwise

Girgias added 6 commits April 13, 2026 15:03
rather than ZEND_COLD zend_never_inline to align the coding style with the rest of the file
Those are never used outside of zend_execute.c so no reason to export them in a header
…zend_never_inline

For consistency with other functions
@Girgias Girgias force-pushed the 2026-04-zend_execute-refactoring branch from 2e21483 to d147fa6 Compare April 13, 2026 14:03
@iluuu1994
Copy link
Copy Markdown
Member

As mentioned privately, I'm unsure about the usefulness of this. Many of these functions are called by other cold functions, sometimes only once, for which outlining is not particularly useful. I also suspect compilers already avoid inlining into non-cold functions anyway, and assume the given branch is cold. Anyway, I don't object.

@Girgias
Copy link
Copy Markdown
Member Author

Girgias commented Apr 13, 2026

I'll merge it just so that we have a consistent code style and we can revise later :)

@Girgias Girgias merged commit d648cc1 into php:master Apr 13, 2026
19 checks passed
@Girgias Girgias deleted the 2026-04-zend_execute-refactoring branch April 13, 2026 18:48
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