Repository navigation
Bind C# member calls by receiver type and add new X() calls - #111
Conversation
|
Benchmark, main e989b75 (mainb) vs this branch 83ad2c5 (csprd). n=9 strict ABAB per tool, binaries with names of equal length, run1.py watchdog, one heavy job at a time. This is the skeptic rerun with the first binary swapped against the earlier session. Median (IQR), exact two-sided Mann-Whitney p.
graph.json size is unchanged on curl (16.4 MB), redis (20.8), graphify (18.0) and opencv (83.4). AutoMapper goes from 6.6 to 7.3 MB: 6603 to 6674 nodes, 11476 to 13360 edges. The AutoMapper cost is the new binding work: calls edges go from 408 to 1788. Output vs main: curl and redis are byte-identical. graphify changes one edge: calls tests/fixtures/sample.cs DataProcessor.process -> validate, confidence_score 0.5 to 0.85 (C# INFERRED calls now carry 0.85 like upstream). On AutoMapper only calls and references change: calls +1412 / -32, references +504 / -0 (call-site type arguments such as Parity on AutoMapper vs upstream 0.9.92 calls edges, keyed by (source_file, normalised label): upstream 2592, branch 1427, matching 1403 (main matched 344), upstream-only 1189, branch-only 24. Restricted to edges whose two endpoints exist in both graphs: upstream 1867, branch 1788, matching 1764, upstream-only 103, branch-only 24. The upstream-only rows come from causes outside this PR: nested types (vi5.61), constructor bodies as callers (vi5.127), bare-call resolution (vi5.128), files under #if (vi5.129), and Known divergences kept on purpose: upstream classifies test dirs by absolute path (we use the relative path); upstream's Python member-call pass also binds C# calls when the corpus has a .py file (it reads a property as a class); upstream's file-node id can collide with a stub and drop that file's usings; methods whose names differ only in non-word runes (upstream keeps the last one, we bind neither). |
Covers vi5.57, vi5.58 and vi5.59: typed receivers (params, locals, fields, foreach, casts, this/base, one-field chains, inherits walk), untyped receivers bind nothing, and new X() calls the type, as upstream 0.9.92 does.
83ad2c5 to
87e0504
Compare
|
Rebased onto main after #107 to #110 as one squashed commit (87e0504). Conflicts were only the new Result/builder fields and JSON encoders next to #110's JavaRets; both kept. Cache schema is now 24 because #113 uses 23. After the rebase, curl, redis and opencv build byte-identical to main (Java calls from #110 included), graphify differs by the one C# confidence_score, AutoMapper parity with upstream is unchanged (1403 matching calls edges), and go test ./... passes. |
C# member calls now bind only through the receiver's declared type (params, locals, fields, foreach vars, casts, this/base, one-field chains, inherits walk), and new X() makes a calls edge to the type, as upstream 0.9.92 does (vi5.57, vi5.58, vi5.59). On AutoMapper (513 .cs files) calls edges matching upstream go from 344 to 1403, and on curl and redis graph.json is byte-identical to main, with one confidence_score change on graphify's C# fixture. I ran go test ./..., 7 rounds of upstream fixture comparison and review, and n=9 ABAB benchmarks; tables are in a comment.