feat: type_events in diff and tracker, joined with emulator signal literals
Diff gains a type_events axis keyed by (script type, event). The tracker lists each type's original events (vftable list, or the nearest class list up the constructor chain for Piklib 6.1) and where the emulator names them: the type's class, Variable.java or other engine code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cb03de47ac
commit
597733d8d7
@@ -118,6 +118,8 @@ def compute_diff(old: Snapshot, new: Snapshot) -> dict[str, Any]:
|
||||
"types": keyed_diff(old.types, new.types, _type_key, ["cpp_class", "object_size"]),
|
||||
"methods": keyed_diff(old.methods, new.methods, _owner_name_key, ["id"]),
|
||||
"events": keyed_diff(old.events, new.events, _owner_name_key, ["order"]),
|
||||
"type_events": keyed_diff(old.type_events, new.type_events,
|
||||
lambda x: (x["type"], x["name"]), ["order"]),
|
||||
"fields": keyed_diff(old.fields, new.fields, _owner_name_key, ["type"]),
|
||||
"struct_layout": keyed_diff(old.struct_layout, new.struct_layout, _layout_key,
|
||||
["size", "is_vtable"]),
|
||||
@@ -136,6 +138,8 @@ def _item_owner(axis: str, item: Item) -> str | None:
|
||||
return item.get("cpp_class")
|
||||
if axis in ("methods", "events", "fields", "struct_layout", "method_dispatch"):
|
||||
return item.get("owner")
|
||||
if axis == "type_events":
|
||||
return item.get("type") # script type name, e.g. --owner ANIMO
|
||||
if axis == "method_inheritance":
|
||||
return item.get("runner")
|
||||
if axis == "field_inheritance":
|
||||
|
||||
Reference in New Issue
Block a user