feat(furvm): add basic function

This commit is contained in:
2026-06-11 14:50:51 +02:00
parent 5472b77ea0
commit ba39f5ab27
7 changed files with 244 additions and 8 deletions
+31
View File
@@ -10,6 +10,11 @@
*/
namespace furvm {
/**
* @brief A byte.
*
* There's nothing more to it.
*/
using byte = std::uint8_t;
// constant.hpp
@@ -47,6 +52,32 @@ enum class instruction_t : byte;
*/
struct instruction;
// function.hpp
/**
* @enum function_t
* @brief Function type.
*/
enum class function_t : std::uint8_t;
/**
* @class function
* @brief Function.
*
* A furvm function.
*/
class function;
/**
* @brief An alias to a function shared pointer.
*/
using function_p = std::shared_ptr<function>;
/**
* @brief Furvm function's index.
*/
using function_handle = std::uint16_t;
// module.hpp
/**