No matching definitions.

ecs/xsystem

src/ecs/xsystem.tur

cross-world system value + `defxsystem` surface.

Since: X2

defstruct

XSystem

(defstruct XSystem [])

a runnable two-world bundle. Each slot (w0, w1) carries

Since: X2

defn

make-xsystem

(make-xsystem)

bundle a top-level two-world run-fn with its

Since: X2

defn

xsystem-w0-reads

(xsystem-w0-reads [s : XSystem] :)

Field accessors.

Since: X2

defn

xsystem-w0-writes

(xsystem-w0-writes [s : XSystem] :)
defn

xsystem-w1-reads

(xsystem-w1-reads [s : XSystem] :)
defn

xsystem-w1-writes

(xsystem-w1-writes [s : XSystem] :)
defn

xsystem-run-fn

(xsystem-run-fn [s : XSystem] :)
defn

xsm-alloc

(xsm-alloc [n : int] :)

===========================================================================

Since: N-W-V0

defn

xsm-set!

(xsm-set! [p : int i : int v : int] :)

store `v` at index `i` of the int64 array at `p`.

Since: N-W-V0

defn

xsm-get

(xsm-get [p : int i : int] :)

load index `i` of the int64 array at `p`.

Since: N-W-V0

defn

xsm-free

(xsm-free [p : int] :)

release an int64 array previously `xsm-alloc`'d.

Since: N-W-V0

defstruct

XSystemN

(defstruct XSystemN [])

a runnable N-world bundle. `n` is the world count;

Since: N-W-V0

defn

make-xsystem-n

(make-xsystem-n)

bundle an N-world run-fn with its mask arrays.

Since: N-W-V0

defn

xsystemn-n

(xsystemn-n [s : XSystemN] :)

Field accessors.

Since: N-W-V0

defn

xsystemn-reads

(xsystemn-reads [s : XSystemN] :)
defn

xsystemn-writes

(xsystemn-writes [s : XSystemN] :)
defn

xsystemn-run-fn

(xsystemn-run-fn [s : XSystemN] :)
defmacro

xsystem--with-write-caps

(xsystem--with-write-caps [body wbind wtype comps])

wrap `body` in a let-chain binding

defmacro

xsystem--with-read-caps

(xsystem--with-read-caps [body wbind wtype comps])

wrap `body` in a let-chain binding

defmacro

xsystem--consume-write-caps

(xsystem--consume-write-caps [wbind comps])

emit `(use-cap! <wbind>-<Comp>-write-cap)`

defmacro

defxsystem

(defxsystem [name worlds & clauses])

declare a cross-world System and its implementation.

Since: X2 (CLAUSE-V0: any clause order, empties omittable;

Internal definitions
xsystem--mask-- build the bit-or'd `(cid-bit <Comp>-cid)` mask for
xsystem--n-loads-- ---------------------------------------------------------------------------
xsystem--n-consumes-- emit one `(xsystem--consume-write-caps wbind
xsystem--n-mask-fills-- emit the per-world `(xsm-set! __rds i MASK)`
xsystem--n-checks-- the "every declared world appears in >= 1