[lworld] RFR: 8263568: [lworld] Fix residual reference to 'value'

Srikanth Adayapalam sadayapalam at openjdk.java.net
Tue Mar 23 10:01:52 UTC 2021


On Tue, 23 Mar 2021 08:31:16 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

>> 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.
>
> (There is some loss of readability already - we should add a comment next to the case 0x100: to call out the variants. That is better than inventing a name like ACC_NATIVE_OR_PRIMITIVE - I will follow up on that)

Hello!

Can you please make these two changes ?

(1) This patch is "failing" one langtools test - test/langtools/tools/javac/valhalla/lworld-values/QTypeTest.java
The fix is simple, to replace value with primitive in the javap output verified by that test

(2) Could you add a comment next to the case 0x100: // ACC_NATIVE or ACC_PRIMITIVE 

Thanks!

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

PR: https://git.openjdk.java.net/valhalla/pull/368



More information about the valhalla-dev mailing list