What do I need to know to write a scheme compiler?

orchidaceae phalaenopsis <orchid.hybrid@gmail.com>
Thu, 29 Jan 2015 17:24:39 +0000

          From comp.compilers

Related articles
What do I need to know to write a scheme compiler? orchid.hybrid@gmail.com (orchidaceae phalaenopsis) (2015-01-29)
Re: What do I need to know to write a scheme compiler? gneuner2@comcast.net (George Neuner) (2015-02-02)
Re: What do I need to know to write a scheme compiler? gneuner2@comcast.net (George Neuner) (2015-02-05)
| List of all articles for this month |

From: orchidaceae phalaenopsis <orchid.hybrid@gmail.com>
Newsgroups: comp.compilers
Date: Thu, 29 Jan 2015 17:24:39 +0000
Organization: Compilers Central
Keywords: Scheme, question
Posted-Date: 01 Feb 2015 08:58:18 EST

Hello comp.compilers,


My goal is to write a self hosting compiler for scheme to x86 64
assembly. I will be happy to leave call/cc out of it since I think it
complicates things. What I am focusing on is lambda and tail call
elimination.


I've tried to do it using the CPS transform but this produced code
that was far too slow to self host. I think that it introduces too
many lambdas all of which get heap allocated, I don't know how to do
analysis on the code to find out how which closures can be stack
allocated.


Could anyone give me advice on what I need to learn about implementing
closures in order to make a compiler that's efficient enough to self
host rather than just compiling tiny test programs? Should I stick
with CPS and try to do optimizations based on 0CFA (I have read about
it and it seems powerful but it looks very very difficult).


Thanks!



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.