|Exception Handling firstname.lastname@example.org (David Jobet) (2002-07-21)|
|Re: Exception Handling email@example.com (VBDis) (2002-07-24)|
|Re: Exception Handling firstname.lastname@example.org (Casse Hugues) (2002-07-24)|
|Re: Exception Handling email@example.com (jacob navia) (2002-07-24)|
|Re: Exception Handling firstname.lastname@example.org (David Jobet) (2002-07-25)|
|Re: Exception Handling email@example.com (journeyman) (2002-08-04)|
|Re: Exception Handling firstname.lastname@example.org (Nick Maclaren) (2002-08-10)|
|Re: Exception Handling email@example.com (Marco van de Voort) (2002-08-10)|
|Re: Exception Handling firstname.lastname@example.org (Maxim Reznik) (2002-08-10)|
|[6 later articles]|
|From:||"Casse Hugues" <email@example.com>|
|Date:||24 Jul 2002 02:28:41 -0400|
|Organization:||Guest of ProXad - France|
|Posted-Date:||24 Jul 2002 02:28:41 EDT|
|X-Comment-To:||"David Jobet" <firstname.lastname@example.org>|
I uses the POSIX C functions setjmp()/lonjmp() from <setjmp.h> for
emulating exceptions in my C programs. These functions stores the
registers in a memory and restore it when the jump is performed. This is
the faster way to implement it I know (in C).
But you must think about memory management because these functions
handle only the register and do not know anything about memory. Usually,
fast exception handling requires either special memory structure, or
On Sun, 21 Jul 2002 08:06:29 +0200, David Jobet wrote:
> I'm developping a compiler (for the fun) for a new language called
> Nosica. (http://nosica.ng-market.net)
> I'm stuck with exception implementation because I'm using C as as my
> assembly language.
> Finding docs for exceptions is not very easy, but I came to a model
> using custom setjmp /longjmp (because the standard C version appears to
> save a lot more than needed for C++ compatibility). ...
> Basically, I need to have the return address that the called function
> would return to if there was no exception thrown. In this case, the
> compiler could switch on this return value and produce the *good* code
> needed to clean up local variables.
> Problem is I don't know how to get this return address in order to
> produce the good case (here h_addr and f_addr).
> Is there any way to get them using assembly ?
Return to the
Search the comp.compilers archives again.