Skip to content

Commit

Permalink
vm: reset context only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Jan 5, 2024
1 parent 59b507b commit fe82ad6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vm/contexts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ context* factor_vm::new_context() {
new_context = new context(datastack_size, retainstack_size, callstack_size);
} else {
new_context = unused_contexts.back();
new_context->reset();
unused_contexts.pop_back();
}

new_context->reset();

active_contexts.insert(new_context);

return new_context;
Expand Down

0 comments on commit fe82ad6

Please sign in to comment.