[LLVMdev] RFC: New Exception Handling Proposal
Bill Wendling
wendling at apple.com
Thu Nov 19 18:08:05 PST 2009
On Nov 18, 2009, at 2:48 PM, David Greene wrote:
> On Wednesday 18 November 2009 16:22, Bill Wendling wrote:
>> I've been looking into a new way to implement exception handling in
>> LLVM. The current model has many disadvantages, in my opinion. I try
>> to address them with this proposal. I also try to make exception
>> handling much more understandable to the normal human reader. :-) Any
>> new proposal will need to address all present and future languages'
>> exception handling methodologies. I believe that I created something
>> which is generic enough.
>>
>> Please read and let me know your opinions!
>
> I'm definitely not an expert in this domain but the proposal looks
> very good.
Thanks!
> I prefer to have the filters and personality as part of
> the function symbol itself, not in the entry block or at the
> definition.
> That way one doesn't need a function definition to know some things
> about the function. Perhaps it's part of the function type. I'm not
> sure what the best way to go is.
I tend to agree. It's a cleaner way to view this data, and will be
faster to query the function for. If it were on the function
declaration and it specified type filters, then we may be able to
optimize away catches which don't match the filter types in the caller
function.
> I'm not sure if that's feasible in all languages with separate
> compilation,
> though. I believe C++ requires a function declaration throw clause
> to match
> the function definition. Someone with more knowledge will have to
> answer.
>
> And even if the language requires consistency, we all know programmers
> provide something less. :)
-bw
More information about the llvm-dev
mailing list