RFR(S): 8223965: [lworld] Reflective method invocation does not handle value type returned as fields
tobias.hartmann at oracle.com
Mon May 20 11:29:02 UTC 2019
On 17.05.19 19:16, Ioi Lam wrote:
> Hi Tobias,
> The changes look good to me.
> - Ioi
> On 5/17/19 5:53 AM, Tobias Hartmann wrote:
>> please review the following patch:
>> If a method is invoked via reflection we first call through the runtime  and once the method is
>> invoked more than 'sun.reflect.inflationThreshold' times we emit bytecodes to directly call the
>> method. Now while the generated bytecodes are fine because they are executed through the interpreter
>> (or the JIT), the call stub does not correctly handle (c2 compiled) methods that return a value type
>> as fields.
>> I added the corresponding check and also had to use different registers in the call stub to avoid
>> trashing those used by the return convention.
>>  Reflection::invoke_method() -> ... -> StubRoutines::call_stub()
More information about the valhalla-dev