[kaffe] trampoline handling

Helmer Krämer hkraemer at freenet.de
Sat Aug 7 02:53:43 PDT 2004


Hi,

the attached patch moves the handling of trampolines and method
calls into engine-specific files, thereby further cleaning up
the core vm:

Each engine provides a header file called methodcalls, which
contains the functions to create trampolines and to call a
java method. The former is used solely by classMethod.c, the
latter solely by support.c.

external.c has been modified not to use the errorstub function
whenever the native implementation of a method cannot be found
in the libraries. I think this is more correct, since someone
might try to invoke a method before and after loading the lib
containing the native implementation of it, and using errorstub
would mean that invocations would not succeed after the lib had
beed loaded.

Wrappers for the native implementation are no longer created
automagically when invoking native(). Instead, a pointer to
the native implementation (or NULL) is returned, which is then
processed by the engine.

Open Issues:
More or less work in progress.

The interpreter currently fails some of the regression tests:
	PropertiesTest fails with a StackOverflowError during
	compilation, no clue whether that's caused by my patch.

	MethodErrors fails with a NullPointerException, will have
	a closer look later today.

Still more ifdefs and unnecessary includes of header files left.


Comments / flames / whatever as always welcome.

Regards,
Helmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trampoline.patch.gz
Type: application/octet-stream
Size: 11867 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20040807/2c99bb39/attachment-0002.obj 


More information about the kaffe mailing list