是.NET VM编译器或一个跨preTER? [英] Is .NET VM a compiler or an interpreter?

查看:155
本文介绍了是.NET VM编译器或一个跨preTER?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问.NET的虚拟机编译CIL字节code(然后执行code的最低水平 - CPU汇编器),或者它是一个跨preTER(读下面的说明并执行)?

解决方案
  

请问.NET的虚拟机   编译CIL字节code(再   执行code的最低水平 -   CPU汇编)

是的,这是CLR的一个组成部分叫 JIT (即时编译),其转换中介语code(由编程语言的编译器发出)到机器code。

有没有跨preTER,因为在动态语言如Ruby,PHP,Python的。


更新:

正如指出的,因为增加的 DLR 在.NET 4中由@Nick Craver的评论带来的可能性使用在CLR动态语言的概念。

Does the .NET's Virtual Machine compiles the CIL bytecode (and then execute the code at the lowest level - CPU assembler), or it is an interpreter (that reads the following instructions and execute them) ?

解决方案

Does the .NET's Virtual Machine compiles the CIL bytecode (and then execute the code at the lowest level - CPU assembler)

Yes, it's a component of the CLR called JIT (Just-In-Time compilation) that converts the Intermediary Language code (emitted by the compiler of the programming language) into a machine code.

There's no interpreter as there is in the dynamic languages such as Ruby, PHP, Python.


UPDATE:

As pointed out in the comments by @Nick Craver since the addition of the DLR in .Net 4 brings the possibility of using dynamic language concepts in the CLR.

这篇关于是.NET VM编译器或一个跨preTER?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆