Skip to content

chore: rebuild when the module API number changes, and census operand marks - #107

Merged
heyJordanParker merged 1 commit into
masterfrom
chore/build-census-operand-marks
Oct 12, 2026
Merged

heyJordanParker merged 1 commit into
masterfrom
chore/build-census-operand-marks

Conversation

@heyJordanParker

Copy link
Copy Markdown
Owner

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.

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. It reports a write of the operand, its type or one of its members, and SET_UNUSED of 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.md sentence about the rebuild stays in #102, because the guard lets a guarded file change only beside README.md, docs/spec.md and sharp/baseline/spec.

Verification

php sharp/bin/census                         Checked 220 files against the PHP# marks on 36 opcodes and AST kinds.
php sharp/bin/spec --base origin/master      0 entries join sharp/baseline/spec, 0 leave it.

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

sharp/bin/
├── build    reconfigure when Zend/zend_modules.h changes
└── census   op1 and op2 marks: writes and SET_UNUSED reported, type comparisons handle them

… 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
heyJordanParker merged commit 43a5e06 into master Oct 12, 2026
11 checks passed
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
@heyJordanParker
heyJordanParker deleted the chore/build-census-operand-marks branch November 3, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant