ART: Rename Atomic::CompareExchange methods
Renames Atomic::CompareExchange methods to Atomic::CompareAndSet
equivalents. These methods return a boolean and do not get the witness
value. This makes space for Atomic::CompareAndExchange methods in a
later commit that will return a boolean and get the witness value.
This is pre-work for VarHandle accessors which require both forms.
Bug: 65872996
Test: art/test.py --host -j32
Change-Id: I9c691250e5556cbfde7811381b06d2920247f1a1
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index c6c4f4a..fc7920f 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -80,9 +80,8 @@
mirror::Class* desired_class) {
GcRoot<mirror::Class> expected_root(expected_class);
GcRoot<mirror::Class> desired_root(desired_class);
- return reinterpret_cast<Atomic<GcRoot<mirror::Class>>*>(&declaring_class_)->
- CompareExchangeStrongSequentiallyConsistent(
- expected_root, desired_root);
+ auto atomic_root_class = reinterpret_cast<Atomic<GcRoot<mirror::Class>>*>(&declaring_class_);
+ return atomic_root_class->CompareAndSetStrongSequentiallyConsistent(expected_root, desired_root);
}
inline uint16_t ArtMethod::GetMethodIndex() {