grain
grain copied to clipboard
Verify reference management in `throw` compilation
In compcore.re, we currently don't do any special reference management for throw. We should determine whether the current semantics are correct, as this will become actually relevant once we have exception handling.
They're not correct (we'd need to fixup references in each call frame on the way up the stack, and we can't). When exceptions are implemented we'd need to do something like catching and rethrowing the errors in all functions to make this work, which isn't great.