[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]

Nick Johnson
Mon, 20 Jul 2009 14:43:09 -0000

On Mon, Jul 20, 2009 at 10:09 AM, Mark Shannon<marks at dcs.gla.ac.uk>
wrote:
> Andrew Haley wrote:
> If you can make your point without any references to any C/C++ specific
> features it might be more convincing ;)
>

I did.  Recall my mention of java/c#/ruby/python's finally/ensure
blocks, or C#'s using blocks.  For proper implementation, these need
multi-level unwinds, as they specify that some code must run, even if
an exception would bail-out.

> I take it you have never used Python ;)
> (Python uses exceptions to terminate loops, so it helps if they aren't
> too slow)

I have used python, and it is slow (sorry).  In fact, python
Exceptions are implemented in python as a second return value, thus
EVERY function, even those which don't throw exceptions, must pay the
price.  And just because the python community does it, doesn't mean
it's good programming practice.

>Please try and get out of the C++ mindset, llvm may be implemented *in*
>C++, but its not implemented just *for* C++ (at least I hope it isn't).

That is exactly my argument.  Multi-level unwinds are required by MANY
languages.

--
Nick Johnson