Subject: Re: SDL-News: Re: VERILOG Comments on Exception handling
From: yves Lejeune (lejeune#tlse.verilog.fr )
Date: Fri Jun 26 1998 - 15:57:38 GMT
The originator of this message is responsible for its content.
-----From lejeune#tlse.verilog.fr (yves Lejeune) to sdlnews -----
I think that I did not explained myself clearly enough, I hope
that the comments bellow will make things more clear.
> -----From anders#tdr.dk (Anders Olsen) to sdlnews -----
> Dear Yves
> I understand your concern that exception handling adds overhead during execution,
> but I think it is difficult to avoid overhead with exception. This is also a wellknown
> problem in C++. But I think that if exception handling must be resolved statically,
> the real power of exception handling is lost. Most C++ compilers can switch off
I am glad that you mention C++, as in C++ the scopes of exception handlers
are ``statically'' defined scopes, the same as the visibility scopes
(a catch statement defines a new scope unit).
That means than when the compiler generates code for a statement,
it knows which exception handler is concerned if an exception is raised
by the statement.
I think that this is a properties that SDL exceptions should have too,
both for efficiency reasons and for readability reasons :
as an SDL user I could not use an exception mecanism for which
I can not know just by reading code which exception handler will be activated.
> exception handling, the same could be done in the SDL tools.
This is another point: my remark was about the overhead of exception handling
when you use them, not when they are not used.
> If exception handling is solved statically, how should progation from (possible remote)
> procedures be handled?
A procedure call is effectively a special case, as a function call in C++ :
when an exception is not handled locally by a procedure,
the exception handler is not known by the procedure,
it is the procedure caller which will ``make a join'' to the exception handler
visible from the procedure call statement.
> Regards Anders
> -----End text from anders#tdr.dk (Anders Olsen) to sdlnews -----
> For help, email "majordomo#sdl-forum.org" with the body of your email as:
> or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org
In other words, I think that everywere in your proposal when you state
that a NEXTSTATE deactivates an exception handler, you should state
that JOIN deactivates the exception handler too, and activates
the exception handler visible from the joined label.
It has the same meaning as removing the dynamic activation/deactivation
150, rue Nicolas Vauquelin - BP 1310
31106 Toulouse Cedex - France
Tel : +33 5 61 19 29 39
Fax : +33 5 61 40 84 52
e-mail : lejeune#verilog.fr
-----End text from lejeune#tlse.verilog.fr (yves Lejeune) to sdlnews -----
For help, email "majordomo#sdl-forum.org" with the body of your email as:
or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org
This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT