[vm/concurrency] Avoid stopping mutators when updating subtype test cache

To avoid stopping all mutators when updating subtype test caches, we
ensure that any updates to the subtype test cache will be visible in a
consistent way to mutators by adding a store-release barrier when
updating the backing array of the STC.

Since STCs are always grown by allocating a new array with size+1, there
is no need to actually add barriers when accessing the individual
entries of the backing store.

To prevent multiple writers creating STCs and patching the pool or
updating a STC we add a mutex.

Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: Ic705619fe16772565ac11438fd15d3977cbb49c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149164
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>

https://dart.googlesource.com/sdk/+/a2b5373eaac0fa36ac8fdda939b8fa26bd7d5633
1 file changed
tree: bca495d966ebf2e869459aac4a949ab7249e437c
  1. commits.json