Make FreezableAtomicReference atomic when unfrozen for the new MM.

This commit is contained in:
Alexander Shabalin
2021-06-25 21:18:37 +00:00
committed by Space
parent 518e8691b7
commit 28b6427d3e
7 changed files with 28 additions and 34 deletions
+2 -1
View File
@@ -82,7 +82,8 @@ void ObjHeader::destroyMetaObject(ObjHeader* object) {
}
ALWAYS_INLINE bool isPermanentOrFrozen(const ObjHeader* obj) {
return mm::IsFrozen(obj);
// TODO: Freeze TF_IMMUTABLE objects upon creation.
return mm::IsFrozen(obj) || ((obj->type_info()->flags_ & TF_IMMUTABLE) != 0);
}
ALWAYS_INLINE bool isShareable(const ObjHeader* obj) {