Pinaki Mukherjee wrote:
Hi Guilhem,
I've modified the intrp according your previous modifications to slot. It mainly runs and passes all but 12 tests. The tests are more double oriented so maybe there is still a little nitpick there. Anyway, here is a patch against CVS head that will solve nearly all your problems for intrp.
Cheers,
Guilhem.
I seemed to work around the earlier problem. I just added another data structure exactly similar to the 'slots' data structure, but having member as the one I am adding. So the 'slots' structure is unaltered now. 'make' was successful and I could build the Kaffe executable. But now on running 'make check' I am getting the following error message:
PASS: HelloWorldApp.class.save error compiling: TestScript: line 1: 31487 File size limit exceeded/workspace/pinaki/kaffe-1.1.4/kaffe/kaffe/kaffe-bin -noverify at.dms.kjc.Main -classpath ".::::.:compile_time:.:::/workspace/pinaki/kaffe-1.1.4/libraries/javalib/kjc .jar:::" -d . ./HelloWorldApp.java FAIL: HelloWorldApp.java FAIL: TestIntLong.java error compiling: TestScript: line 1: 31683 File size limit exceeded/workspace/pinaki/kaffe-1.1.4/kaffe/kaffe/kaffe-bin -noverify at.dms.kjc.Main -classpath ".::::.:compile_time:.:::/workspace/pinaki/kaffe-1.1.4/libraries/javalib/kjc .jar:::" -d . ./TestFloatDouble.java PASS: TestFloatDouble.java ... ...
Can you please tell me why this is happening.
Thank you again for all the help.
Pinaki
_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
? pinaki_patch Index: machine.c =================================================================== RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/intrp/machine.c,v retrieving revision 1.42 diff -u -r1.42 machine.c --- machine.c 5 Apr 2004 17:43:39 -0000 1.42 +++ machine.c 24 Aug 2004 15:14:44 -0000 @@ -132,13 +132,22 @@ /* If this is native, then call the real function */ methaccflags = meth->accflags; if (methaccflags & ACC_NATIVE) { + int nargs = (methaccflags & ACC_STATIC) ? METHOD_NARGS(meth) : (METHOD_NARGS(meth)+1); + jvalue *arguments = (jvalue *)alloca(sizeof(jvalue)*nargs); + int i; + jvalue ret; + + for (i = 0; i < nargs; i++) + memcpy(&arguments[i], &arg[i].v, sizeof(jvalue)); + NDBG( dprintf("Call to native %s.%s%s.\n", meth->class->name->data, meth->name->data, METHOD_SIGD(meth)); ) if (methaccflags & ACC_STATIC) { - callMethodA(meth, meth, 0, (jvalue*)arg, (jvalue*)retval, 1); + callMethodA(meth, meth, 0, arguments, &ret, 1); } else { - callMethodA(meth, meth, ((jvalue*)arg)[0].l, &((jvalue*)arg)[1], (jvalue*)retval, 1); + callMethodA(meth, meth, arguments[0].l, &(arguments)[1], &ret, 1); } + memcpy(&retval->v, &ret, sizeof(jvalue)); return; } Index: methodcalls.c =================================================================== RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/intrp/methodcalls.c,v retrieving revision 1.1 diff -u -r1.1 methodcalls.c --- methodcalls.c 19 Aug 2004 19:29:03 -0000 1.1 +++ methodcalls.c 24 Aug 2004 15:14:45 -0000 @@ -31,7 +31,17 @@ Method *meth = (Method *)call->function; if ((meth->accflags & ACC_NATIVE) == 0) { - virtualMachine(meth, (slots*)(call->args+2), (slots*)call->ret, THREAD_DATA()); + slots *sl = (slots *) alloca(sizeof(slots)*(call->nrargs-2)); + slots ret; + int i; + + for (i = 0; i < call->nrargs-2; i++) + memcpy(&sl[i].v, &call->args[2+i], sizeof(jvalue)); + + virtualMachine(meth, sl, &ret, THREAD_DATA()); + + if (call->retsize > 0) + memcpy(call->ret, &ret.v, sizeof(jvalue)); } else { Hjava_lang_Object* syncobj = 0; Index: slots.h =================================================================== RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/intrp/slots.h,v retrieving revision 1.3 diff -u -r1.3 slots.h --- slots.h 30 May 2002 22:47:33 -0000 1.3 +++ slots.h 24 Aug 2004 15:14:45 -0000 @@ -44,6 +44,7 @@ /* NB. This should match jvalue and eventually be replaced by it */ typedef struct _slots { + int size[2]; union { jint tint; jword tword;
_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe