3 ms·
Compiler and runtime are partially dogfooded now in .NET: - CoreLib is entirely C# (let alone anything outside it) - Low-level facilities like thread-locals,
by neonsunset 2y ago
Compiler and runtime are partially dogfooded now in .NET:
- CoreLib is entirely C# (let alone anything outside it)
- Low-level facilities like thread-locals, instead of C++, are now C# + compiler idioms + C# to unmanaged exports mostly
- Type system facilities have more of their code moved to C# as well
- Memmove/memcpy and other performance-sensitive paths, that are part of CoreLib, are either pure C# using its SIMD API or special-cased in compiler (like unrolling of copies, comparisons (including text) of constant lengths and similar last-mile optimizations)
In addition, ILC (IL AOT Compiler) is fully written in C#, although uses the same back-end as JIT.
JIT could have been reasonably written in C# now that there is NativeAOT but would require more work (also considering that it's a GC-based language), apparently it was considered at some point but ultimately there isn't just capacity to do so - .NET compiler team is fairly small.