The Ada 83 TLALOC compiler has a nearly complete first version of TEXT_IO. I’ll try to implement exception handling. I am looking at documentation on this not so obvious question. If somebody has articles, theses or other doc about the subject, I am interested.
There is a brief section about the runtime data structures used by GNAT in this book (page 193).
I think early versions of GNAT (like early C++ compilers) used setjmp/longjmp to perform control jumps, which is portable but has a runtime cost due to saving the execution context and maintaining a runtime linked list of these contexts even when no exceptions are thrown.
Nowadays I think most compilers (including GCC and so I believe GNAT) use some form of lookup-table-based implementation (this article is in the context of C++ but the techniques should also apply to Ada) that have less runtime overhead (i.e. avoid having to call setjmp or equivalent) but are more complex to implement.
Edit: Looked at the GNAT docs and they explain either setjmp/longjmp or table-based exceptions can be used.
Hi ! Thank you for those information elements. It is helpful.