Re:Things Rust shipped without
by sklogic on Saturday July 04, 2015 @04:53PM
(#9831593)
32-bit opcodes are ok, even on 64-bit architectures, if you add a constant offset - see how it's done in OCaml.
[ Parent
| on HN ]
An offset from the first label, or some nearby alignment point? Makes sense.
Do you have a pointer to the relevant part of OCaml's source? The whole thing is probably worth a read, but don't think I can set aside enough time for that soon, and it could take me a while to find the right part.
https://github.com/ocaml/ocaml/blob/trunk/byterun/interp.c
See the "Next" macro definition.
Nice. Simple and efficient. I am going to read more from that code base. Looks like this might be a nice read as well: https://ocaml.org/docs/papers.html#BytecodeCompilerandByteco...