Normal Comiler vs .Net编译器 [英] Normal Comiler vs .Net compiler

查看:86
本文介绍了Normal Comiler vs .Net编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

普通编译器和.Net编译器有什么区别?

Ragards

Hello
what's the difference between normal compiler and .Net comiler?
Ragards

推荐答案

请请参阅以下网址中的第11页 C#解构:了解C#如何在.NET Framework上运行 [ ^ ]。
Please see page 11 from the following URL C# Deconstructed: Discover how C# works on the .NET Framework[^].


问题非常不正确,但您需要了解.NET中的编译是什么。

源代码编译成 CIL 。这样,编译的程序集的可执行代码(PE文件)被抽象(在一般情况下)来自特定的OS和CPU 指令集架构

加载可执行文件时, JIT编译开始起作用。通常,所有方法都按需编译到CPU指令中,因为所使用的每个方法都是第一次调用。



请参阅:

http://en.wikipedia.org/wiki/Common_Intermediate_Language [ ^ ],

http://en.wikipedia.org/wiki/Just-in-time_compilation [ ^ ]。



更传统的模型是编译到目标文件后来由一个名为 linker 的独立程序链接在一起,以生成可执行文件,这些文件完全是依赖于平台的。请参阅:

http://en.wikipedia.org/wiki/Compiler [< a href =http://en.wikipedia.org/wiki/Compilertarget =_ blanktitle =New Window> ^ ],

http://en.wikipedia.org/wiki/Object_file [ ^ ],

http ://en.wikipedia.org/wiki/Linker [ ^ ]。



另请参阅: http:// en。 wikipedia.org/wiki/Portable_Executable [ ^ ]。



-SA
The question is pretty much incorrect, but you need to understand what is "compilation" in .NET.
The source code is compiled into CIL. This way, executable code (PE file) of the compiled assembly is abstracted (in a general case) from particular OS and CPU instruction-set architecture.
When the executable file is loaded, the JIT compilation comes into play. Typically, all methods are compiled into the CPU instructions on demand, as each of the methods used is called for the first time.

Please see:
http://en.wikipedia.org/wiki/Common_Intermediate_Language[^],
http://en.wikipedia.org/wiki/Just-in-time_compilation[^].

More traditional model is compilation to object files which are later linked together by a separate program called linker, to make an executable, which is them totally platform-dependent. Please see:
http://en.wikipedia.org/wiki/Compiler[^],
http://en.wikipedia.org/wiki/Object_file[^],
http://en.wikipedia.org/wiki/Linker[^].

See also: http://en.wikipedia.org/wiki/Portable_Executable[^].

—SA


罗斯林 [ ^ ]是.NET编译器。阅读MSDN源文档。



普通编译器 [ ^ ]是一个编译器,它是每个编译器的模板,因为如果你删除了法线(它是正常删除正常)。可以在维基百科上找到普通编译器的规则及其细节。



通常他们都编译源代码并将其转换为机器(可理解的)代码创建可执行文件。
Roslyn[^] is the .NET compiler. Read the MSDN source document for that.

A normal compiler[^] is a compiler that is a template for every compiler because if you remove the normal (it is normal to remove normal). Rules of the normal compiler and its details can be found at the Wikipedia.

Usually they both compile the source code and convert it into machine (understandable) code for the sake of creating an executable file.


这篇关于Normal Comiler vs .Net编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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