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? > At Thu, 7 Nov 2019 01:46:17 -0500, Joshua Judson Rosen wrote: >> Hi, >> >> I'm trying to learn about Racket's bytecode and VM (after skimming through >> the >> docs, >> I guess I'm specifically interested in the "3m" VM and the "zo" bytecode?). >> >> Trying to find answers to questions like "is it a stack-machine, a >> register-machine..., >> something else?"; "what are the bytecode operators and their operands"; >> "what sort of verification is done while loading bytecode".... >> >> I've been a longtime user of Guile and have recently started reading through >> Guile's VM documentation, and ideally I'm trying to find something similar >> to >> this >> but for Racket: >> >> >> https://www.gnu.org/software/guile/manual/html_node/A-Virtual-Machine-for-Guile >> .html >> >> Does such a thing exist? >> >> If not, could someone perhaps give me some specific advice as to where in >> the >> code >> I should look to find this info? >> >> >> -- >> "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))." >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-dev+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-dev/c9b29384-df5e-72fc-5ff9-5bd64418b0 >> 06%40geekspace.com. > -- "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))." -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/c29b95fe-d0ea-8ac7-9326-9653a72bbb9b%40hackerposse.com.