Make sure cached modules don't get garbage collected

This commit is contained in:
K. Lange 2021-01-05 07:51:35 +09:00
parent 3aa984c139
commit 0f6e823095

View File

@ -209,6 +209,7 @@ static void markRoots() {
krk_markObject((KrkObj*)upvalue);
}
krk_markTable(&vm.globals);
krk_markTable(&vm.modules);
krk_markCompilerRoots();
for (int i = 0; i < METHOD__MAX; ++i) {
krk_markValue(vm.specialMethodNames[i]);