Repository navigation
C++ DE_FOR_EACH*/DE_FOR_OBSERVERS/DE_NOTIFY* macro statements are not functions; re-bless DOOM-rosetta (Part of #5630) - #6756
Conversation
… functions; re-bless DOOM-rosetta (Part of #5630) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No description provided. |
|
PR #6756 @ b048c23: 1 failed check(s) == shard 1 (1669449 LOC) (failure) -- real |
|
No description provided. |
Part of #5630 (slice 3).
doomsday's
DE_FOR_EACH*(T, i, c),DE_FOR_OBSERVERS(i, a)andDE_NOTIFY*(Name, i)take a body likefor.func_startread each as a function named for the macro, so the enclosing function lost the body's calls. A name shield (cpp.py, item 5 offunc_start) now refuses them; the body stays in the caller. The call-graph oracle read the same macro as a tree-sitter nested definition and credited the calls to it, so it now treats it as a statement of its function (MACRO_STATEMENT).Class / Sibling gaps
Class: C++ macro-statement loops/dispatch that take a body, in the doomsday vocabulary found in the corpus (counted over all DOOM ports).
DE_FOR_EACH,DE_FOR_EACH_CONSTDE_FOR_EACH_REVERSE,DE_FOR_EACH_CONST_REVERSEDE_FOR_OBSERVERSDE_NOTIFY,DE_NOTIFY_VARDE_NOTIFY_PUBLIC,DE_NOTIFY_PUBLIC_VARAGOBJECT_FOREACH_CHILD(1 hit, another project's macro)*FOREACH*statement macros needs a different mechanism (risk of hiding real macro-defined functions)case MAKE_ID('..'):labels read as functionsRemaining slices: other macro-statement vocabularies (non-DE_) as the corpus shows them.
Evidence
cpp.pychange reproduces the committed baseline exactly. Only doomsday moved incallgraph_baseline.json.crucible_check.py, both legs): zero diff, nothing to bless.pr_gates --fast9/9,--ratchets9/9 (0 skipped).test_callgraph_oracle.py) and newtest_cpp_macro_statement_loop_5630.py(10 macro forms plus aDE_NOTIFYfoostill-a-function guard).DOOM-rosetta re-bless
tests/golden_doom_rosetta/was never re-blessed after #6754 (DOOM-rosetta run 40411624531 red).doom_rosetta_check.py --update --yesrewrote edge-classic, odamex, gzdoom, eternity and doomsday. The func_hash drift on edge-classic, odamex, gzdoom and eternity is pre-existing, #6754's (not separated by a control run; those ports hold noDE_macros). doomsday's 247 file changes are this change's.File-cap exception: the 5
tests/golden_doom_rosetta/*.json.gzfiles are regenerated bydoom_rosetta_check.py --update --yes(the owner-requested re-bless), not hand-written; the 4 hand-written files are below the cap.Hand-written files: 4 (
cpp.py,callgraph_oracle.py, two tests). Goldens and the baseline are regenerated.🤖 Generated with Claude Code