[lworld] RFR: 8263568: [lworld] Fix residual reference to 'value'
Srikanth Adayapalam
sadayapalam at openjdk.java.net
Tue Mar 23 08:05:57 UTC 2021
On Mon, 22 Mar 2021 13:18:44 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> javap tool is still outputting primitive type class modifiers as `value` class, it looks like we should tweak this.
>>
>> (Actually, I'm wondering what's the meaning of 'native' for fields that annotated with ACC_PRIMITIVE in flagToModifier? Should we remove it and change the `case 0x100` to `case ACC_PRIMITIVE` so that IDE will help us find all references if we want to do some code refactor in the future?)
>>
>>
>> Thanks,
>> Yang
>
> Thanks for fixing the oversight.
A clarification on the Access flag encoding value 0x100:
On jdk mainline 0x100 is ACC_NATIVE used to flag native *methods*. (does not apply to or make sense for fields)
On Valhalla, this flag is overloaded to mean ACC_PRIMITIVE for classes and till https://bugs.openjdk.java.net/browse/JDK-8212792 pulled the plug was also overloaded for ACC_FLATTENABLE to flag fields that carried the flattenability hint.
Post https://bugs.openjdk.java.net/browse/JDK-8212792, ACC_FLATTENABLE is gone and we have only two overloads
ACC_NATIVE and ACC_PRIMITIVE.
So the proposed patch looks good, but the 0x100 cannot be replaced with ACC_PRIMITIVE without some loss of readability.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/368
More information about the valhalla-dev
mailing list