Repository navigation
Add support for runtime determined types - #1440
Conversation
a5beab1 to
2eea25f
Compare
|
@davidwrighton Please take a look I'm especially interested to hear about what behaviors should I unit test. I copied most of the code from NUTC, but I don't know which behaviors are accidental implementation details that nobody uses and which are actually important because NUTC has no unit tests... I made the decision to make runtime determined types act as signature variable instead of building a parallel mechanism. I assume |
A runtime determined type wraps a canonical type and the information about what generic parameter it is bound to. Runtime determined types are only expected to show up during dependecy analysis and when talking to codegen backends that can leverage the extra information runtime determined types provide on top of bare canonical forms to do advanced inlining in shared generic method bodies.
2eea25f to
0e829c0
Compare
|
|
||
| using Debug = System.Diagnostics.Debug; | ||
|
|
||
| namespace Internal.TypeSystem |
There was a problem hiding this comment.
We shouldn't end up with a separate copy of this file for scenarios where we have runtime determined types and when we don't. Either we don't allow the existing model of having canonical things without runtimedetermined things, or we make this logic into an algorithm.
There was a problem hiding this comment.
Made it an algorithm but I'm pretty disgusted with the result. We're swapping perf and elegance in favor of testability of a few dozens of lines of code.
|
|
A runtime determined type wraps a canonical type and the information
about what generic parameter it is bound to.
Runtime determined types are only expected to show up during dependecy
analysis and when talking to codegen backends that can leverage
the extra information runtime determined types provide on top of
bare canonical forms to do advanced inlining in shared generic method bodies.