review request (S): 7012087: JSR 292 Misleading exception message for a non-bound MH for a virtual method

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Apr 4 15:40:37 PDT 2011


John Rose wrote:
> 1741                        MethodHandles::_dmf_from_interface |  <<<<<<< duplicated

Did you remove duplicate?

> 1742                        MethodHandles::_dmf_from_interface)) != 0)
> 
>> 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;

This code is fine, don't need "?:".

Vladimir

> 
> (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