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=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,ac55ec18f7b0a53c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-14 09:27:52 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!cyclone.swbell.net!nnrp2.sbc.net.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <3b1c8cb0$1@pull.gecm.com> <3B1CEBA2.E868929D@brighton.ac.uk> Subject: Re: Ada and embedded applications X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 14 Jun 2001 11:27:43 -0500 NNTP-Posting-Host: 208.191.184.67 X-Complaints-To: abuse@swbell.net X-Trace: nnrp2.sbc.net 992536072 208.191.184.67 (Thu, 14 Jun 2001 11:27:52 CDT) NNTP-Posting-Date: Thu, 14 Jun 2001 11:27:52 CDT Organization: SBC Internet Services Xref: archiver1.google.com comp.lang.ada:8735 Date: 2001-06-14T11:27:43-05:00 List-Id: "Robert A Duff" wrote in message news:wccvgm6bk7b.fsf@world.std.com... > John English writes: > > > Hmm, the "obvious" way to handle exceptions involves one extra word > > in the stack frame (a pointer to the start of the exception handling > > code) which costs (typically) 4 bytes per handled block and 1 extra > > word to pop on exit, which may or may not cost nothing, but is certainly > > pretty cheap. > > But the more desirable implementation is to save the small cost of > setting that pointer, and spend perhaps 10,000 instructions searching a > table of code addresses when an exception is raised. If exceptions > being raised are rare, but blocks protected by exception handlers are > more common, that's a win. > > > Does anyone have any references to alternative ways of implementing > > exception handling? > > One variant of the code-table technique was decribed in the Ada 83 > rationale. The implementation you described above is essentially > equivalent to the VAX/VMS standard method. I don't have other > references at hand, but surely a lot of this stuff is common lore, and > documented somewhere. T. P. Baker and G. A. Riccardi, �Implementing Ada Exceptions,� IEEE Software, vol. 3, no. 5, pp. 42-51, 1986.