Expand description
The contract between generated code and the VM: the layout of the context, the status codes, and the layout of an object in the pool.
Constants§
- CTX_
CALL_ VM - CTX_
DYLIBS - CTX_
ERR_ A - CTX_
ERR_ AT - CTX_
ERR_ B - CTX_
MARKING - CTX_
OBJS - CTX_
POP_ ROOTS - CTX_
PRINT - CTX_
PUSH_ ROOTS - CTX_
REGS - CTX_RET
- CTX_
SHADE - CTX_
STATUS - STATUS_
DEPTH - A call would have stood past the call depth limit.
- STATUS_
HALT mainran to its end.- STATUS_
INDEX - A list index was out of range:
err_ais the length,err_bthe index. - STATUS_
OK - The call went through.
- STATUS_
PANIC - A panic in a host function is on its way out; the VM holds it.
- STATUS_
SHIFT - A shift count was outside 0..64:
err_ais the count. - STATUS_
VM - The interpreter, entered from the code, stopped with an error it recorded itself.
- VERSION
- Bumped whenever anything below, the helpers’ signatures, or the layout of a value changes.
Functions§
- object_
layout - How an object in the pool is laid out: the size of one entry, and the offsets of its buffer pointer and its length. The pool is a vector of vectors the code indexes directly, and Rust promises no layout for a vector, so the build measures it and the VM checks the build’s answer against its own before it runs any of the code.