Working LDC iOS (iPhone) on github

Dan Olson zans.is.for.cans at yahoo.com
Mon Feb 17 09:04:11 PST 2014


Dan Olson <zans.is.for.cans at yahoo.com> writes:

>> For now, exception handling seems the most useful missing feature.  So
>> I am looking at that.
>
> I hacked in rudimentary SjLj exception handing code in the ldc/eh.d.  It
> is kind of ugly, but it works on my D test cases (tried all of the
> try/catch try/finally scope(exit) and friends, and RAII structs).  It
> should also allow cleanup handlers when C++ exceptions (foreign ex)
> bubble up, but haven't tested that yet.

Nevermind on allowing foreign (i.e. c++) exceptions for now.  When I let
a c++ exception bubble up through D stack, scope(success) triggers
instead of scope(failure).  I see why now.  scope(failure) is
essentially a catch(Throwable e) throw(t) which isn't selected.  It
would be cool to make it work, but not important, so I'll put it aside.
However, D being a system language, it _could_ have a mechanism for
catching non-D exceptions that escape from another language.

David, a question.  I read
https://github.com/ldc-developers/ldc/issues/489.

What is the symptom?  The iOS sjlj unwinder is different, but I'd like a
test case to see.

https://www.opensource.apple.com/source/libunwind/libunwind-35.1/src/Unwind-sjlj.c
-- 
Dan


More information about the digitalmars-d-ldc mailing list