On Fri, 21 Aug 2026 17:08:29 GMT, Chris Plummer <[email protected]> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Refactoring
>
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Inline.java line 37:
>
>> 35:
>> 36: public class Inline extends Instance {
>> 37:
>
> I think a comment here is needed that explains that instances of this class
> can be used to represent instances of a class that is inline-able
> (InlineKlass), both flattened instances and heap instances.
Added in new commit.
> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/OopField.java line
> 68:
>
>> 66: var heap = obj.getHeap();
>> 67: return isFlat() ?
>> heap.newOop(obj.getHandle().addOffsetToAsOopHandle(getOffset()),
>> (InlineKlass)getFieldKlass())
>> 68: : heap.newOop(getValueAsOopHandle(obj));
>
> This would be much more readable as an if/else block and if you assigned
> `obj.getHandle().addOffsetToAsOopHandle(getOffset())` to a Handle local
> variable.
Fixed in new commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32310#discussion_r3834936361
PR Review Comment: https://git.openjdk.org/jdk/pull/32310#discussion_r3834935975