On Fri, 17 Feb 2023 17:09:51 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> Yes, the print structure does not exactly correspond to the Classfile API 
>> architecture, but rather to the classfile physical structure and it is 
>> partly similar to `javap` output.
>> The common tree structure has been reverse-designed from the desired visual 
>> representations in all supported text formats and in all verbosity levels.
>
> Not sure I get this. It seems to me that the same attributes are being 
> printed twice. But, perhaps, the first pass only creates a list with the 
> attribute _names_ and then there is a later pass which print the attributes 
> in full?

Yes, the first is just a list of attribute names, while later there might be 
printed more attribute details (depending on the verbosity).
Combined or dynamically changed list formats would be inconsistent in various 
verbosity levels, so duplicate print is preferred for better human and machine 
readability and consistency. 
There are other cases of duplication in favour of readability. For example some 
code attributes are printed standalone in a table form, as well as their 
individual elements are attached to the corresponding bytecode instructions.

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

PR: https://git.openjdk.org/jdk/pull/10982

Reply via email to