This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libgcj/1516: Method.invoke won't accept boolean parameters
- To: bryce at gcc dot gnu dot org
- Subject: Re: libgcj/1516: Method.invoke won't accept boolean parameters
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: 28 Dec 2000 04:46:00 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Bryce McKinlay <bryce at albatross dot co dot nz>
The following reply was made to PR libgcj/1516; it has been noted by GNATS.
From: Bryce McKinlay <bryce@albatross.co.nz>
To: jeff.sturm@commerceone.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/1516: Method.invoke won't accept boolean parameters
Date: Thu, 28 Dec 2000 17:43:10 +1300
jeff.sturm@commerceone.com wrote:
> >Description:
> Method.invoke throws java.lang.IllegalArgumentException for
> methods with boolean (primitive) types in their signatures.
> >How-To-Repeat:
> Run the attached test case. It should print `true' and
> `false', not throw an exception.
> >Fix:
> Add boolean rules to can_widen. Alternatively, rewrite
> can_widen to use an array of bitmaps or similar, since the
> existing rules are not too pretty or efficient.
I've checked in a fix for this:
http://sources.redhat.com/ml/java-patches/2000-q4/msg00284.html
Another option for efficiency improvement here might be to combine the ffi_type
lookup with the primitives conversion table. However, right now I'd say that
micro-optimizing the _Jv_CallAnyMethod stuff is a misdirected effort, I'll bet
that by far the slowest part of invoke() is the _Jv_LookupDeclaredMethod()
call, which must be done to check for overriding. Per's plan for speeding up
_Jv_LookupDeclaredMethod involves global String interning.
regards
[ bryce ]