IRGen: support read-only statically initialized arrays in embedded swift

Arrays buffers need to be initialized with a (minimal) metatype and with an immortal reference count.
This commit is contained in:
Erik Eckstein
2024-05-21 13:39:18 +02:00
parent 09d2e8f685
commit 162139364e
4 changed files with 142 additions and 25 deletions

View File

@@ -46,6 +46,7 @@ public struct HeapObject {
static let refcountMask = Int(bitPattern: 0x7fff_ffff)
#endif
// Note: The immortalRefCount value of -1 is also hard-coded in IRGen in `irgen::emitConstantObject`.
static let immortalRefCount = -1
}