feat: Piklib 6.1 method ids, name dispatch and signatures
Later 6.1 builds give every runner getMethodId(CXString); its equalsIgnoreCase chain now yields name -> id, so their run(int) switch rows join to names. Runners without a switch (earliest 6.1) get rows from run(CXString) by name, joined by name in the tracker. Method facts run for 6.1 too, with its ABI: run(int, CXVector*), methods as runner members taking only the params, and new CMC_<T> as the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
aee8f17417
commit
835cd4f729
+5
-1
@@ -431,6 +431,9 @@ def build_tracker(snapshots: list[Snapshot], emulator: dict, reviews: list[dict]
|
||||
id_names[(m["owner"], m["id"])].add(m["name"].upper())
|
||||
name_ids[(m["owner"], m["name"].upper())].add(m["id"])
|
||||
dispatch = {(d["owner"], d.get("id")): d for d in snap.method_dispatch if d.get("id") is not None}
|
||||
# Earliest Piklib 6.1 dispatches by name and has no method ids.
|
||||
dispatch_by_name = {(d["owner"], d["name"]): d for d in snap.method_dispatch
|
||||
if d.get("id") is None and d.get("name")}
|
||||
parents = defaultdict(list)
|
||||
for edge in snap.method_inheritance:
|
||||
parents[edge["runner"].removesuffix("_Runner")].append(edge["base_runner"].removesuffix("_Runner"))
|
||||
@@ -472,7 +475,8 @@ def build_tracker(snapshots: list[Snapshot], emulator: dict, reviews: list[dict]
|
||||
type_row(name).setdefault("inherits", []).append(BASE_SCOPE)
|
||||
return
|
||||
for m in owners[current]:
|
||||
d = dispatch.get((current, m.get("id")), {}) if m.get("id") is not None else {}
|
||||
d = (dispatch.get((current, m.get("id")), {}) if m.get("id") is not None
|
||||
else dispatch_by_name.get((current, m["name"].upper()), {}))
|
||||
verdict = {canonical(k): v for k, v in (d.get("per_type") or {}).items()}.get(name)
|
||||
if verdict == "excluded_by_type_check":
|
||||
excluded[(name, m["name"].upper())].add(bid)
|
||||
|
||||
Reference in New Issue
Block a user