Repository navigation
C++ a default-argument call in a parameter list is not a call of the unit; re-bless doomsday, eternity, odamex, godot (Part of #6266) - #6773
Conversation
…unit (WIP, Part of #6266) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rgument calls (Part of #6266) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
| angle = max(angle - 1, 0) | ||
| elif ch == "=" and not angle and text[i - 1] not in "=!<>" and text[i + 1 : i + 2] != "=": | ||
| start = i | ||
| elif depth == 1 and ch == "," and start >= 0 and not angle: |
| elif depth == 1 and ch == "," and start >= 0 and not angle: | ||
| spans.append((start, i)) | ||
| start = -1 | ||
| elif depth == 1 and start >= 0 and ch == "<": |
| start = -1 | ||
| elif depth == 1 and start >= 0 and ch == "<": | ||
| angle += 1 | ||
| elif depth == 1 and start >= 0 and ch == ">" and angle: |
|
No description provided. |
|
PR #6773 @ 311116a: 1 failed check(s) == measure (shard 1/2) (failure) -- real |
|
PR #6773 @ 311116a: 1 failed check(s) == measure (shard 1/2) (failure) -- real |
Part of #6266 (Track D: finish the DOOM call-graph study).
What changed
Engine fix. A C++ default argument is evaluated at the caller, so a call written in a unit's parameter list is not a call of the unit.
ActionItem(..., RefArg<Action> a = RefArg<Action>())recordedActionItem -> RefArg;Status(..., const Time &t = Time::invalidTime())recordedStatus -> invalidTime;List mid(size_t c = std::numeric_limits<size_t>::max())recordedmid -> max. The oracle (tree-sitter body walk) never sees them, so each was a scored "absent" engine-only edge.gitgalaxy/core/detector.py:_default_arg_spansfinds each top-level= exprof the first parameter list (skippingoperator()), and the C++ call loop skips a callee inside one. C++ only (C has no defaults). Test:tests/extraction/languages/test_calls_out_default_arg_6266.py, one case per shape (inline ctor with a template default, namespaced call default, template-comma default plus a later default, out-of-line definition) and three that must stay calls (body call,operator()with a default, function-pointer parameter).Moves (goldens re-blessed;
callgraph_baseline.jsonentries for the 3 moved ports regenerated)Crucible: one function-hash drift,
cpp/godot/rendering_server_default.h, with itscalls_out_toand LLM-brief lines (both fixtures, blessed viagolden-lock.sh crucible_check.py --update --yes). No port reaches 0/0, somanifest.csvexpected_failsis unchanged.Class / Sibling gaps
Class: a call expression in a function's declaration (not body) read as a call of the unit. Handled here: C++ default arguments. Siblings, each needing a different mechanism:
def f(a=g()), Kotlin, C# optional params, JS): not measured here; check each port's engine-only list.operator String() constread as a call toString(doomsday, 11 rows): engine, needs the operator-name rule in the call loop.d(new Impl(this))->Impl(doomsday AboutDialog etc.): oracle/engine boundary,newof a class is atypecall.PackagesWidget -> GuiWidget,idStrStatic -> idStr), inline-body member reads (PPTexture -> Data): engine.DE_PIMPLmacro classes (doomsday, ~15 rows of the remaining scored edges + 1085 misses earlier).HWR_RenderPlane/libd_drawString(9+5 rows, one function each, long body, other mechanism).Burned-estate programs needing each: none (these are DOOM-port C++ sources, not COBOL).
Remaining slices
Next largest scored shape: doomsday
operator X()conversion operators (11), then base-class initializer-list names (~8),DE_PIMPLbodies; doomsday misses 59 (after-operator 8, nested-argument 8, statement 10, unparsed 15).Gates
pr_gates --fast9/9,--ratchets9/9 (viaheavy-run.sh), tree-wide guards +tests/tools/doom_speedrun: 272 pass.git merge-treevs origin/main: clean. Fresh scans of the 7 C++ ports at this HEAD;doom_rosetta_check.pyon the whole manifest differed only on the three blessed ports.Checklist: partial [c:9e7fe6a3] -- C++ default-argument class fixed; conversion-operator, initializer-list, DE_PIMPL and remaining oracle classes are left
🤖 Generated with Claude Code