Expand description
The C-ABI surface generated code calls into (plg_rt_*).
Every function here matches a declaration emitted by plgc codegen; the pairing is documented in docs/design/RUNTIME_ABI.md and protected by the compiler↔runtime version sync in crates/compiler/build.rs.
Safety: all m pointers originate from plg_rt_init and live for
the whole process; generated code is single-threaded.
Functions§
- plg_
rt_ areg_ get - plg_
rt_ areg_ set - plg_
rt_ breg_ set - plg_
rt_ existence_ error - Raise existence_error(procedure, F/A) — the compiled stub for body goals that reference a predicate with no clauses (and the runtime path for unknown query goals shares the message shape).
- plg_
rt_ frame_ alloc - Allocate an
n-cell continuation frame; returns the base index. - plg_
rt_ frame_ get - plg_
rt_ frame_ set - plg_
rt_ k_ env - plg_
rt_ k_ fn - plg_
rt_ new_ var - Fresh unbound variable; returns its REF word.
- plg_
rt_ pred_ fail - Always-fail predicate body: the target for
:- dynamicpredicates with no clauses (silent-fail linter contract). - plg_
rt_ push_ cp - Push a choice point whose retry re-enters generated code.
- plg_
rt_ put_ big - Box an i64 outside the i61 immediate range (BIG cell).
- plg_
rt_ put_ float - plg_
rt_ put_ list - plg_
rt_ put_ struct - Build a compound from breg[0..arity]; returns its STR word.
- plg_
rt_ set_ k - Set the success continuation (k_fn passed as a raw pointer-sized integer in IR; the transmute re-types it).
- plg_
rt_ step - Bump the step counter. Returns 0 when the limit is exceeded (the uncatchable resource error is set; generated code returns 0).
- plg_
rt_ unify - Generic unification; returns 1 on success.