On 11/7/19 8:08 AM, Matthew Flatt wrote:
> This paper provides the only high-level description of bytecode and the
> VM that I can remember:
>
>
https://plt.eecs.northwestern.edu/racket-machine/
>
> The `compiler/zo-structs` library and its documentation in effect
> describe the bytecode content (but not its encoding). "Bytecode" is
> fairly close to expanded Racket --- so much that `compiler/decompile`
> can reconstruct a good facsimile of bytecode in expanded form, and
> looking at the implementation of `cmopiler/decompile` might be helpful.
A bit--that's where I started, actually; so that's confirmation that I'm looking
in the right place ;)
I also had found that "The Racket Virtual Machine and Randomized Testing" essay--
the big question there, after skimming and scanning, was basically to what extent
that depiction of Racket is still accurate (I didn't see a date in the paper itself,
but I gathered from that the accompanying README said "known to work with Racket v5.0.2",
and that the timestamps in the tarball were from 2010, that it's just shy of a decade old).
I'm reading your response as indicating that the only changes in the VM
over the last decade have basically been bugfixes and maybe performance-improvements--
that the type of bytecode and interpretation basically haven't changed since you worked
on that paper.
So, that's interesting.
> The start of "eval.c" in the implementation provides an overview of
> compiler passes, but that might not be quite what you're looking for.
It does look useful, thanks.
I'll have to finish reading that paper now.
At a glance though, it looks/sounds like the bytecode is largely just a sort
of `compact binary s-expression syntax', and the interpreter is a classic eval/apply tree-interpreter?
Is that a fair overview?