免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1809 | 回复: 0

C--: A Portable Assembly Language [复制链接]

论坛徽章:
0
发表于 2009-05-19 09:27 |显示全部楼层
Welcome to C--Suppose you are writing a compiler; how will you get quality machine code? You might write your own code generator---but that's a lot of work. You might use somebody else's: perhaps VPO, MLRISC, or the gcc back end. But each of these impressive systems has a rich, complex, and ill-documented interface, and furthermore, to use MLRISC you must write your front end in ML, to use gcc you must write it in C, and so on. You might generate C, if you can live without multiple results in registers, proper tail calls, computed gotos, accurate garbage collection, and efficient exceptions.
You would be much happier with one portable assembly language that could be generated by a front end and implemented by any of several code generators. Such a language should serve as the interface between high-level compilers and retargetable, optimizing code generators. Authors of front ends and authors of code generators could cooperate easily. C-- is that language.
What distinguishes C--The following aspects of C-- distinguish it from other compiler infrastructures:
  • Other infrastructures focus on adding new optimizations; C-- focuses on supporting multiple front ends for multiple languages.
  • C-- has a machine-level type system, so you don't have to shoehorn your favorite high-level language into a high-level data model that doesn't fit.
  • C-- provides a run-time interface, so you can implement garbage collection and exception handling using the techniques that are best suited to your language.
The run-time interface is the most novel and most distinguishing feature of C--. Where to go from hereTo experiment with the language, download Quick C--, which includes an interpreter and a native-code compiler. You'll also want the specification (in DVI, PostScript, or PDF forms). The compiler's release notes are part of the source distribution in doc/release.ps. For an overview of the design, consult our papers, which present an evolving view of C--. Please write front ends that emit C-- or comment on our design. If you're interested, please join the mailing list.
Research on C-- and Quick C-- is supported by a generous gift from Microsoft Research and by the [url=]National Science Foundation[/url] under grant number 0325460. (Opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.) The results of our research may be used freely by anyone for any purpose.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP