heap blobs

This commit is contained in:
2026-02-17 15:41:53 -06:00
parent c02fbbd9e0
commit 56ac53637b
3 changed files with 837 additions and 237 deletions

View File

@@ -898,12 +898,12 @@ typedef struct JSArray {
JSValue values[]; /* inline flexible array member */
} JSArray;
/* JSBlob — not allocated on GC heap (blobs use JSRecord + opaque).
Struct kept for reference; gc_object_size/gc_scan_object do not handle OBJ_BLOB. */
/* JSBlob — inline bit data on the GC heap.
cap56 = capacity in bits, S bit = stone (immutable). */
typedef struct JSBlob {
objhdr_t mist_hdr;
word_t length;
uint8_t bits[];
objhdr_t mist_hdr; /* type=OBJ_BLOB, cap56=capacity_bits, S=stone */
word_t length; /* used bits */
word_t bits[]; /* inline bit data, ceil(cap56/64) words */
} JSBlob;
typedef struct JSText {