Intermediate language (CIL) is a processor-independent compiled representation used by .NET. Language-specific compilers translate code into CIL, which can be packaged in a DLL and run on different operating systems and processor architectures wherever a .NET runtime is available. CIL resembles assembly but uses instructions at a higher level of abstraction. section 1.1 section 1.5.1
The execution path separates language compilation from processor-specific code generation:
- A compiler translates a language such as C# into CIL. section 1.1
- The runtime typically uses just-in-time (JIT) compilation to translate CIL into machine code as needed. section 1.5.1 section 1.5.2
Figure 1.4 .NET languages compile to CIL in a DLL file that can be run on any machine with a .NET runtime.
The diagram shows language compilers producing CIL in a DLL, then a .NET runtime converting it to machine code. section 1.5.1
