Recommended stack and lightning Owin in IL, and IL lightning Owin

Source: Internet
Author: User

Recommended stack and lightning Owin in IL, and IL lightning Owin

In recent days, I had the honor to get guidance from lightning and learn about some commands in EMIT and IL. Although there is a saying that an anti-aircraft gun is used to fight mosquitoes, I believe that 80% of the "20% law" can be used to solve the problem, and 20% of the functions can only be used to solve the problem. Big Brother's blog: http://www.cnblogs.com/qldsrx/p/4542496.html

At the bottom layer of C #, IL is shining brightly. The first complete view of EMIT (reflection is basically written with code IL, and then executed, the highest efficiency, the best performance, and the difficulty of writing) is in the OWIN framework of lightning brother. Lightning's OWIN framework can be encapsulated as webApi or website. Well written, EMIT has also been used for a lot of optimization, which can run well in both windows and linux, and run perfectly on the host jexus on linux, not to mention IIS. (Project address: https://github.com/qldsrx/OwinFramework), used to do WebApi very useful!

Then there is the stack in IL. I understand the stack as a bucket. This bucket can be placed with a certain number of round cakes. This is in line with the principle of advanced post-release. When performing some addition, subtraction, multiplication, and Division operations, the top two parameters will pop up for the operation, and the result will be re-pressed to the stack.

Int I = 1; int j = 2; int k = 3; Console. WriteLine (I + j + k );

After the code above is compiled into IL, the size of a stack is first defined, memory is allocated for the three variables, and the values 1, 2, and 3 are loaded into these variables respectively. Slowly press the first and second variables of the index into the stack, perform the add operation, obtain the value, and press it into the stack. Then, press the third variable of the index into the stack, and then perform the add operation, and press the result into the stack. The call function Writeline is used to display the parameters passed in at the top of the stack for execution. Of course, return is required after the end.

Related Article

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.