Language: declare(ticks=N) braced statement cadence (#22840)#22867
Merged
Conversation
PurHur
added a commit
that referenced
this pull request
Jul 24, 2026
…0533) (#22873) Post-#22866 merges moved live lowering_source_fingerprint to 0859c4ca… while the committed stamp stayed at 9aee9361…, redding north-star5-verify-fast step 4f-m and user_release_ready. Restamp only; honest verified-fresh remains on #22642/#22717. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parseStmt_Declarenow parses braceddeclare(ticks=N) { … }bodies and emitsLeaveTickIntervalso the tick interval restores after the block (previously the body was dropped — under-fire).TYPE_TICKSbefore tickable CFG statements whileCG(declarables).ticks-equivalent compile state is active; VM runs tick callbacks only on that opcode (Zend statement cadence, not per-opcode).n=3/n2=2matched on VM.Closes #22840
php-src reference
Zend/zend_execute_API.c— tick handlersZend/zend_compile.c—declare(ticks=N)/ declarables.ticksPHP implementation
patches/overlays/php-cfg/Op/Terminal/{SetTickInterval,LeaveTickInterval}.php+script/apply-patches.shlib/Compiler.php(TYPE_TICKS, scoped ENTER)lib/VM.php(TYPE_TICKS→maybeRunTick)Test plan
test/compliance/cases/language/declare_ticks_statement_cadence.phptdeclare_ticks/register_tick_functioncomplianceVerification
Pillar note: host
release-readinessstill hasnorth-star5-fastred via #22642 gen-0 fingerprint (pre-existing); this PR is language/VM-only.Made with Cursor