review request (S): 7012087: JSR 292 Misleading exception message for a non-bound MH for a virtual method
John Rose
john.r.rose at oracle.com
Mon Apr 4 14:59:46 PDT 2011
On Apr 3, 2011, at 9:45 AM, Vladimir Kozlov wrote:
> 1739 if ((dmf_flags &~ (MethodHandles::_dmf_has_receiver |
> ^ better '& ~('
> 1740 MethodHandles::_dmf_does_dispatch |
> 1741 MethodHandles::_dmf_from_interface | <<<<<<< duplicated
> 1742 MethodHandles::_dmf_from_interface)) != 0)
Thanks. (I personally think of &~ as a single operator, but I try to keep it out of my code.)
> has_receiver is set using different checks, may add an assert that they have the same result:
>
> 1744 bool has_receiver = ((dmf_flags & MethodHandles::_dmf_has_receiver) != 0);
> 1745 if (actual_method != NULL) {
> 1746 has_receiver = (!actual_method->is_static());
Good point. I deleted the second assignment to has_receiver, and changed the mhArity computation to be self-contained:
+ mhArity = ArgumentCount(actual_method->signature()).size();
+ if (!actual_method->is_static()) mhArity += 1;
(Should I use ?: still?)
-- John
> Vladimir
>
> On 4/2/11 6:02 PM, John Rose wrote:
>> Error message formatting. Multiple customers have stumbled over this.
>>
>> http://cr.openjdk.java.net/~jrose/7012087/webrev.00/
>>
>> -- John
>>
More information about the hotspot-compiler-dev
mailing list