int main(int argc, char** argv) { list_t* list_warrior = NULL; /* TODO option for --dump_cycle */ for (int i = 1; i < argc; ++i) { list_warrior = add_warrior(list_warrior, argv[i]); } run(make_vm(list_warrior)); return 0; }
void execute(Chunk *chunk) { Closure *closure = make_closure(chunk); Frame *frame = make_frame(NULL, closure); VM *vm = make_vm(frame, 0); execute_function(vm); gc(vm); free(vm); // TODO - free last closure [?] // Other closrues should be already taken care of // by the last gc sweep, but this one existed outside // of the heap. }