Skip to content

Zend: Lazy objects minor refactorings - #23998

Merged
Girgias merged 6 commits into
php:masterfrom
Girgias:2026-09-lazy-objects-nits
Sep 30, 2026
Merged

Girgias merged 6 commits into
php:masterfrom
Girgias:2026-09-lazy-objects-nits

Conversation

@Girgias

@Girgias Girgias commented Sep 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@Girgias
Girgias requested a review from arnaud-lb September 29, 2026 17:32
@Girgias
Girgias marked this pull request as ready for review September 30, 2026 14:43
@Girgias
Girgias merged commit ad25a5f into php:master Sep 30, 2026
16 of 18 checks passed
@Girgias
Girgias deleted the 2026-09-lazy-objects-nits branch September 30, 2026 14:44
/* }}} */

void reflection_class_new_lazy(INTERNAL_FUNCTION_PARAMETERS,
static zend_always_inline void reflection_class_new_lazy(INTERNAL_FUNCTION_PARAMETERS,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this is a good idea, and you have to be careful doing such changes without measuring.
Marking things inline makes code locality and code size worse. This is a simple pass-through function shared by four callers... Does it really need specialization wrt is_reset? Doubtful. Does it need specialization wrt strategy? Certainly not.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll revert that bit then, I saw that it was not used elsewhere, and so thought inlining for the different calls made sense. But I guess leaving that choice to the compiler is also sensible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in c6f3b2a :)

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