Stage 1: Mechanical Ghidra-to-C# translation (10185 methods)#8
Open
AstrandPallas wants to merge 2 commits intomainfrom
Open
Stage 1: Mechanical Ghidra-to-C# translation (10185 methods)#8AstrandPallas wants to merge 2 commits intomainfrom
AstrandPallas wants to merge 2 commits intomainfrom
Conversation
…, 514 files) Translator improvements since Stage 1: - Constructor merging: IL2CPP split new()+.ctor() patterns merged into proper C# constructors - Class field type awareness: bool/enum/ref fixes now apply to this.fieldName patterns - Alternation-based regex: pre-compiled patterns per category for O(1) matching - Prefix capture for member access: handles this.field without lookbehind issues - File-level cast fixup: corrects this.(int) → (int)this. syntax Stats: 7,249 methods written, 2,908 stubs replaced, 58.4% line resolution, 0 Roslyn errors
d4022c8 to
6d1197d
Compare
Translator improvements (ghidra_to_csharp.py Phase 3): - Type-aware array offset guards: only emit .Length/[0] for actual arrays - Narrowing cast insertion for non-literal assignments (int→byte/enum) - get_Item/set_Item → C# indexer resolution - Integrated --unity-check with iterative visibility auto-fixer - Multi-level prefix capture fix for bool negation patterns Results: 9681 methods translated, 0 Roslyn errors, 5266 Unity errors (down from 6316 with 2936 additional methods written)
Contributor
Author
|
Don't review this yet still got more to go |
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.
Summary
// TODOstubs with Ghidra-decompiled method bodies across 520+ filesPhase History
Stats
Phase 3 Improvements
.Length/[0]for actual array types (CS1061: 1330→328, CS0021: 1184→226)get_Item(idx)→[idx]indexer resolution (CS0571: 160→96)--unity-checkflag with integrated Unity build + iterative visibility auto-fixerTest plan