From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!uakari.primate.wisc.edu!caen!uwm.edu!bionet!agate!ucbvax!LIBRA.CS.NPS.NAVY.MIL!erickson From: erickson@LIBRA.CS.NPS.NAVY.MIL (David Erickson) Newsgroups: comp.lang.ada Subject: Exceptions Message-ID: <9103061724.AA02582@libra.cs.nps.navy.mil> Date: 6 Mar 91 17:24:18 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: erickson@taurus.cs.nps.navy.mil (David Erickson) Organization: Naval Postgraduate School, Monterey CA List-Id: I have a few questions related to implementation of exceptions in Ada: Can I assume that any block with an exception handler will require an activation record at run-time (as will blocks with declarations, procedures, functions and packages)? Exception handling appears to be inherently inefficient, since the entire dynamic chain may have to be searched, checking each activation for an appropriate handler (including activations which have no handler). Are there any optimizations which are normally used to improve this search process? Since exception declarations obey static scoping rules, but the search for exception handlers follows dynamic links, an exception can go out of and back into scope (see Barnes pg. 181 for an example). How are names resolved in such a way that two exceptions with the same name, declared in different parts of the program, do not get confused? I would also appreciate any references to articles which address Ada implementation issues. -Dave Erickson