Every cell kind in the arena, drawn from LAYOUTS (the cells! declarations in
crates/djs-core/src/heap/cells.rs ). The garbage collector traces exactly the orange
fields, and the host’s reader (js/src/layout.generated.ts ) is generated from the same
table.
Layout of the Roots cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
32
40
48
56
64
72
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
MAGIC
u32
VERSION
u32
ATOMS
Ref
STACK
Ref
REALM
Value
JOBS
Ref
HOST_CALLS
Ref
HANDLES
Ref
INTERP
Ref
BUILD
u32
FLAGS
u32
GC_THRESHOLD
u32
PROTO_EPOCH
u32
ROOT_SHAPE
Ref
SHAPES
u32
OLD_END
u32
MINORS
u32
header
traced by the GC (Value, Ref)
plain data
padding
The Roots cell
Layout of the Str8 cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
HASH
u32
DATA: u8 × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The Str8 cell
Layout of the Str16 cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
HASH
u32
DATA: u16 × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The Str16 cell
Layout of the Rope cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
HASH
u32
LEFT
Ref
RIGHT
Ref
header
traced by the GC (Value, Ref)
plain data
padding
The Rope cell
Layout of the Symbol cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
ATOM
u32
DESCRIPTION
Value
header
traced by the GC (Value, Ref)
plain data
padding
The Symbol cell
Layout of the Object cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
CLASS
u32
PROTO
Ref
PROPS
Ref
ELEMENTS
Ref
SLOTS: Value × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The Object cell
Layout of the PropTable cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
COUNT
u32
DELETED
u32
INDEX
Ref
ENTRIES: PropEntry × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The PropTable cell
Layout of the ValueArray cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
VALUES: Value × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The ValueArray cell
Layout of the U32Array cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
DATA: u32 × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The U32Array cell
Layout of the AtomTable cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
STRINGS
u32
ENTRIES
Ref
INDEX
Ref
header
traced by the GC (Value, Ref)
plain data
padding
The AtomTable cell
Layout of the HandleTable cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
FREE
u32
LIVE
u32
SLOTS: HandleSlot × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The HandleTable cell
Layout of the FuncTemplate cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
32
40
48
56
64
72
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
FLAGS
u32
NAME
u32
PARAMS
u16
LENGTH
u16
LOCALS
u16
STACK
u16
CAPTURES
u16
IC_COUNT
u16
CODE
Ref
CONSTS
Ref
CHILDREN
Ref
CAPTURE_DESC
Ref
HANDLERS
Ref
IC
Ref
NATIVE
u16
FAST
u16
LINES
Ref
SCRIPT
Ref
SRC_START
u32
SRC_END
u32
NAMES
Ref
header
traced by the GC (Value, Ref)
plain data
padding
optional
The FuncTemplate cell
Layout of the Script cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
NAME
Ref
SOURCE
Ref
header
traced by the GC (Value, Ref)
plain data
padding
The Script cell
Layout of the BoxCell cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
VALUE
Value
header
traced by the GC (Value, Ref)
plain data
padding
The BoxCell cell
Layout of the Bytes cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
DATA: u8 × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The Bytes cell
Layout of the RefArray cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
REFS: Ref × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The RefArray cell
Layout of the Interp cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
32
40
48
56
64
72
80
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
STATE
u32
BP
u32
HP
u32
SP
u32
PC
u32
HOST_CALL
u32
NEXT_CALL_ID
u32
FLAGS
u32
RESULT
Value
OUTCOME
u32
JOB_HEAD
u32
THROW
Value
REJECTIONS
Ref
REPORTED
u32
INBOX
Ref
INBOX_HEAD
u32
FUEL_DEBT
Value
header
traced by the GC (Value, Ref)
plain data
padding
The Interp cell
Layout of the Realm cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
GLOBAL_LEX
Ref
INSTALLED
Ref
INTRINSICS: Value × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The Realm cell
Layout of the HostCall cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
24
32
40
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
ID
u32
FN
u32
ARGS
Ref
THIS
Value
PROMISE
Value
FLAGS
u32
header
traced by the GC (Value, Ref)
plain data
padding
The HostCall cell
Layout of the EphemeronArray cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
VALUES: Value × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The EphemeronArray cell
Layout of the AccessorPair cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
GETTER
Value
SETTER
Value
header
traced by the GC (Value, Ref)
plain data
padding
The AccessorPair cell
Layout of the Shape cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
PARENT
Ref
DESCS
Ref
COUNT
u32
TRANSITIONS
Ref
header
traced by the GC (Value, Ref)
plain data
padding
The Shape cell
Layout of the PropValues cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
SHAPE
Ref
LEN
u32
VALUES: Value × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The PropValues cell
Layout of the BigInt cell
+0
+1
+2
+3
+4
+5
+6
+7
0
8
16
KIND
u8
GC
u8
FLAGS
u16
SIZE
u32
LEN
u32
LIMBS: u32 × n
variable-length tail; n follows from SIZE
header
traced by the GC (Value, Ref)
plain data
padding
The BigInt cell