<html><head><base href="x-msg://1014/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">My take was that we would use the unwind support with RTExStack along with recording the flow constraints for the IR.  They were never that tricky.<div>
<br><div><div>On Jan 2, 2011, at 3:29 AM, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">Tony et. al. do you have much idea already in mind of what using gcc exception and/or unwind support would look like?<br><br><br>In particular, do you think we could/should/would use<br>TRY_CATCH_EXPR, TRY_FINALLY_EXPR? I'm not sure (see below).<br><br><br>Do you understand the difference between WITH_CLEANUP_EXPR and TRY_FINALLY_EXPR?<br>I don't. Maybe WITH_CLEANUP_EXPR captures a common case is very similar?<br><br><br>Regarding TRY_CATCH_EXPR, TRY_FINALLY_EXPR, they sound very promising.<br>But does CATCH_EXPR provide the right construct for deciding to catch or not,<br>and passing the exception properly to the handler?<br><br><br>Or should we use RTExStack nearly or completely unchanged, but:<br> 1) have it call libgcc/libunwind, via interface RTStack.<br> 2) in the backend mimic TRY_CATCH_EXPR, TRY_FINALLY_EXPR's affects/pessimisations<br>  on the control flow graph and such?<br>  <span class="Apple-converted-space"> </span><br><br>Related question is how to model throwing an exception in the backend.<br>This I had looked at even less (e.g. trying to understand how g++ uses this stuff) but is clearly important.<br>g++ clearly sometimes calls __cxa_throw, not clear if it always does.<br>Not clear it does anything else in terms of informing the backend. It looks like not.<br><br><br> - Jay<br><br></div></span></blockquote></div><br></div></body></html>