1 / 15

Common Intermediate Language (CIL)

Common Intermediate Language (CIL). Introduction. Common Intermediate Language  (formerly called  Microsoft Intermediate Language  or  MSIL ) is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification.

whitley
Download Presentation

Common Intermediate Language (CIL)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Common Intermediate Language (CIL)

  2. Introduction • Common Intermediate Language (formerly called Microsoft Intermediate Language or MSIL) is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification. • Languages which target a CLR-compatible runtime environment compile to CIL, which is assembled into an object code that has a bytecode-style format. • CIL is an object-oriented assembly language, and is entirely stack-based. Its bytecode is translated inte native code or executed by a virtual machine.

  3. Components of CIL

  4. Profile Class Library • Within the CLI class libraries lies a distinction between Microsoft's .NET and the ECMA CLI. • What was submitted for ECMA's standardization is a subset of the Microsoft .NET libraries, as depicted in the following diagram. • With that said, we can move on to describing only the ECMA CLI libraries.

  5. Profile Class Library

  6. Base Class Library • The BCL contains about 147 classes that deal with value types, exceptions, string manipulations, collections, threading, security, globalization, and IO. • A very small portion of the implementation must contain platform-specific code, while the vast majority can be generically developed for any platform. 

  7. Base Class Library

  8. Virtual Execution System

  9. Just-In-Time compiler • At run time, the CLR uses JIT compilation to compile MSIL to native machine code for the current platform • Compiles only methods that are called, the first time they are called • Compiled methods are cached for subsequent uses • Type Safety Verification verifies: • References to types are strictly compatible with each type being referenced • Only appropriately defined operations are invoked on each object • Identities are what they claim to be

  10. Just-In-Time Compiler

  11. Garbage Collection • The CLR manages a pool of memory called the managed heap • Once there are no references to an object, it becomes “garbage” and can no longer be reached • .NET continuously runs a Garbage Collector (GC) on a separate thread to look for this garbage • The GC works as a mark and sweep collector, only running when a certain amount of memory has been used, or when the system needs memory • The GC uses generation marking for each sweep • Objects marked higher than generation 2 are collected much less frequently

  12. Garbage Collection

  13. Namespace • The framework relies on Namespaces to organize classes. Much as a directory file structure is a physical container of files, namespaces are logical containers for classes and interfaces. • The root namespace in CLI is System. All classes within the framework are contained within the System namespace. 

  14. Namespace Example

  15. The End …… Thank You ……

More Related