Where to learn about bytecode generation?

2019-06-14 14:33发布

问题:

I'm trying to learn about generating code for a virtual machine. Where can I find out more about this, any useful books that are about this topic? This is probably a bad question for Stack Overflow, but I'm really confused and I've searched everywhere for a good resource.

回答1:

Off-topic, however:

read Queinnec's Lisp in Small Pieces

study the source code of lua (5.2 or newer), of nekoVM, of Ocaml bytecode interpreter (file byterun/interp.c), and of parrot