. NET Interpreter

Source: Internet
Author: User

Because the language currently used in the project is C #, and C # can only be performed in AOT on iOS, hot updating is a tricky issue.

For this I open source a own. NET interpreter.

The current C # Hot update of the main seems to have been implemented, as if there is a c#script (non-standard C #) Ilscript

The implementation of the following ilscript is consistent with my current thinking and directly explains the execution of Il CODE. At the same time, depending on the existing. NET runtime, do not interpret the execution as much as possible, such as some parts that do not require hot updates, the bottom of the framework, the network layer, the IO layer, which are often used in large numbers and are less prone to serious problems. And the general cause of the problem is some business logic. So the interpreter I implemented only explained the execution part of the code, and the other part was native execution.

But there is a very big problem with this interpretation, that is, the native code (for interpreting the execution code), how to match the virtual object of an interpretation layer with the object in the native code, and the native code Call (the code cannot be inserted while the Natvie code is executing).

At present, these two problems in the code can be initially resolved, the specific principle, we first look at the code, the future may open a series of articles, to say how to achieve a. NET interpreter.

Code Warehouse: Https://github.com/dotnetscript

Code in the develop branch, you are interested to see, for other IL interpreter scheme, the current implementation of the basic can be perfectly implemented across native layer inheritance, interaction, complete generic support, async/await support, and the exception support is basically completed, but not fully tested, In addition, you cannot use type or gettype in the explanation code, this will be added slowly later.

We have a lot of questions about it, communicate with each other!

. NET Interpreter

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.