|
x-engine-c v0.2.13
The C engine for x-lang
|
Object-level primitive operations (make, call, write, etc.). More...
#include "x-obj.h"Go to the source code of this file.
Functions | |
| x_char_t * | x_obj_prim_name (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_units (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_length (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_make (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_free (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_clone (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_dump (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_call (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_eval (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_convert (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_identify (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_read (x_obj_t *p_base, x_obj_t *p_args) |
| x_obj_t * | x_obj_prim_write (x_obj_t *p_base, x_obj_t *p_args) |
Object-level primitive operations (make, call, write, etc.).
Invoke an object's type-dispatch call handler.
Invoke an object's type-dispatch call handler.
Looks up the call field on the object's type struct and dispatches. For procedure-typed call handlers, invokes via x_type_procedure_call to support closures as type callbacks.
| p_base | x_obj_t* – Base (execution context) |
| p_args | x_obj_t* – (callable . args) |
Clone (shallow copy) a heap object.
Convert an object to a different type.
Debug-dump an object's raw representation.
Evaluate an object via its type's eval handler.
Return the type identifier object for a value.
Return the logical length of an object.
Primitive: dispatch an object's logical length by type.
Returns x_pair_prim_length() for pairs and x_atom_prim_length() for atoms or nil-typed objects; for other types the base's length hook (x_base_field_hook_length()) is consulted.
| p_base | Base (execution context). |
| p_args | Pair list whose first element is the subject object. |
Construct a new object via its type's make callback.
Construct a new object via its type's make callback.
Dispatches to the appropriate constructor based on the object's type (static atom, static pair, or registered type with make handler).
| p_base | x_obj_t* – Base (execution context) |
| p_args | x_obj_t* – (prototype-obj flags data...) |
Return the type name string for an object.
Read an object from the token stream.
Return the number of heap units occupied by an object.
Primitive: dispatch an object's data-unit count by type.
Returns x_pair_prim_units() for pairs and x_atom_prim_units() for atoms or nil-typed objects; for other types the base's units hook (x_base_field_hook_units()) is consulted.
| p_base | Base (execution context). |
| p_args | Pair list whose first element is the subject object. |