Roslyn C# 编译器是如何引导的? [英] How's Roslyn C# compiler bootstrapped?

查看:99
本文介绍了Roslyn C# 编译器是如何引导的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始阅读有关Roslyn"的新 C# 编译器,并想知道 Roslyn 编译器是如何编译的?
我知道需要 boostrapping 才能获得 "自托管编译器",我想知道 Roslyn 编译器是如何引导"的?

I've started reading about "Roslyn" the new C# compiler and was wondering how was the Roslyn compiler compiled?
I understand that boostrapping is needed in order to have "self hosting compiler", and I wondered how was the Roslyn compiler "bootstrapped"?

推荐答案

这是 C# 团队实际上(不是猜测)完成的,根据埃里克·利珀特:

This is how it was actually (not guessing) done by the C# team, according to Eric Lippert:

C# 1.0 到 5.0 编译器是用 C++ 编写的.很长一段时间——一年多——我们用 C# 编写了 Roslyn C# 编译器,并用 C# 4.0 编译它.(C# 5.0 是由姐妹团队并行开发的.)那天我们可以编译 Roslyn 编译器,然后右转并使用我们刚刚构建的编译器再次编译它,那是快乐的一天.

C# 1.0 through 5.0 compilers were written in C++. For quite a long time -- over a year -- we wrote the Roslyn C# compiler in C# and compiled it with C# 4.0. (C# 5.0 was being developed in parallel by a sister team.) The day that we could compile the Roslyn compiler, and then turn right around and compile it again using the compiler we'd just built, that was a happy day.

Mads Torgersen 关于引导编译器的商业案例的好文章:

最后是我们的价值主张:让世界上只需要一个理解 C# 的代码库,所有想要通过代码构建工具的人都可以共享它!"

"Here, finally was our value proposition: Make it so that there only needs to be one code base in the world that understands C#, shared by everyone who wants to build tools over code!"

这篇关于Roslyn C# 编译器是如何引导的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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