[lworld] RFR: 8247569: [lworld] Align with spec for <vnew> methods [v2]

David Simms dsimms at openjdk.org
Thu Sep 29 13:42:39 UTC 2022


On Thu, 29 Sep 2022 13:24:42 GMT, David Simms <dsimms at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removing experimental code
>
> src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java line 67:
> 
>> 65:     DirectMethodHandleDescImpl(Kind kind, ClassDesc owner, String name, MethodTypeDesc type) {
>> 66:         if (kind == CONSTRUCTOR)
>> 67:             name = owner.isPrimitiveValueType() ? "<vnew>" : "<init>";
> 
> So here is an issue: `owner.isPrimitiveValueType()` simply says owner is Q-type descriptor. Need this name for Value Objects (and Q-Types), but Value Objects are L-types...
> 
> How do we differentiate here ? By using `kind` ?

https://cr.openjdk.java.net/~dlsmith/jep8277163/jep8277163-20220830/specs/value-objects-jvms.html suggests REF_invokeStatic

-------------

PR: https://git.openjdk.org/valhalla/pull/771



More information about the valhalla-dev mailing list