Skip to content

Add hashset reads - #151

Merged
CryZe merged 1 commit into
LiveSplit:masterfrom
ero-qt:hashset-reader
Sep 17, 2026
Merged

CryZe merged 1 commit into
LiveSplit:masterfrom
ero-qt:hashset-reader

Conversation

@ero-qt

@ero-qt ero-qt commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Part of #149.

Adds get_hash_set_offsets and read_hash_set to both backends' Module, built on the dictionary machinery. A slot is a dictionary entry without the key, so resolution and the chunked scan are the same code handed different names.

Resolution accepts both corlib naming generations. The set's bucket heads are one-based in both generations, unlike the dictionary's. Nothing reads buckets yet, but whoever adds keyed lookups will want that written down.

read_hash_set walks to _lastIndex, the high-water mark, since freed slots sit inside it. The live tally has to equal _count exactly or the read fails. The value type is the caller's claim, refused past the slot's room.

cargo test --all-features runs the suite. The new tests cover both naming generations, live values on both runtimes, and unbalanced tallies.

@CryZe

CryZe commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

I’m waiting for this PR to be rebased onto the current master before continuing the review. It currently still contains the PR #150 commits in its history and GitHub reports conflicts. Please let me know once it has been rebased.

@ero-qt

ero-qt commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Rebased. It's on master now with just its own commit, and I folded the same class hierarchy check and the empty case in for hash sets while I was at it.

@CryZe CryZe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the public API, implementation, and tests. Also validated the IL2CPP path against Lunistice with a live HashSet, including the canonical empty/unallocated representation; offset and slot layout resolution and the read all passed.

@CryZe
CryZe merged commit 4a60e56 into LiveSplit:master Sep 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants