Re: [Vala] improved static exception checking



Hi Jared,

On Mon, May 26, 2008 09:47, Jared Moore wrote:
I had a few ideas about how to improve on the exception checking in
semanticanalyser.vala.

1) Finish adding exception propagation to more AST node types, e.g.
SwitchSection, try/catch blocks, etc

Sure, makes sense, we need some enhancements there.

2) Separate all exception checking into a new code visitor, and run
exception checking after the semantic analyzer. This would allow for
better separation of concerns and make the code easier to read.

I'm not sure whether this would help that much for the current checks.
However, we probably need a new visitor for exception handling to solve
bug 475922[1]. What we should do there is to unfold expressions that have
inner expressions that might fail, so that exceptions can be caught where
they happen and not only before the next statement.

3) Report unhandled exceptions at the source, rather than at the top
of the containing method. This can be implemented as follows (or
something similar):

This should already be working, I've implemented this on top of your patch
for bug 482999. Haven't you tested it or have you found issues in the
implementation?

Thoughts> If there is positive feedback on these ideas, I'll start
work on implementing them.

It would be really nice if you could start working on the unfolding to fix
bug 475922[1]. That's something I want to see fixed for a long time but
never got around to implementing this.

Thanks,

Juerg

[1] http://bugzilla.gnome.org/show_bug.cgi?id=475922




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]