[lworld] RFR: Add Class.isIdentity
Mandy Chung
mchung at openjdk.java.net
Wed Jun 1 17:22:59 UTC 2022
On Wed, 1 Jun 2022 16:57:59 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> src/hotspot/share/oops/instanceKlass.cpp line 3398:
>>
>>> 3396: }
>>> 3397: }
>>> 3398: // Do not strip ACC_SUPER, its ACC_IDENTITY now
>>
>> I think this should apply only if `EnableValhalla` (or `--enable-preview` is set).
>
> The semantics of the bit are dependent on (at least) the class file version.
> That's part of the modifier problem, the bit(s) are/will/need to be interpreted differently depending on the class file version and source (class vs member). Solution is TBD.
> Preview is not implemented yet.
I expect when `--enable-preview` is implemented, `EnableValhalla` or some other flag can be used to detect that. The class file version (`ClassFileParser::supports_inline_types`) only applies to a single class. When running with value types enabled, `Class::isIdentity` should return true for classes of a class file version that does not support value type. That's why I think `if (EnableValhalla)` should be adequate for this patch until preview is implemented.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/700
More information about the valhalla-dev
mailing list