|
runtime 1.0.0
Checked CEL programs, owned values, and reusable execution stacks
|
Borrows typed inputs and returns independent owning results through bound adapters. Leaves use direct addresses/result bytes; tuples/vectors use trusted canonical adapters. Composite conversion/result ownership may allocate; no recursive checks occur during calls. Handles share immutable engine state, not independent copies of mutable captures. After moving, use the source only for destruction or assignment, including after self-move. Destruction releases the binding and code. Complexity: last release takes O(released code nodes/edges + metadata + client destructor work). Example: auto result = bound.call(stack, 2.0);. See the runtime.hpp example for a complete typed call and stack reservation. More...
#include <cel/runtime/dyn_segment.hpp>
Public Member Functions | |
| prepared_segment (const prepared_segment &)=delete | |
| Disallows independent capture copies. | |
| prepared_segment & | operator= (const prepared_segment &)=delete |
| Disallows copied assignment. | |
| prepared_segment (prepared_segment &&) noexcept=default | |
| Transfers typed binding ownership. | |
| prepared_segment & | operator= (prepared_segment &&) noexcept=default |
| Transfers typed binding ownership. Complexity: O(old binding metadata and last-owned captures). | |
| const stack_requirements & | requirements () const noexcept |
| Borrows the frozen program's canonical frame reservation requirements. Precondition: this handle has not been moved from. Composite conversions and arbitrary callback/nested costs are not inferred. Example: auto r = bound.requirements().for_prefix(stack.cursor(), stack.depth());. | |
| R | call (raw_stack &stack, const Args &... arguments) const |
| Executes with borrowed const inputs and returns a disjoint result. Precondition: the handle is live, and inputs have no mutable alias accessed by callbacks. Exceptions propagate after suffix cleanup; inputs and caller prefix remain owned. Cleanup does not undo external callback effects. Scalar calls allocate nothing on a warmed sufficiently reserved stack. Complexity: O(arity + instructions + payload work) time and independent result space. Example: bound.call(stack, 2.0). | |
Friends | |
| class | compiled_segment |
Borrows typed inputs and returns independent owning results through bound adapters. Leaves use direct addresses/result bytes; tuples/vectors use trusted canonical adapters. Composite conversion/result ownership may allocate; no recursive checks occur during calls. Handles share immutable engine state, not independent copies of mutable captures. After moving, use the source only for destruction or assignment, including after self-move. Destruction releases the binding and code. Complexity: last release takes O(released code nodes/edges + metadata + client destructor work). Example: auto result = bound.call(stack, 2.0);. See the runtime.hpp example for a complete typed call and stack reservation.