aboutsummaryrefslogtreecommitdiff
path: root/src/tools.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools.hpp')
-rw-r--r--src/tools.hpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/tools.hpp b/src/tools.hpp
new file mode 100644
index 0000000..c587500
--- /dev/null
+++ b/src/tools.hpp
@@ -0,0 +1,37 @@
1#pragma once
2
3#include "uniquekey.hpp"
4
5class Universe;
6
7enum class LookupMode
8{
9 LaneBody, // send the lane body directly from the source to the destination lane. keep this one first so that it's the value we get when we default-construct
10 ToKeeper, // send a function from a lane to a keeper state
11 FromKeeper // send a function from a keeper state to a lane
12};
13
14enum class FuncSubType
15{
16 Bytecode,
17 Native,
18 FastJIT
19};
20
21[[nodiscard]] FuncSubType luaG_getfuncsubtype(lua_State* L_, StackIndex i_);
22
23// #################################################################################################
24
25// xxh64 of string "kConfigRegKey" generated at https://www.pelock.com/products/hash-calculator
26static constexpr RegistryUniqueKey kConfigRegKey{ 0x608379D20A398046ull }; // registry key to access the configuration
27
28// xxh64 of string "kLookupRegKey" generated at https://www.pelock.com/products/hash-calculator
29static constexpr RegistryUniqueKey kLookupRegKey{ 0xBF1FC5CF3C6DD47Bull }; // registry key to access the lookup database
30
31// #################################################################################################
32
33namespace tools {
34 void PopulateFuncLookupTable(lua_State* L_, StackIndex i_, std::string_view const& name_);
35 [[nodiscard]] std::string_view PushFQN(lua_State* L_, StackIndex t_, int last_);
36 void SerializeRequire(lua_State* L_);
37} // namespace tools