_Jv_CallAnyMehtodA alignment patch

Boehm, Hans hans_boehm@hp.com
Mon Feb 10 05:23:00 GMT 2003


_Jv_CallAnyMethodA allocates an array p to hold arguments to the call.  Arguments are stored adjacently, which means they may end up misaligned.  This can fail on non-X86 architectures.

I attached a patch which allocates a jvalue for each argument instead.  This also simplifies the code.  My guess is it speeds up a little as well, though I didn't check that.  OK for trunk?  This should probably go into 3.3 as well, though we may want to try it on the trunk first.

Hans

ChangeLog entry:

2003-02-09  Hans Boehm <Hans.Boehm@hp.com>

        * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Allocate a full
        jvalue for each argument. Simplify.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: natMethod.diff
Type: application/octet-stream
Size: 2457 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030210/155976da/attachment.obj>


More information about the Java-patches mailing list