RFR: 8351565: Implement JEP 502: Stable Values (Preview)

Per Minborg pminborg at openjdk.org
Thu Mar 13 11:20:14 UTC 2025


On Wed, 12 Mar 2025 13:28:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> What would be the difference between `@Stable StableValueImpl<E>[] backing` and `@Stable Object[] backing`?
>
> It's true that the storage can be flatter here -- that said, this can also be done as a later refactoring. One advantage of doing things the way @minborg did it here, is that it's fairly easy to prove that the code below is correct -- which makes the initial review easier.

Ahh. Now I see what you mean. This is something we did in a handful of prototypes we explored. While it is true that there will be one indirection less, the complexity of the code is going to grow. Also, if the element is constant folded, it does not matter.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r1991597981


More information about the compiler-dev mailing list