Re: exceptions & dataflow

Jason Merrill <jason@cygnus.com>
10 Feb 1998 01:43:26 -0500

          From comp.compilers

Related articles
exceptions & dataflow djames@cs.utah.edu (David James) (1998-02-03)
Re: exceptions & dataflow acha@play.cs.ucsb.edu (Anurag Acharya) (1998-02-07)
Re: exceptions & dataflow sergey@solyanik.com (Sergey Solyanik) (1998-02-07)
Re: exceptions & dataflow jason@cygnus.com (Jason Merrill) (1998-02-08)
Re: exceptions & dataflow dlmoore@ix.netcom.com (David L Moore) (1998-02-08)
Re: exceptions & dataflow dlmoore@ix.netcom.com (David L Moore) (1998-02-09)
Re: exceptions & dataflow sergey@solyanik.com (Sergey Solyanik) (1998-02-10)
Re: exceptions & dataflow jason@cygnus.com (Jason Merrill) (1998-02-10)
Re: exceptions & dataflow mcdirmid@beaver.cs.washington.edu (1998-02-10)
Re: exceptions & dataflow jeremy@softway.com.au (1998-02-10)
Re: exceptions & dataflow jason@cygnus.com (Jason Merrill) (1998-02-12)
Re: exceptions & dataflow fjh@hydra.cs.mu.oz.au (Fergus Henderson) (1998-02-12)
Re: exceptions & dataflow chase@world.std.com (David Chase) (1998-02-12)
Re: exceptions & dataflow amitb@sasi.com (Amit Bhatnagar) (1998-02-12)
[3 later articles]
| List of all articles for this month |

From: Jason Merrill <jason@cygnus.com>
Newsgroups: comp.compilers
Date: 10 Feb 1998 01:43:26 -0500
Organization: Cygnus Solutions, Sunnyvale, CA
References: 98-02-025 98-02-027 98-02-034 98-02-040
Keywords: optimize

Jason Merrill wrote:
>> I'm not sure what you're saying. I'm not very familiar with Java, but
>> finally blocks seem analogous to C++ implicit destructors in terms of
>> when they get run;


>>>>> David L Moore <dlmoore@ix.netcom.com> writes:
> In Java, the finalizer is run when the storage for the object
> gets garbage collected, which can be much later.


I was actually refferring to the try...finally construct in Java, not to
finalizers.


> you could use this implementation in C++ too. Whenever you create an
> object on the stack you could put a pointer to it and its destructor
> somewhere in a known spot so that when you unwind the stack you can
> call the destructor.


Yep; the setjmp/longjmp-based EH implementation in gcc uses a stack of
cleanups. I am given to understand that Ada requires something similar...?
Our PC range table implementation expands out the cleanups to avoid any
time overhead in the unexceptional case.


Jason
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.