This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Exceptions


Hi there,

I got the exception stuff working also, so now exceptions can be
thrown `through' an ffi-call.  This involves:

   * compiling libffi with -fexceptions enabled

   * rewriting the assembly code routines to use asm("").  

The latter is easier than it sounds, there is no need to use the
extended asm stuff.  Just copy the contents of the respecitive
assembly code file into a .c file, put `asm("' at the beginning of all
lines and `");' at the end; and finally, put the whole thing in a
function returning void.

The effect of this is that the compiler will generate stack unwinding
information, so that the runtime system can handle unwinding across
ffi calls.

So, now I finally got the java version of `antlr' up and running, it
seems.   A second non-trivial test program!  

-- Kresten

 Kresten Krab Thorup, Ph.D. Candidate
 c/o Yonezawa Laboratory
 Department of Information Science   
 The University of Tokyo             
 7-3-1 Hongo, Bunkyo-ku, Tokyo 113 Japan
 Fax: +81-(0)3-5689-4365	 
 Phone: +81-(0)3-5841-4118
 Mobile: +81-(0)90-3693-5715


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]