7 ms·
> So List<int> doesn't necessarily get JItted It does, if the AOT compiler is advanced enough to examine all code and determine that `int` is a possible type b
by knocte 8y ago
> So List<int> doesn't necessarily get JItted
It does, if the AOT compiler is advanced enough to examine all code and determine that `int` is a possible type being used with List<T>. Mono has had a lot of advancements on these techniques over the years, as it's the only way for them to let Xamarin devs deploy apps on the iPhone.
- piaste 8y agoIn regular .NET you can instantiate generic types with a type parameter provided at runtime. Of course it's not something you should ever do in regular code, but it can be useful for deserialization and stuff like that, so you can create e.g. a list of arbitrary types received over the wire. Does the AOT compiler just crash if asked to compile a project that uses reflection?