This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: CNI for C


>>>>> "Richard" == Richard Dale <Richard_Dale@tipitina.demon.co.uk> writes:

Richard> Both java and C# use the language independent Smoke library.

Richard> All 20000+ Qt/KDE method calls in the api are funneled to a
Richard> single Invoke() call, in SmokeInvocation.cs:

Richard> So the next thing to be done is to add code to look up the
Richard> method to call in the Smoke runtime, then marshall the args
Richard> in a Object[] array into the C++ types. Then call the C++
Richard> method, and marshall the return value from C++ to C#.

This is a cool approach, but I wonder about the performance of it.
One nice part of the "GDirect" approach is that some simple C calls
will have no overhead at all, at least if we were to write a
gcj-specific GDirect.  That is, the pointer in the method table would
point directly at the C function.  (Of course whether this is an
important optimization is unknown...)

Tom


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