DistIL icon indicating copy to clipboard operation
DistIL copied to clipboard

Type system and loader improvements

Open dubiousconst282 opened this issue 2 years ago • 0 comments

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.

  • [x] Load rare but expansive properties on-demand: method bodies, custom attributes, type members, etc.
  • [ ] Retain missing metadata tables
    • [x] Method PInvoke info
    • [x] 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 avatar Nov 19 '23 03:11 dubiousconst282