What are the processes that the .net compiler does in order to compile code?
first I want to say that I'm not sure if this is the best stack-exchange site to post this type of question but I'm not sure where it would fit the best. Anyway as the questions title's says I want to know the steps the .net compiler does when converting my C# code to a machine language one. I've watched some videos however there are some stuff that I still don't quite understand. I will leave all my question's at the bottom and I will try to be as specific as possible.
Here's my understanding of how the .net compiler works
My C# code -> IL -> JIT -> Assembler code
- What is the exact term of "My C# code" ?
- What is the use of CLR in here ?
- Is this entire process handled by the CLR or where does it even comes in ?
- What is Metadata ?
- Is there something additional that happens in between those transition from step 1 to step 2 and from step 2 to step 3 or it's just some code being translated to a lower-level language ?
- Just C# (C# -> Roslyn (or csc) -> IL -> JIT -> Native)
- The CLR is what reads your IL, JIT's it and holds the GC (and much, much more that doesn't pertain to this question)
- The CLR only runs your compiled code. C# compilation is done through a normal compiler (which was csc.exe, but is now deprecated by Roslyn).
- There are plenty of examples that state what Metadata is
- There is a lot that goes on in those steps, but that is the primary flow.