[lworld] RFR: 8281323: [lworld] Unnecessary entries in Preload attribute
    Srikanth Adayapalam 
    sadayapalam at openjdk.java.net
       
    Tue Feb 22 09:45:12 UTC 2022
    
    
  
On Tue, 22 Feb 2022 09:29:37 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:
> Reimplement generation of Preload attribute decoupling it from InnerClasses attribute generation to minimize/eliminate needless entries from the Preload list
Notes for reviewer:
This change basically decouples the generation of Preload attribute from InnerClasses attribute - that scheme generates redundant entries as shows by https://bugs.openjdk.java.net/browse/JDK-8281323 and also as can be determined by a review of the draft JEP at https://openjdk.java.net/jeps/8277163 which simply says:
Each class file generated by javac includes a Preload attribute naming any value class that appears in one of the class file's declared field or method descriptors.
In internal discussions, the VM team also has expressed an interest in seeing those value classes that appear as types of local variables in Preload list. 
In Internal discussions, it was pointed out that where arrays are involved, if the component type happens to be a value type, it is not useful to see a Preload entry for that value class.
This PR also happens to solve https://bugs.openjdk.java.net/browse/JDK-8280942 - the reimplementation simply subsumes that fix too.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/656
    
    
More information about the valhalla-dev
mailing list