call to __Value methods can't pass fields as arguments
Frederic Parain
frederic.parain at oracle.com
Fri Mar 24 15:21:07 UTC 2017
Roland,
Cannot we use T_VALUETYPE instead of T_OBJECT?
Fred
> On Mar 24, 2017, at 11:08, Roland Westrelin <rwestrel at redhat.com> wrote:
>
>
> Hi Fred,
>
> Thanks for looking at this.
>
>> Thank you for finding this issue with the __Value methods,
>>
>> I’m concerned with changes in sharedRuntime.cpp:2607:
>>
>> 2605 ValueKlass* vk = ValueKlass::cast(holder);
>>
>> 2606 if (vk == SystemDictionary::___Value_klass()) {
>> 2607 sig_extended.push(SigEntry(T_OBJECT));
>> 2608 } else {
>>
>> 2609 const GrowableArray<SigEntry>& sig_vk = collect_fields(vk);
>> 2610 sig_extended.appendAll(&sig_vk);
>>
>> 2611 }
>>
>> Is it trying passing a reference to a standalone value by pretending that it is
>> an Object?
>
> It is not. It's recording that a _Value should be passed as a reference
> so the logic that performs the allocation of arguments to registers
> picks up a register that can hold a reference. Using T_OBJECT here is
> ugly. It should probably be revisited. I'll add a comment.
>
> Roland.
More information about the valhalla-dev
mailing list