IL

Definition

IL, the Common Intermediate Language, is a stack-based instruction set. Every method in a managed assembly is stored as IL alongside metadata that names its types, parameters, and locals. Mono and CoreCLR compile IL to machine code at runtime. IL2CPP translates it to C++ at build time. Because IL is close to the source in structure, it maps back to C# well.

Relevance

IL stays close to the source. A health check is still a load, a compare, and a branch, and the runtime or IL2CPP turns those instructions into machine code.

Example

A simple health check compiles to a few IL instructions: load the field, load the constant, compare, branch. Those four instructions are the method the runtime runs.

Connected

Synonyms

CIL, MSIL, Common Intermediate Language