Re: carbon throwing objc exceptions
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Greg Parker gparker@apple.com Runtime Wrangler _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Sep 15, 2009, at 2:58 PM, Nathan Herring wrote: I have separately made the suggestion, via rdar://7225898, that Apple move ObjC[++] to use libUnwind, so that callbacks of any kind would see this as a (possibly foreign) exception, and would either (1) terminate due to un-unwindability (rather than quietly unwind stack that cannot be unwound), (2) allow for standard exception handling, including catching and rethrowing for finally-like behavior. That's unfortunately not binary-compatible with existing 32-bit Mac binaries. Such code does not include the unwind tables that libunwind needs to do its work, so exceptions that work today would almost always terminate as un-unwindable. iPhone and 64-bit Mac do have C++-compatible Objective-C exceptions courtesy of libunwind. Objective-C exceptions run destructors and `catch (...)` clauses, and C++ exceptions unlock `@synchronized` and run `@catch (...)` and `@finally` clauses. (But C++ and Objective-C exceptions are implemented with setjmp/ longjmp on iPhone OS, so you still get the same clumsy machine code that started this whole thread.) This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg Parker