Book Image

Microsoft Dynamics AX 2012 R2 Services

Book Image

Microsoft Dynamics AX 2012 R2 Services

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R2 Services
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The power of CIL


In Microsoft Dynamics AX 2012, code can be compiled to CIL and run in the .NET CLR. But what does CIL mean and what is it used for?

Common Intermediate Language (CIL) is in essence an object-oriented assembly language. It complies with the Common Language Infrastructure (CLI), which is a specification that was developed by Microsoft to describe a set of rules that programming languages need to comply with when they are targeting the CLI. One of the most important aspects of the CIL is that it is a platform- and CPU-independent instruction set. This enables the code to be executed on different environments as long as they comply with the CLI specification.

The following diagram shows that the languages are first compiled in CIL, after which the Common Language Runtime (CLR) compiles the platform-independent CIL code into machine-readable code:

As you can see, Microsoft Dynamics AX 2012 does not compile the X++ code directly to CIL. It is compiled to p-code, which can be interpreted...