Tuesday 2 June 2020

Output of ildasm == CIL (directives, opcodes et al).

Reading the output of ildasm (IL disassembler) after giving it a .NET DLL as an example, produces MSIL / CIL (see footnote 1) worthy of further explanation.

CIL (Common Intermediate Language) is the "mother tongue" of the .NET platform.

The first types of tokens present in a CIL program are directives e.g. .class, .method, .assembly etc. They convey structural information.  Next are various opcodes, such as loadstr which is short for LoadString.

Footnote 1)

Strictly speaking, MSIL has been renamed CIL (Common Intermediate Language), which is the instruction set defined by the Common Language Infrastructure (CLI) specification.

However, MSIL is still colloquially commonly used.

Fun Fact 1)

System.Reflection.Emit allows you to generate in-memory .NET assemblies in CIL.

No comments: