Repository navigation
chore: rebuild when the module API number changes, and census operand marks - #107
Merged
Merged
Conversation
… marks Problem: the generics slice (#102) needs two tooling changes, and the spec guard lets the files in sharp/bin/ change only in a pull request of their own. - sharp/bin/build reruns configure only when configure.ac, an m4 file, a Makefile fragment or the Dockerfile changes. configure reads ZEND_MODULE_API_NO from Zend/zend_modules.h into the extension directory, so a raised number left a build that loads no extension from the old directory. - sharp/bin/census registers marks only in attr, extended_value and ce_flags. The generics slice marks op1 and op2 of its opcodes, and a write of one of those operands would drop the mark unseen. Solution: sharp/bin/build also reruns configure when Zend/zend_modules.h is newer than config.status. sharp/bin/census reads op1 and op2 entries from the register, and reports a write of an operand, its type or a member, and SET_UNUSED of it. A comparison of the operand's type handles the rest of its case or block. On master the register has no operand entries, and the census passes: "Checked 220 files against the PHP# marks on 36 opcodes and AST kinds." #102 keeps the sharp/README.md sentence about the rebuild, since a guarded file changes beside only README.md, docs/spec.md and sharp/baseline/spec. sharp/bin/ ├── build reconfigure when Zend/zend_modules.h changes └── census op1 and op2 marks: writes and SET_UNUSED reported, type comparisons handle them
heyJordanParker
added a commit
that referenced
this pull request
Oct 12, 2026
Problem: master moved 8 commits past the branch: the #106 spec rulings and the #107 merge. The branch's sharp/bin/build and sharp/bin/census already match master, but its docs/spec.md and sharp/baseline/spec do not. Solution: merge origin/master with no rebase. docs/spec.md merged cleanly. sharp/baseline/spec conflicted on the two examples master added as failing, §12 index-changes and §12 index-rules, which the branch's baseline lacked. The merge keeps both lines. The re-pin's spec run decides whether they still fail. docs/spec.md master's rulings, merged without conflict sharp/baseline/spec master's two new §12 lines kept
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.
Problem
The generics slice (#102) needs two tooling changes, and the spec guard lets a file in
sharp/bin/change only in a pull request of its own.sharp/bin/buildrerunsconfigureonly whenconfigure.ac, anm4file, a Makefile fragment orsharp/docker/Dockerfilechanges.configurereadsZEND_MODULE_API_NOfromZend/zend_modules.hinto the extension directory. feat: PHP# generics, checked and carried at runtime (spec section 11, R1 to R5) #102 raises that number, so an existing build kept the old directory and loaded no extension.sharp/bin/censusregisters marks only inattr,extended_valueandce_flags. feat: PHP# generics, checked and carried at runtime (spec section 11, R1 to R5) #102 marksop1andop2of its opcodes, and a write of one of those operands would drop the mark without the census seeing it.Solution
sharp/bin/buildalso rerunsconfigurewhenZend/zend_modules.his newer thanconfig.status.sharp/bin/censusreadsop1andop2entries from the register. It reports a write of the operand, its type or one of its members, andSET_UNUSEDof it. A comparison of the operand's type handles the rest of its case or block, since the code then tells the operand's forms apart.The
sharp/README.mdsentence about the rebuild stays in #102, because the guard lets a guarded file change only besideREADME.md,docs/spec.mdandsharp/baseline/spec.Verification
On master the register has no operand entries, so the census reports nothing new. #102's register adds them, and its census runs clean on every CI run of #102.
Files