------- Comment #12 from green at redhat dot com 2005-11-07 15:06 ------- (In reply to comment #11) > You're not describing this clearly. :-) > > We need to point the execution vector at a piece of code that throws an > exception with the appropriate args. Now, how should we do that?
The closure mechanism was specifically designed for when you want to call interpreted code. We don't want to do this here; we just want to throw an exception with the right argument (stored in the closure object). The current patch uses the closure mechanism to call the trampoline, which in turn uses the ffi_call mechanism to call the exception throwing function. But we don't need to use ffi_call here, we can just call the exception throwing function directly. Then you'll realize that these functions don't need to be separate at all. Then you'll realize that you don't need to bother setting up the ffi_cif - all you need is the exception argument. Does this help explain? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24616