ALERT

[LAST CHANCE] Data Layer: Modern Business, Defined

Intermediate Language (IL)

Definition - What does Intermediate Language (IL) mean?

Intermediate language (IL) is an object-oriented programming language designed to be used by compilers for the .NET Framework before static or dynamic compilation to machine code. The IL is used by the .NET Framework to generate machine-independent code as the output of compilation of the source code written in any .NET programming language.

IL is a stack-based assembly language that gets converted to bytecode during execution of a virtual machine. It is defined by the common language infrastructure (CLI) specification. As IL is used for automatic generation of compiled code, there is no need to learn its syntax.

This term is also known as Microsoft intermediate language (MSIL) or common intermediate language (CIL).

Techopedia explains Intermediate Language (IL)

With the help of a suitable just-in-time (JIT) compiler, IL code can be executed on any computer architecture supported by the JIT compiler. Unlike interpreters, JIT compilation provides better performance, preserves memory, and saves time during application initialization. IL enables the platform- and CPU-independence feature of the .NET framework, by allowing compiled source code to be executed in any environment supporting the CLI specification.

Verification of code safety, for IL code, provides better security and reliability than natively-compiled executable files. The metadata, describing the MSIL code in the portable executable, eliminates the need for type libraries and intermediate definition language files as was used in the Component Object Model (COM) technology. Combined with metadata and a common type system, IL forms the means to integrate modules written in different languages into one single application, thus enabling language independence.

Although IL is similar to Java bytecode in its usage by compilers, it differs from the latter in that it is designed for platform independence and language independence. It also differs in that it is compiled and not interpreted.

Two types of instruction sets are included with IL; base instructions, similar to native CPU instructions, and Object model instructions used by the high-level language. IL includes all instructions necessary for loading, storing, initializing, and calling methods on objects. It also includes arithmetic and logical operations, control flow, direct memory access, exception handling and other operations. Unlike the common object file format used for executable content in the traditional Microsoft portable executable, the portable executable generated, after the compilation of managed code, contains both IL instructions and metadata.

The two tools associated with IL code are the MSIL Assembler (Ilasm.exe) and the MSIL Disassemble (Ildasm.exe). The former generates a portable executable file from IL code and permits viewing the IL code in human-readable format, while the latter converts a portable executable file back to a text file, for viewing and modification. Both are automatically installed as part of Visual Studio.

This definition was written in the context of .NET

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
Tweat cdn.techopedia.com
"Techopedia" on Twitter


'@Techopedia'
Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Resources
The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.