Method.invoke() broken --with-engine=intrp

Alexandre Oliva oliva at dcc.unicamp.br
Tue Apr 21 06:38:56 PDT 1998


Hi!

I've just found out that the Interpreter engine is broken on
sparc-sun-solaris2.5, since kaffe 0.10.0.  This report is based on the 
snapshot available on Apr 20, 10PM GMT.

First of all, invoking a method using the Core Reflection API doesn't
work; the attached patch should fix the problem that shows up by
running the attached program under sparc-sun-solaris2.5, with intrp
only (works with jit), with arguments `a b c'.

I noticed that there are only two calls to callMethodA in the source
code of Kaffe: one in kaffe/kaffevm/classMethod.c:251, and another in
libraries/clib/native/Method.c:102.  However, the former passes
METHOD_INDIRECTMETHOD(meth) as the second argument, whereas the latter 
passes METHOD_NATIVECODE(meth).  I don't understand the need for this
difference, but I feel something must be wrong.  Anyway, I tried to
modify the call in Method.c, but this caused the jit engine to stop
working.  Can anyone tell me the rationale for this difference?

I tried to modify this because javac won't run with intrp, but it will 
with jit.  Although with jit it will compile the attached file
successfully, with intrp it will just print:

test.java:1: Superclass java.lang.Object of class test not found.

^
1 error


I have double-checked environment variables and shared libraries, and
all is correct.

I'm currently investigating the problem, but just in case someone has
a brilliant idea or has got this problem already...

-- 
Alexandre Oliva
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.java
Type: application/octet-stream
Size: 377 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19980421/8eeb0065/attachment-0014.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intrp-invoke.diff
Type: application/octet-stream
Size: 826 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19980421/8eeb0065/attachment-0015.obj 


More information about the kaffe mailing list