minor tweaks
All checks were successful
CI / lint (push) Successful in 16s
CI / fuzz (push) Successful in 2m3s
CI / test (push) Successful in 25s

This commit is contained in:
Kamal Tufekcic 2026-08-03 03:59:53 +03:00
commit 22ab973f0c
13 changed files with 223 additions and 144 deletions

View file

@ -4850,9 +4850,11 @@ fn derive_offsets(
match chain_and_vote(&anchors, hv, target_idx) {
Some((pred, conf)) if conf >= 80 => {
gd.set_offset(f.name.clone(), pred as i64);
// The class the slot was chained THROUGH — the only one that makes the index meaningful.
// Recorded here rather than reconstructed later from the name, which would be a different
// (and sometimes wrong) fact: a base-declared method sits in a derived class's vtable.
// The class whose vtable this slot indexes — half the locator, since an index alone locates
// nothing. It is `class_of(f.name)`: `vtable_offset_timelines` builds `VtFunc::class` that
// way and both `hops` and `bv.fps` are keyed by it, so the class the chain walked and the
// class in the name are one fact, not two. Emitting it saves the consumer a name split; it
// does not add information the name lacks.
gd.set_class(f.name.clone(), f.class.clone());
off_ok += 1;
}