@@ -12,19 +12,6 @@
|
||||
|
||||
namespace furvm {
|
||||
|
||||
executor::executor(egzekutor, executor_handle id, const context_p& context)
|
||||
: m_id(id), m_context(context) {}
|
||||
|
||||
executor::~executor() {
|
||||
m_context->m_executors[m_id] = nullptr;
|
||||
}
|
||||
|
||||
executor_p executor::create(const context_p& context) {
|
||||
auto ex = std::make_shared<executor>(egzekutor{}, context->m_executors.size(), context);
|
||||
context->m_executors.push_back(ex);
|
||||
return std::move(ex);
|
||||
}
|
||||
|
||||
void executor::push_frame(const mod_p& mod, function_handle function) {
|
||||
const auto& func = mod->function_at(function);
|
||||
if (func->type() != function_t::Normal) throw std::runtime_error("unexpected function type");
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ int main(void) {
|
||||
std::ofstream file("./test.furm", std::ios::binary);
|
||||
furvm::serializer::serialize_module(file, mainModule);
|
||||
|
||||
auto executor = furvm::executor::create(context);
|
||||
auto executor = context->emplace_executor(context);
|
||||
executor->push_frame(mainModule, 0);
|
||||
|
||||
static constexpr std::size_t FPC = 3; // Frames per collection
|
||||
|
||||
Reference in New Issue
Block a user