On Mon, 26 Jan 2026 10:20:53 GMT, Stefan Karlsson <[email protected]> wrote:
>> Joel Sikström has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 11 additional >> commits since the last revision: >> >> - Merge branch 'lworld' into JDK-8376221_inlinelayoutinfo_array_optimization >> - LayoutKind assertion for flat fields >> - Remove mention of 'warning' in comment >> - Exception check should really be an assert >> - Move inlineable check to static helper >> - Comment for second CLEAR_PENDING_EXCEPTION >> - Clear exception before setting inline klass >> - Split assert in field sorting methods >> - IOOB assert message >> - InstanceKlass instead of Klass for set_inline_layout_info_klass >> - ... and 1 more: >> https://git.openjdk.org/valhalla/compare/7c7ac5ac...b934da63 > > src/hotspot/share/classfile/classFileParser.cpp line 6341: > >> 6339: _must_be_atomic, _layout_info, _inline_layout_info_array); >> 6340: lb.build_layout(); >> 6341: _has_inlined_fields = _layout_info->_has_inlined_fields; > > More of a questions to the long-time Valhalla devs: I'm a little curious why > the parser has booth of these fields containing the same value? Historical reasons. The _layout_info structure was added late, and the previous ways to handle inline fields information was not properly refactored. The ClassFilerParser gets the _layout_info instance before creating the InstanceKlass instance and keeps it until the InstanceKlass instance has been fully initialized, so it is safe to refactor the code to remove ClassFileParser::_has_inline_fields and refactor ClassFilerParser::has_inline_fields() to return _layout_info->_has_inlined_fields. Note: currently, the only client of ClassFilerParser::has_inline_fields() is the InstanceKlass constructor. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1966#discussion_r2743487176
