Msil study 0

Source: Internet
Author: User

It is time to study the Il program. Too many technical points need to be summarized. Prepare to write a series about all of Il.

Let's summarize some notes after reading the video from lava:

Opcode Instruction Set

Il code:
1. Directive statement, starting.
2. Instruction declaration, not starting.
3. entrypoint program entry
4. ANSI, interactive with unmanaged code, marking character sets
5. Auto: automatically optimizes member sorting.
6. hidbysig: Hide the overwriting method in the parent class.
7. Pencil managed to generate managed code
8. Assembly. extern reference external assembly

Cannot display call cctor

After all the local variables are compiled into Il, their original names are lost, instead of V_0, v_1, and so on.

Static variables are initialized to 0; instance variables are not guaranteed to be initialized -- So C # compiler will help check

Ldarg.0 calls 0th variables to the stack.
LDC. i4.2 load constant 2 to the stack
Stfld saves stack data to member variables

Assembly Logic
Module physically
* Vs2005 does not support compiling as a module

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.