Of course the best solution might be to just implement reasonably fast exceptions by:

1. Restricting the exception object to 512 bytes, preallocated in TLS.

2. Only have one exception in flight per thread

3. Require that the first 8 bytes of the exception buffer are 0 when no exception is in flight, and use them for encoding exception type when one is in flight.

4. Leave it to the implementation how to propagate awareness of an exception. (LLVM has many different calling conventions, it might be desirable to do it different for each one).

5. Constrain calls from C to D to nothrow functions.

Reply via email to