Skip to content

Add parallel arrays shape for dictionaries and hashsets - #152

Open
ero-qt wants to merge 26 commits into
LiveSplit:masterfrom
ero-qt:parallel-collections
Open

Add parallel arrays shape for dictionaries and hashsets#152
ero-qt wants to merge 26 commits into
LiveSplit:masterfrom
ero-qt:parallel-collections

Conversation

@ero-qt

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

Copy link
Copy Markdown

Depends on #151.
Part of #149.

The oldest Mono Corlib (Unity 5.6 era, net20) lays dictionaries and hashsets out as parallel arrays instead of one entries array: linkSlots/keySlots/valueSlots/touchedSlots on the dictionary, links/slots/touched on the set. get_dictionary_offsets and get_hash_set_offsets resolve that shape too now, and the same read calls read it: walk the links up to the high-water mark, take the indices whose stored hash carries the live flag, and read the key and value arrays at those indices. The Link class says which of its two ints is the hash, so either order works.

Nothing changes on the surface, the offsets types just carry a shape inside now.

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.

1 participant