[Mono-list] Re: [Ximian-mono-list] Exceptions
Miguel de Icaza
miguel@ximian.com
20 Nov 2001 12:08:04 -0500
> http://www.complang.tuwien.ac.at/andi/javaws98a4.ps
Some background: I have not read the above article in depth, so my
comments below are mostly my gut feeling.
* I would like some research on how the Microsoft .NET platform
actually handles exceptions. This might shed some light into
the problem (also, we want to run on Windows, so it is important
to keep in mind that we have to be compatible with
whatever the existing system does).
* The two-return values approach seems highly hackish, I have never
seen anything like that. My guess is that CACAO can
afford that because they have so many registers to spare,
which is not ideal for the x86.
* Since we are going to be using the ORP GC system, and cleaning
up the stack is going to be required as well as maintaining the
liveness of objects in registers, I suggest that a deep
look at the way ORP handles exceptions is done before any
implementation work begins.
* It seems like we are going to need to keep track of the stack
state and the stack anyways (to enumerate all the roots for
the garbage collector and to hijack returns to force a
collection).
A first pass at the ORP code for handling exception does not show any
reason why handling exceptions would be slow. The only drawback is that
you have include during basic-block/flow analysis the try/catch/finally
blocks (but you should anyways ;-)
Please look into what ORP does before implementing anything, the code I
have seen so far feels right.
Miguel.