Repository navigation
C++ IFVM/IFVIRTUAL* macro blocks are statements, not functions; re-bless DOOM-rosetta (Part of #5630) - #6760
Merged
Merged
Conversation
#5630) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… macro blocks (Part of #5630) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
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.
Part of #5630 (slice 2 of 4: gzdoom
miss:statement).What
gzdoom's scripting-call macros
IFVM,IFVIRTUAL,IFVIRTUALPTR,IFVIRTUALPTRNAME,IFOVERRIDENVIRTUALPTRNAME(vm.h) open a block likeif(IFVIRTUALPTRNAME(act, "Cls", Fn) { VMCall(func, ..); }). The C++func_startrule read each as a function named for the macro (210 of them in gzdoom), so the enclosing function lost the block's calls (VMCall,IntAt,Destroy, ...): 84 oraclemiss:statementedges.cpp.py: the "not a function" shield now excludes these macro names (whole identifier only;IFVMx,IFVIRTUALSstay functions).callgraph_oracle.py: tree-sitter also reads the block as a nested definition, soMACRO_STATEMENT(added forDE_*in C++ DE_FOR_EACH*/DE_FOR_OBSERVERS/DE_NOTIFY* macro statements are not functions; re-bless DOOM-rosetta (Part of #5630) #6756) now covers them, otherwise the oracle credited the calls to a nested function and scored them engine-onlyabsent(19 -> 280 before the oracle change).test_cpp_vm_call_macro_5630.py(5 macros + negative; 5 of 6 fail without the fix),test_callgraph_oracle.py.Measured (gzdoom, scans at the PR head)
miss:statementtypetypeedges (unscored kind) from the functions that now keep the block's constructor-style calls. Every other port's baseline numbers are unchanged; consensus unchanged (holes 321, engine missed 2).File-cap exception: 4 hand-written files (cpp.py, the new test, callgraph_oracle.py, test_callgraph_oracle.py); the other 4 flagged files are regenerated
tests/golden_doom_rosetta/*.json.gzgoldens (blessed bydoom_rosetta_check.py --update --yes, never hand-edited).Gates
pr_gates.py --fast9/9;--ratchets9 pass / 0 fail / 0 skipped (before the main merge; merged main only for a conflict indoomsday.json.gz, re-blessed).crucible_check.py --update --yes(golden-lock, both legs): no drift (the language-crucible has none of these macros).doom_rosetta_check.py --update --yes: gzdoom 47 changes (38 file, summary), odamex 2, doom3-bfg 1, doomsday 3 (callgraph summary only, plus the macro functions gone); after the main merge only doomsday re-moved (2 summary).test_callgraph_oracle.py+ new test: 315 passed.callgraph_baseline.jsonregenerated (gzdoom counts,engine_sha).Class / Sibling gaps
Class: a C++ statement macro that takes a block, read by the engine as a function and so stealing its body's calls from the caller. Handled here: the five gzdoom VM-call macros (all that
vm.hdefines; each has a test case). Checked: the other all-caps "functions" in the gzdoom scan areDEFINE_ACTION_FUNCTION*(real definitions) and expression macros (RGB,MTOF...), not block statements.Remaining gzdoom
miss:statement(16, a different mechanism, no engine change in this PR):x.~Node(),~FString,~player_t(13): the engine does not record a destructor call as a call to the class's destructor; needs a decision on the credited name (~XvsX::~X).Printfinpngtexture.cpp(1),~VMFunctioninvm.h(1),~DrawerCommandinr_thread.cpp(1): same destructor-call family or per-edge reading.STRINGBUILDER_START/FINISH(1 each).Remaining slices
absentedges (read first, engine or oracle). 3. libclang C-subset reference. 4. gzdoom explicit-destructor-call edges (above).🤖 Generated with Claude Code