Repository navigation
call-graph accuracy: dart reader sees initializer lists and const callees (Part of #6454) - #6550
Merged
Merged
Conversation
…nd names const callees (Part of #6454) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
5 of 6 tasks
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 #6454 (siblings of #3799).
Checklist: done [c:a678bf65]
Checklist: done [c:7167e1ad]
What changed
f<T>(x)(c:a678bf65): already fixed by Dart calls_out: generic invocations f<T>(x) and nullable type arguments (Part of #6454) #6473 (CALLS_OUT_DART), which carried no checklist line, so the box never ticked. Re-measured here: theargument_part/-+genericshape no longer appears in the--bucketsreport (it was 88).const RouteSettings(),FocusManager()) in an initializer list or default value. The tree-sitter reader (tests/tools/call_graph_accuracy.py) got two things wrong for dart:initializersis a sibling ofconstructor_signature, so calls in: x = x ?? const Foo(), y = bar()were outside every function span. New_bodies_ofadds the initializer list to the constructor's unit.const Foo(1):_dart_calleetook the first named child,const_builtin, so the callee read asconstand the call was lost. It now takes the last identifier before the arguments, soconst Foo.named()namesnamed, the rightmost identifier, as the harness documents and the engine does.formal_parameter<optional_formal_parameters("engine defect") was wrong; the shape no longer reproduces and--ledgerrecorded that. No verdict was hand-edited.test_dart_constructor_initializer_list_and_const_callees_belong_to_the_constructor.Evidence
call_graph_accuracy.py, dart, before -> after: precision 95.8% -> 99.1%, recall 99.0% -> 99.1%, FP 111 -> 23, FN 25 -> 25, TP 2531 -> 2619. Remaining dart FP areoutside-ts-function(13) andunconditional_assignable_selector(2) etc.; remaining FN:argument_part/-(12), engine-attributes-to-another-function (13).No engine, standards or golden-master file changed (tests/tools only), so no bless and no
--ratchets.pr_gates --fast7/7; tree-wide guard tests andtest_call_graph_accuracy.py273 passed.Baseline and ledger are scoped to dart: a full
--regeneratealso moved cpp (fp 271 -> 258, from #6524) and powershell (matched 460 -> 490, unexplained), which I left at main's values; the ledger run also reordered examples in other languages, reverted.Class / Sibling gaps
Class: dart call-graph disagreements where the engine is right and the tree-sitter reader misses the call (initializer lists,
constconstructors). Both members handled here. Not handled: powershell baseline drift (matched 460 -> 490 with no change of mine) and cpp baseline (fp 271 -> 258) are stale on main; whoever owns them should regenerate. Remaining dart shapes (argument_part/-12, engine-attributes-to-another-function 13,outside-ts-function13) are own slices; haskell (3 shapes) and rusttoken_treeitems are different mechanisms.🤖 Generated with Claude Code