On Thu, 8 Jan 2026 13:40:42 GMT, Frederic Parain <[email protected]> wrote:
> Remove an optimization in value copying that could cause incorrect results > with the new substitutability test method. > > Tested with Mach5 tier 1-3. > > Thank you, > > Fred Change is straight forward and correct. Copying this comment from jbs for context in why this is the right approach: >The goal is to keep the default implementation of the substitutability test, >and its companion the identity hash code method, as simple as possible. It is >possible to make this implementation aware of the null-marker and its >semantic, but it would make the code much more complex. Resetting a flat value >by rewriting its whole content when it is nullified is a simple approach, as >the code to do that is already available for values containing oops. A specialized version of the substitutability test, like the one a JIT can generate for a particular value type, can perfectly have a different approach and use the null-marker as indicators to skip comparison of some memory segments. ------------- Marked as reviewed by heidinga (no project role). PR Review: https://git.openjdk.org/valhalla/pull/1869#pullrequestreview-3640920060
