Code running in CLR

Source: Internet
Author: User

CodeRunning PROCESS IN CLR

1. Select the Compiler

First, CLR selects the compiler, because the CLR can run code developed in different languages.

2. Compile the code into msil

CLR uses the selected compiler to generate msil (Microsoft intermediate language) and metadata to load them to PE (portable executable file ).

Msil: An interpreted language that contains code information, making JIT easy to compile into a machine language. With the operating system andProgramming LanguageIrrelevant.

PE: the executable file format. Windows is DLL or EXE.

3. Use the JIT compiler to compile msil into a machine language.

One method is to compile only the code snippet currently executed, and the other is to compile the entire code at one time. JIT checks the code security.

4. Run the code

When the code is called for the first time, it will be compiled into the machine code. When the code is called again, it will not be re-compiled.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.