On Thu, 12 Dec 2024 10:16:01 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

>> @viktorklang-ora `@Stable` is not about how the field was set, but about the 
>> JIT observing a  non-default value at compile time.  If it observes a 
>> non-default value, it can treat it as a compile time constant.
>
> @DanHeidinga Great explanation, thank you!

If Class had other fields smaller than `int`, would be consider making this 
something like `char` to save space (allowing all the sub-word fields to be 
compacted)?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22652#discussion_r1943701237

Reply via email to