Implement freezing in the new MM

Currently, it uses suboptimal storage for the freeze bit. This'll be revised later when we finalize stack objects handling in the new MM.
This commit is contained in:
Alexander Shabalin
2021-03-26 15:00:14 +00:00
committed by Space
parent 295858cf5c
commit 770401801b
11 changed files with 764 additions and 45 deletions
+2 -1
View File
@@ -66,6 +66,8 @@ struct ObjHeader {
return createMetaObject(this);
}
MetaObjHeader* meta_object_or_null() const noexcept { return AsMetaObject(typeInfoOrMeta_); }
ALWAYS_INLINE ObjHeader** GetWeakCounterLocation();
#ifdef KONAN_OBJC_INTEROP
@@ -109,7 +111,6 @@ struct ArrayHeader {
uint32_t count_;
};
ALWAYS_INLINE bool isFrozen(const ObjHeader* obj);
ALWAYS_INLINE bool isPermanentOrFrozen(const ObjHeader* obj);
ALWAYS_INLINE bool isShareable(const ObjHeader* obj);