Adapter sharing is broken with -XX:+ValueTypePassFieldsAsArgs
tobias.hartmann at oracle.com
Tue Mar 28 11:18:00 UTC 2017
On 28.03.2017 13:07, Roland Westrelin wrote:
>> Because we would still treat these signatures as equal (MyValue has an int field):
>> m1(MyValue v) -> (T_VALUETYPE, T_INT, T_VOID)
>> m2(Object o1, int i, Object o2) -> (T_OBJECT, T_INT, T_OBJECT)
>> Which is not correct because we cannot use the adapter for m2 to pass a value type to m1.
> I see. But T_VOID doesn't become T_OBJECT, right?
Yes, you are right. T_VOID stays T_VOID. But if MyValue has an Object field, it's still a problem:
m1(MyValue v) -> (T_VALUETYPE, T_OBJECT, T_VOID) -> (T_LONG, T_LONG, T_VOID)
m2(Object o1, long i) -> (T_OBJECT, T_LONG, T_VOID) > (T_LONG, T_LONG, T_VOID)
> Anyway, your change looks good.
Thanks for reviewing this.
More information about the valhalla-dev