Share one metadata walk between Mono and IL2CPP - #145
Merged
Merged
Conversation
This was referenced Aug 28, 2026
ero-qt
force-pushed
the
managed-walk
branch
4 times, most recently
from
September 14, 2026 17:17
a21a360 to
476e679
Compare
Collaborator
|
Can you rebase this pull request so we can continue reviewing? |
ero-qt
force-pushed
the
managed-walk
branch
from
September 15, 2026 11:02
476e679 to
31ada87
Compare
CryZe
approved these changes
Sep 15, 2026
CryZe
left a comment
Collaborator
There was a problem hiding this comment.
The shared managed walk preserves the public Mono and IL2CPP behavior, with the runtime-specific differences kept explicit and parity fixtures covering image, class, field, static-table, and pointer-path traversal. I also built the Lunistice autosplitter in release mode against this exact head. The controlled WASM comparison grew by 1,626 bytes (48,234 to 49,860), which is acceptable for this refactor but worth tracking as the known-version path is optimized later. All local and CI tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #141.
Moves the Mono and IL2CPP metadata walks into one private
managedmodule. On master the two walks are near copies.field.rsis the same file on both sides, the twopointer.rsfiles share 160 lines apart from one dereference, and class and field lookup match line for line. The real differences sit behind aRuntimeenum that is matched exhaustively, so a new runtime is a compile error at every point where the runtimes differ. The public API stays the same on both sides.Only the last two commits are new. The parity tests land first. They are hand-laid images of both runtimes' structures at real builds' offsets, and they pin behavior before any code moves.
The internal field lookup returns the declaring class, which nothing uses yet. A follow-up resolves inherited statics against the right static table, and I shaped the seam once. The field entry size is named
stride, one name for Mono'salignmentand IL2CPP'sstruct_size.Two doc links to
Imagethat never resolved are fixed.cargo test --all-featuresruns the suite. The new tests cover image, class, field and static lookup, pointer paths, and field climbs on both runtimes.