On Fri, 30 May 2025 22:07:06 GMT, Shaojin Wen <s...@openjdk.org> wrote:
>> Some static final arrays of BigInteger and BigDecimal are stable and >> immutable. We should add `@Stable` to give the optimizer more information > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > BigInteger::mag remove Stable A general comment with respect to `@Stable` is that it asserts the field/elements will only change at most once (e.g., an array cannot expand, an element can't be written to more than once (unless the contents is "equivalent")). It is dangerous not to uphold the invariants imposed by `@Stable`. So, triple-checking for potential updates (even via reflection) must be done. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25437#issuecomment-2931938182