This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: feature request primitive-native-method
- From: Per Bothner <per at bothner dot com>
- To: Vladimir Tsichevski <wowa at jet dot msk dot su>
- Cc: kawa at sources dot redhat dot com
- Date: Thu, 20 Mar 2003 16:07:18 -0800
- Subject: Re: feature request primitive-native-method
- References: <3E79DB1C.6050603@jet.msk.su>
Vladimir Tsichevski wrote:
subject says it all. It would be convenient to call native methods from
Scheme without writing Java sources just to describe them.
That's not possible. The 'native' attribute of a method
is an attribute of its *implementation*, not its call.
There is no way to express in bytecode *calling* native
code.
Note the existing primitive-xxx-method macros do not
generate metyhod - they just generate *references* to
method, that must already exist.
What one could do is have some way to automatically
generate a dummy Java class that has a native method,
and perhaps at the same time generate the JNI wrapper
that calls a C function. But that's a non-trivial
task, starting with the design (which should ideally
be compatible with existing Foreign Function Interfaces).
--
--Per Bothner
per at bothner dot com http://per.bothner.com/