Skip to main content

Module value

Module value 

Source
Expand description

The 8-byte NaN-boxed Value and the heap identifiers it carries.

Any bit pattern below 0xFFF9_0000_0000_0000 is an f64. The boxed range is the quiet-NaN space with the sign bit set: the top 16 bits select the kind and the low 32 bits carry the payload.

Top 16 bitsKindPayload
0xFFF9Int32i32
0xFFFABool, Undefined, Null, Emptybits 0–1: 0 Bool, 1 Undefined, 2 Null, 3 Empty; bit 2: the boolean
0xFFFBObjectu32 object index
0xFFFCStringu32 string index
0xFFFDSymbolu32 symbol index
0xFFFEBigIntu32 BigInt index
0xFFFFreserved

Structs§

BigIntId
Index of a BigInt record.
BytecodeId
Index of a FunctionBytecode record: the heap side of one published code unit.
ObjectId
Index of an ObjectHeader.
ScopeId
An object of kind Scope; the same index space as ObjectId.
ShapeId
Index of a shape.
StringId
Index of a string record.
SymbolId
Index of a symbol record.
ValidityCellId
Index of a validity cell.
Value
A JavaScript value, or the internal hole marker Value::EMPTY.

Enums§

Kind
The kind of a Value.

Constants§

CANONICAL_NAN
The NaN a NaN in the boxed range is rewritten to.