Core Types
Source: lib/common-types.x
The types the compiler prelude declares first.
Public types
| Type | Kind | Summary |
|---|---|---|
List | struct | Immutable canonical cons chain; NULL is nil. |
Mutex | struct | A native mutex allocated in the active Scope without recursive locking. |
Var | union | Eight-byte tagged runtime value for immediate scalars and encoded handles. |
List
typedef struct List *List
Immutable canonical cons chain; NULL is nil.
Its lifetime follows its owning List pool, which may be an ancestor.
Source: lib/common-types.x
Mutex
typedef struct Mutex *Mutex
A native mutex allocated in the active Scope without recursive locking.
Its Scope and handle must outlive every user and waiter. Destroy it only
while unlocked, and do not use the handle or its storage after that.
Source: lib/common-types.x
Var
typedef union Var { unsigned long u64; double f64, void *p64; } Var
Eight-byte tagged runtime value for immediate scalars and encoded handles.
Pointer-bearing values follow the ownership rules of their concrete type;
raw Null is all zero bits and void is all one bits.
Source: lib/common-types.x
Design notes
common.x builds on these types, and etc/compiler-prelude.x declares
them before its meta prototypes, which take and return them.