2#ifndef CEL_RUNTIME_CALLABLE_HPP
3#define CEL_RUNTIME_CALLABLE_HPP
4#include <cel/runtime/dyn_segment.hpp>
12struct callable_access;
13class callable_invocation;
38 detail::retirement_ptr<detail::callable_state> _state;
39 friend struct detail::callable_access;
40 friend class detail::callable_invocation;
const stack_requirements & requirements() const noexcept
Borrows known body storage requirements; external callback costs are not inferred....
callable(const callable &) noexcept=default
Shares the reference-semantic code handle, not an independent callback-state copy....
callable(callable &&) noexcept=default
Transfers the code handle. Example: auto moved = std::move(fn);.
value call(raw_stack &stack, std::span< const value > arguments) const
Validates arity and every declared complete parameter before any body effect. Returns one independent...
static callable from_value(const value &source)
Returns a shared handle to the installed callable stored in source. Throws std::invalid_argument if s...
callable(compiled_segment body, std::span< const value_type > parameters)
Binds independent one-result code and every explicit source-order parameter. Precondition: body has n...
value to_value() const
Creates an owning value carrier sharing this explicitly reference-semantic code. Throws logic_error f...
const value_type & type() const noexcept
Borrows the full installed signature, including unused parameters. Precondition: this handle is live....
Retains immutable frozen code and its captures in a move-only handle. Prepared bindings and callables...
Definition dyn_segment.hpp:496
Owns reusable canonical operand bytes and complete live-slot metadata. The owner outlives every borro...
Definition raw_stack.hpp:33
Shares an immutable, complete semantic type and canonical byte layout. Leaf identity is concrete C++ ...
Definition value_type.hpp:55
Owns a complete runtime value; copies own independent mutable payloads. Installed callables are expli...
Definition value.hpp:58
Provides byte extents for stack reservation and type descriptors.
Definition callable.hpp:6
Describes statically known canonical frame storage for a frozen ordinary program. Extent and slots ar...
Definition dyn_segment.hpp:48