feat(furvm): introduce set instruction

Closes: #57
This commit is contained in:
2026-07-14 12:40:47 +02:00
parent 03448d865e
commit 42e71080a2
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -161,6 +161,12 @@ void executor::step() {
auto array = pop_thing();
push_thing(array->at(index->integer()));
} break;
case instruction_t::Set: {
auto index = pop_thing();
auto array = pop_thing();
auto element = pop_thing();
array->at(index->integer()) = std::move(element->clone());
} break;
case instruction_t::Drop: {
pop_thing();
} break;