2505b6c64e
Usually the identity hashcode is implemented by returning if present and otherwise generating a random number, setting the hash code and returning it. This works fine in single-mutator environments, though when multiple mutators might race to install identity hash codes we should ensure only one of them wins and all others will obtain whatever hash code has been set by the winner. This will matter once we start sharing more objects across isolates. Issue https://github.com/dart-lang/sdk/issues/36097 TEST=vm/cc/AsmIntrinsifier_SetHashIfNotSetYet Change-Id: Ie760ca9658e6ec0640255361544d6822b07574e2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201827 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Slava Egorov <vegorov@google.com>