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

David Simms dsimms at openjdk.org
Thu Oct 20 08:31:33 UTC 2022


On Wed, 19 Oct 2022 18:37:42 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> David Simms has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update test/jdk/valhalla/valuetypes/StaticFactoryMethodHandleTest.java
>>   
>>   Co-authored-by: Mandy Chung <mandy.chung at oracle.com>
>
> src/hotspot/share/oops/method.cpp line 945:
> 
>> 943: // A method named <init>, if non-static, is a classic object constructor.
>> 944: bool Method::is_object_constructor() const {
>> 945:   return name() == vmSymbols::object_initializer_name() && !is_static();
> 
> Do we still need to check that the method is not static?
> Now that constructors and static factories have different names, the check of the static flag looks superfluous (applies to the method below as well, and to the comments above the method declaration).

You are correct, any kind of correctness check has already happened during parsing

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

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



More information about the valhalla-dev mailing list