请问.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.