Related articles |
---|
Implementation and Optimization of exceptions ( static analysis possi sdm7g@elvis.med.virginia.edu (Steven D. Majewski) (1995-07-21) |
Re: Implementation and Optimization of exceptions ( static analysis p bobduff@world.std.com (1995-07-26) |
Re: Implementation and Optimization of exceptions ( static analysis p macrakis@osf.org (1995-07-28) |
Re: Implementation and Optimization of exceptions ( static analysis p chase@centerline.com (1995-07-28) |
Re: Implementation and Optimization of exceptions ( static analysis p pardo@cs.washington.edu (1995-08-03) |
Re: Implementation and Optimization of exceptions ( static analysis p mfinney@inmind.com (1995-08-07) |
Re: Implementation and Optimization of exceptions ( static analysis p bill@amber.ssd.hcsc.com (1995-08-13) |
Newsgroups: | comp.compilers |
From: | chase@centerline.com (David Chase) |
Keywords: | errors, optimize |
Organization: | CenterLine Software |
References: | 95-07-142 |
Date: | Fri, 28 Jul 1995 21:41:04 GMT |
>, "Steven D. Majewski" <sdm7g@elvis.med.virginia.edu> writes:
> The exception processing model I'm most familiar with ( from long
> years on a VAX, and from similar implementations for various
> languages ) is the stack based one, where every procedure or
> protected block of code has some stack based structure that indicates
> how ( and maybe what ) exceptions are handled.
If I recall how the VAX did it, these routines had to be dynamically
registered each time a procedure was entered. It's also possible to
build a table associating exception handlers and unwinders with
specific PC ranges. Last year I wrote an article about doing this
for JCLT (a journal edited by the comp.compilers moderator) but this
is pretty old technology. In current, widely available compilers, I
know the Sun C++ compiler uses this technique (I worked there at the
time, and helped design it).
> A continuation model - whether visible in the language (as in
> Scheme) or hidden in the implementation is the other common model I
> know of. ( Any others? )
> Do any language implementations do static analysis and optimization
> of exceptions within a procedure - in effect, translating them into
> goto's and avoiding the overhead of handlers ?
They might. We certainly talked about it while implementing Modula-3
years ago, and I got the impression that some other compiler
(for Modula-2+?) did this. One could also claim that this is a
"simple result" of sufficient constant propagation and other
optimization in a continuation passing model.
speaking for myself,
David Chase
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.