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
@@ -354,3 +354,17 @@ def test_fields_per_type_and_emulator_property_literals(tmp_path):
|
||||
integer = {f["name"]: f for f in typ(result, "INTEGER")["fields"]} # class chain, base first
|
||||
assert [f["name"] for f in typ(result, "INTEGER")["fields"]] == ["TOINI", "VALUE"]
|
||||
assert integer["TOINI"]["status"] == "read_base" and integer["VALUE"]["value_types"] == ["int"]
|
||||
|
||||
|
||||
def test_name_dispatch_rows_join_methods_without_ids(tmp_path):
|
||||
snap = Snapshot({"binary": {"name": "p61.dll", "sha256": SHA},
|
||||
"types": [{"script_name": "ANIMO", "cpp_class": None}],
|
||||
"methods": [{"owner": "CMC_Animo", "runner": "CMC_Animo_Runner", "name": "setPosition", "id": None}],
|
||||
"method_dispatch": [{"owner": "CMC_Animo", "runner": "CMC_Animo_Runner", "id": None, "name": "SETPOSITION",
|
||||
"dispatch": "name", "impl_addr": "0x10027ff0", "params": [
|
||||
{"index": 0, "types": ["int"]}, {"index": 1, "types": ["int"]}],
|
||||
"variadic": False, "returns": []}]})
|
||||
result = build_tracker([snap], emulator(tmp_path))
|
||||
entry = row(result, "ANIMO", "SETPOSITION")
|
||||
assert entry["original"][0]["impl_addr"] == "0x10027ff0"
|
||||
assert entry["signatures"] == ["(int, int) → —"]
|
||||
|
||||
Reference in New Issue
Block a user