Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type system and loader improvements #29

Open
3 of 6 tasks
dubiousconst282 opened this issue Nov 19, 2023 · 0 comments
Open
3 of 6 tasks

Type system and loader improvements #29

dubiousconst282 opened this issue Nov 19, 2023 · 0 comments

Comments

@dubiousconst282
Copy link
Owner

dubiousconst282 commented Nov 19, 2023

The type system and metadata loader are in a quite unpolished state, despite being heart of the IR. These are some of the things which need to be improved/fixed.

  • Load rare but expansive properties on-demand: method bodies, custom attributes, type members, etc.
  • Retain missing metadata tables
    • Method PInvoke info
    • Embedded resources
    • Others?
  • Make most properties mutable
  • Consider supporting bridges for Cecil/dnlib/ AsmResolver
    Can't really think of many reasons for this, other than supporting obfuscated modules (which idk if they are worth bothering with). This would actually probably save a lot of work, in addition to support for the old framework crunk and obfuscated modules.
    The problem with SRM is that it just gives out the raw metadata tables without much further structuring, so you inevitably need an abstraction over it. Plus, serializing modules back also takes a lot of work.
    AsmResolver seems to be intended as a replacement for both Cecil and dnlib, which are kind of stagnated. Replacing the entirety of DistIL to use it sounds enticing at first, but it'd be certainly not fun to pull it off. It doesn't look as lightweight and convenient to use as our own, which is designed to be more like the reflection model rather than a metadata model, so I guess a bridge would indeed be an acceptable solution.
dubiousconst282 added a commit that referenced this issue Nov 22, 2023
There's still some cleanup left to do around lists and (immutable)arrays
and mutability in general, but there doesn't seem to be any breaks.

(I really need to get used to writing unit tests.)

Contributes to #29
dubiousconst282 added a commit that referenced this issue Dec 6, 2024
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

No branches or pull requests

1 participant