Debug info for bytecode
The bytecode compiler should store enough information for the debugger to be able to figure out where the code is. This probably entails something like DWARF line tables. There should be a map from each VM IP to its source code.
Probably each module has its own map, and when we make a module we register its IP range, similar to what we do for DWARF with object files.
Strictly speaking we only need to map call IPs in most cases. It is possible to asynchronously interrupt the VM, but at the moment it's not clear how to let the debugger figure out the IP from there in any efficient way - most likely we'd have to get the IP variable in bytecode_vm from the actual DWARF. So we can start with just calls and go from there.
As a bonus, it should be possible to also map each IP to a stackmap with information about what VM stack positions correspond to what variables. That's actually easier to do right now since the compiler already tracks that information.
This all will slow the compiler down a bit. We don't really care about debugger speed compared to compiler speed, so the representation should be as easy to dump as possible.