Where can I learn about rackets compilation system in detail?

Hello you all.

I would like to study rackets compilation system; by this I mean I want to learn about its intermediate language, the optimizer, and the backend (eg x86-64 and aarch64) backends.

Ive been looking online but cant find anything. can someone point me to a paper about how the racket' s compiler works? thanks

There isnt much written up. Look through Matthew Flatt’s papers, esp. the one on using Chez as a backend. The compiler is a combination of the expander and the to-Chez layer. — People seem to read the code and begin to contribute.

The best paper about the current system is this one: Rebuilding Racket on Chez Scheme (Experience Report) ICFP'19

That doesn't talk that much about how Chez Scheme itself works. For that, you can read more from various papers such as this one about continuation marks (https://www-old.cs.utah.edu/plt/publications/pldi20-fd.pdf), this history of Chez Scheme (https://legacy.cs.indiana.edu/~dyb/pubs/hocs.pdf) and Dybvig's dissertation (https://legacy.cs.indiana.edu/~dyb/pubs/3imp.pdf). The History of Chez Scheme paper also cites a number of other papers.

4 Likes

In terms of code, the linklet.sls file in Racket manages the primary boundary between Racket and Chez, which may be of interest when exploring compilation.

To learn more about Chez itself, along with the resources others have mentioned, you may also find the notes in IMPLEMENTATION.md helpful.

2 Likes

so is contributing the chez scheme's compiler backend is indeed contributing to racket? or how can I contribute to the racket's compiler backend?

Yes, Racket's compiler uses Chez Scheme. Contributions to the Chez Scheme compiler will also affect the performance of Racket. Take a look at

and

1 Like

thanks professor; could i work on the chez backend from the racket repo?

The Racket repository includes a copy of the Chez Scheme source code, so you can edit that and rebuild. In general we want to upstream changes to Chez and keep them in sync, but that can be worked out after you have a change you want to make.