Is there some nice feature of the format or library for going from some part of the bytecode to the line of code it originally came from? This would obviously be useful for debugging and error messages.
In particular, I'm looking at how hard it would be to add support for source maps to js_of_ocaml.
js_of_ocaml -debuginfo
uses debug_event
in a bytecode to write the line of code in comment.