refactor(furvm): expose context thing allocator

Refs: #12
This commit is contained in:
2026-06-19 14:15:05 +02:00
parent f14f3854e2
commit 5a1b7c5aa6
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -92,6 +92,8 @@ public:
auto erase_thing(Args&&... args) { auto erase_thing(Args&&... args) {
return m_things.erase(std::forward<Args>(args)...); return m_things.erase(std::forward<Args>(args)...);
} }
thing_allocator<std::byte> thing_alloc() const { return m_thingAllocator; }
public: public:
/** /**
* @brief Removes unreferenced things from the thing list. * @brief Removes unreferenced things from the thing list.
+1 -1
View File
@@ -78,7 +78,7 @@ void executor::step() {
switch (instr) { switch (instr) {
case instruction_t::NoOperation: break; case instruction_t::NoOperation: break;
case instruction_t::PushB2I: { case instruction_t::PushB2I: {
push_thing({ thing_t::Int32, m_context->m_thingAllocator })->int32() = frame.mod->byte(frame.position++); push_thing({ thing_t::Int32, m_context->thing_alloc() })->int32() = frame.mod->byte(frame.position++);
} break; } break;
case instruction_t::Drop: { case instruction_t::Drop: {
pop_thing(); pop_thing();