call to __Value methods can't pass fields as arguments

Roland Westrelin rwestrel at redhat.com
Fri Mar 24 15:08:28 UTC 2017


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