[lworld] RFR: 8377451: [lworld] Add ValuePayload abstraction [v8]
Stefan Karlsson
stefank at openjdk.org
Fri Feb 13 13:55:59 UTC 2026
On Fri, 13 Feb 2026 13:50:12 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> Do we really want just at the declaration site?
>>
>> I would think just definition or both is more common in hotspot? And just definition is probably the correct thing to do, as being inline is not a property of the interface declaration, but of how we choose to define the implementation, you should be able to move the definition to the cpp file without having to touch the non-inline hpp file.
>
> The benefit of adding it to the declaration is that you get a compilation error if you fail to include the .inline.hpp file. If you have the inline at the definition you get a linkage error instead, which is a bit more annoying.
I know that ZGC marks the definitions with inline. That makes the hpp cleaner, but it is not apparent that you need to include the .inline.hpp file.
Choose which you prefer. I'm also fine with adding them to both. :)
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/2068#discussion_r2804337155
More information about the valhalla-dev
mailing list