#include <PrimitiveExpeditor.h>
|
| static RegisterManager & | getRegisterManager () |
| | Gets the static register manager instance.
|
| |
| static PrimitiveExpeditorInitializer | describe (const String &name, Lisp::Type returnType, int argsCount,...) |
| | Describes a primitive function by setting up its metadata.
|
| |
| static PrimitiveDescription | extractDescription (Primitive *primitive) |
| | Extracts description metadata from a primitive function.
|
| |
◆ assertArgs() [1/2]
| void uniot::PrimitiveExpeditor::assertArgs |
( |
uint8_t | length, |
|
|
const Lisp::Type * | types ) |
|
inline |
Asserts that arguments match the expected types.
- Parameters
-
| length | Expected number of arguments |
| types | Array of expected argument types |
- Exceptions
-
| Error | if arguments don't match expected types or count |
◆ assertArgs() [2/2]
| void uniot::PrimitiveExpeditor::assertArgs |
( |
uint8_t | length, |
|
|
| ... ) |
|
inline |
Variadic version of assertArgs.
- Parameters
-
| length | Expected number of arguments |
| ... | Expected argument types (variadic) |
- Exceptions
-
| Error | if arguments don't match expected types or count |
◆ assertArgsCount()
| void uniot::PrimitiveExpeditor::assertArgsCount |
( |
int | length | ) |
|
|
inline |
Asserts that the function was called with the expected number of arguments.
- Parameters
-
| length | Expected number of arguments |
- Exceptions
-
| Error | if the argument count doesn't match |
◆ assertDescribedArgs()
| void uniot::PrimitiveExpeditor::assertDescribedArgs |
( |
| ) |
|
|
inline |
Asserts arguments against the primitive's description.
- Exceptions
-
| Error | if arguments don't match the description |
◆ checkType()
| bool uniot::PrimitiveExpeditor::checkType |
( |
Object | param, |
|
|
Lisp::Type | expectedType ) |
|
inline |
Checks if a parameter matches an expected Lisp type.
- Parameters
-
| param | Object to check |
| expectedType | Expected type of the object |
- Return values
-
| true | Parameter matches the expected type |
| false | Parameter does not match the expected type |
◆ describe()
| static PrimitiveExpeditorInitializer uniot::PrimitiveExpeditor::describe |
( |
const String & | name, |
|
|
Lisp::Type | returnType, |
|
|
int | argsCount, |
|
|
| ... ) |
|
inlinestatic |
Describes a primitive function by setting up its metadata.
- Parameters
-
| name | Name of the primitive function |
| returnType | Return type of the function |
| argsCount | Number of arguments the function expects |
| ... | Types of each argument (variadic) |
- Return values
-
| initializer | PrimitiveExpeditorInitializer object |
◆ evalList()
| Object uniot::PrimitiveExpeditor::evalList |
( |
| ) |
|
|
inline |
Evaluates the argument list if not already evaluated.
- Return values
-
| list | The evaluated list of arguments |
◆ evalObj()
Evaluates a single object in the current environment.
- Parameters
-
- Return values
-
◆ extractDescription()
| static PrimitiveDescription uniot::PrimitiveExpeditor::extractDescription |
( |
Primitive * | primitive | ) |
|
|
inlinestatic |
Extracts description metadata from a primitive function.
Uses setjmp/longjmp to capture the description information when the primitive is executed in description mode.
- Parameters
-
| primitive | Pointer to the primitive function |
- Return values
-
| description | PrimitiveDescription object with the function's metadata |
◆ getArg()
| Object uniot::PrimitiveExpeditor::getArg |
( |
int | idx | ) |
|
|
inline |
Gets an argument at the specified index.
- Parameters
-
| idx | Zero-based index of the argument to retrieve |
- Return values
-
- Exceptions
-
| Error | if index is out of bounds |
◆ getArgBool()
| bool uniot::PrimitiveExpeditor::getArgBool |
( |
int | idx, |
|
|
bool | acceptsInt = true ) |
|
inline |
Gets a boolean value from an argument.
- Parameters
-
| idx | Zero-based index of the argument |
| acceptsInt | Whether to accept integer values as booleans |
- Return values
-
| bool | The boolan value of the argument |
- Exceptions
-
| Error | if argument doesn't have a compatible type |
◆ getArgInt()
| int uniot::PrimitiveExpeditor::getArgInt |
( |
int | idx, |
|
|
bool | acceptsBool = true ) |
|
inline |
Gets an integer value from an argument.
- Parameters
-
| idx | Zero-based index of the argument |
| acceptsBool | Whether to accept boolean values as integers |
- Return values
-
| int | The integer value of the argument |
- Exceptions
-
| Error | if argument doesn't have a compatible type |
◆ getArgsLength()
| int uniot::PrimitiveExpeditor::getArgsLength |
( |
| ) |
|
|
inline |
Gets the number of arguments in the current function call.
- Return values
-
| int | The number of arguments in the list |
◆ getArgSymbol()
| const char * uniot::PrimitiveExpeditor::getArgSymbol |
( |
int | idx | ) |
|
|
inline |
Gets a symbol value from an argument.
- Parameters
-
| idx | Zero-based index of the argument |
- Return values
-
| symbol | The symbol value of the argument |
- Exceptions
-
| Error | if argument is not a symbol |
◆ getAssignedRegister()
Gets the register proxy assigned to this expeditor.
- Return values
-
| RegisterManagerProxy& | The register manager proxy |
◆ getRegisterManager()
Gets the static register manager instance.
- Return values
-
| RegisterManager& | The register manager instance. |
◆ list()
| Object uniot::PrimitiveExpeditor::list |
( |
| ) |
|
|
inline |
Gets the argument list (evaluated or not).
- Return values
-
| list | The list of arguments |
◆ makeBool()
| Object uniot::PrimitiveExpeditor::makeBool |
( |
bool | value | ) |
|
|
inline |
Creates a boolean Lisp object.
- Parameters
-
- Return values
-
| Object | Lisp object representing the boolean value |
| Nil | If value is false |
◆ makeInt()
| Object uniot::PrimitiveExpeditor::makeInt |
( |
int | value | ) |
|
|
inline |
Creates an integer Lisp object.
- Parameters
-
- Return values
-
◆ makeSymbol()
| Object uniot::PrimitiveExpeditor::makeSymbol |
( |
const char * | value | ) |
|
|
inline |
Creates a symbol Lisp object.
- Parameters
-
- Return values
-
◆ terminate()
| void uniot::PrimitiveExpeditor::terminate |
( |
const char * | msg | ) |
|
|
inline |
Terminates execution with an error message.
- Parameters
-
| msg | Error message to display |
The documentation for this class was generated from the following files: