Fil-C on Nix

Filnix wiki

mbrock/filnix/nanofil

getter

Fil-C

Upstream runtime, linking, FilPizlonator.cpp

A getter is the function that returns a global's or function's address with its capability, initializing it on first use. Upstream every symbol is renamed pizlonated_ plus its name, and that symbol is its getter, returning a flight pointer; the program checks the result like any pointer. In IR a getter call is lettmpD, p, copy, globalG; calling one is a safepoint (filc_amd64:object_getter//2), so it ends every live fact, except a repeated getter.

The model has no getter call: a Global operand reads the symbol's pointer from the global environment's ge_globals, or an external capability for a symbol the module does not define.