x-lang

← Index

x/core/doors

The engine’s hot doors – (int +), (str byte-ref), (obj ref), (ptr set!), (type of) and the rest a hot path in the library calls – each bound once under a name spelled from its coordinate, for every module to import instead of fetching its own.

A door is the catalogue entry itself, so a call through it allocates nothing where the platform operator is a closure call: (int <) is 0 objects a call against 10 for <, (int +) 1 against 2 for +.

A selective import, (import x/core/doors int+ str-byte-ref), copies the door into the importer’s frame, where it costs what a local def costs; an unscoped importer’s frame is the root.

int+

int-

int*

int/

int%

int<

int=

int&

int|

int<<

int>>

int->ptr

int->char

str-make

str-append

str-byte-ref

str-byte-len

str-byte-sub

str->ptr

str->sym

char->int

ptr-ref

ptr-set!

ptr-ref-word

ptr-set-word!

ptr-call

ptr->int

ptr->str

ptr->obj

mem-copy

mem-cmp

obj-make

obj-ref

obj-set!

obj->ptr

obj-same?

type-of

type?

type-make

type-make-instance

type-by-atom

type-from-cell

type-push-call

type-push-op

type-push-write

type-push-analyse

io-write-to-str

io-display-to-str

buf-tok

buf-last-char

tok-read-str

ffi-dlopen

ffi-dlsym

heap-collect

image-transient!

image-recache-hook!