Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most callbacks in this section of the walk still visit a section even if it's empty, so I kept that behaviour here. The one exception is the
walk nest members SRPs
block immediately above this one, which doesn't walk the nest member SRP block if it has a zero count.Arguably it makes more sense to skip sections that are empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For instance, this block
https://github.com/eclipse-openj9/openj9/pull/18585/files#diff-46dfbaaa744dce041c4628662712f8529314d107b5d16d2bffb540c41b7a2dc7R186-R195
visits the enclosed inner classes SRP block even if it's empty, which has the odd consequence that the
srpCursor
for that section will point to theenclosedInnerClasses
field of the ROM class, and not past theJ9ROMClass
header section like you might expect. That's becauseJ9ROMCLASS_ENCLOSEDINNERCLASSES
will return a pointer toenclosedInnerClasses
when that field is zero. I don't think this ever messes anything up, but its an odd behaviour to have.