Skip to content

Zend/Optimizer/block_pass.c: remove code disabled with #if 0#21791

Open
DanielEScherzer wants to merge 1 commit intophp:masterfrom
DanielEScherzer:block_pass-dead-code
Open

Zend/Optimizer/block_pass.c: remove code disabled with #if 0#21791
DanielEScherzer wants to merge 1 commit intophp:masterfrom
DanielEScherzer:block_pass-dead-code

Conversation

@DanielEScherzer
Copy link
Copy Markdown
Member

It has been that way since the initial public release of the optimizer in 528006a and survived through the merging as ext/opcache (34d3202) and then moving it into core (#6642). If it hasn't been needed in the last 13 years, should be safe to drop.

It has been that way since the initial public release of the optimizer in
528006a and survived through the merging as
ext/opcache (34d3202) and then moving it into
core (php#6642). If it hasn't been needed in the last 13 years, should be safe to
drop.
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.

We have @compile-time-eval for this purpose now. Though none of these functions actually are marked as such.

@DanielEScherzer
Copy link
Copy Markdown
Member Author

We have @compile-time-eval for this purpose now. Though none of these functions actually are marked as such.

@compile-time-eval is for functions that can always be called at compile time, these can't be always called at compile time, only if the constant is defined/extension is loaded/etc.

But, it looks like these are all handled at

zend_result zend_optimizer_eval_special_func_call(

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