能否将 Phoenix 编译器用作更强大的 NGEN?

发布于 2024-07-06 17:54:56 字数 229 浏览 6 评论 0原文

如果您不知道 Phoenix,它是 Microsoft 的一个编译器框架,显然将成为其所有新编译器的基础。 它可以读取 CIL、x86、x64 和 IA64 的代码; 并以 x86、x64、IA64 或 CIL 发出代码。

我可以用它来将纯 .Net 应用程序转换为纯本机应用程序吗? 我的意思是,它不必加载任何 .Net .dll(甚至不必加载 mscoree),并且具有相同的语义? 当然,这不包括反射。

In case you don't know of Phoenix, it's a compiler framework from Microsoft that's apparantly going to be the foundation of all their new compilers. It can read in code from CIL, x86, x64, and IA64; and emit code in x86, x64, IA64, or CIL.

Can I use it to transform a pure .Net app into a pure native app? By which I mean, it will not have to load any .Net .dll (not even mscoree), and will have the same semantics? This is excluding Reflection, of course.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听,心雨的声音 2024-07-13 17:54:56

如果对 Phoenix 不太了解,为了让 .NET 应用程序在本机运行,您还需要该框架的本机版本,除非您不使用该框架(这几乎是不可能的)。

此外,CLR 还包括垃圾收集、程序集加载等,因此转储 CLR 的解释部分可能不会对 .NET 应用程序的性能产生太大影响。

另外,来自凤凰城常见问题解答

问。 如何从本机映像重定向到 MSIL 映像(反之亦然)?

A. 不太容易。 这不是一个受支持的场景,虽然理论上可能是可行的,但我们不知道有谁真正做到过。

Without knowing too much about Phoenix, in order to have a .NET app run natively you're going to also need a native version of the framework, unless you don't use the framework (which is pretty much impossible).

Also the CLR includes garbage collection, assembly loading, etc, so dumping the interpreting part of the CLR probably won't make that much difference to the performance of .NET apps.

Also, from the Phoenix FAQ:

Q. How do I retarget from a native image to an MSIL image (or vice-versa)?

A. Not very easily. This is not a supported scenario, and while it might be theoretically possible, we do not know of anyone who has actually done it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文