This commit is contained in:
blueloveTH 2023-05-24 17:43:36 +08:00
parent 65101b4334
commit 4156e6f932
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ bool pkpy_vm_run(pkpy_vm* vm_handle, const char* source) {
ERRHANDLER_OPEN
CodeObject_ code = vm->compile(source, "<c-bound>", EXEC_MODE);
PyObject* result = vm->_exec(code, vm->_main);
// PyObject* result = vm->_exec(code, vm->_main);
//unpack_return(w, result);
//NOTE: it seems like vm->_exec should return whatever the last command it

View File

@ -101,8 +101,8 @@ struct ManagedHeap{
void mark();
~ManagedHeap(){
for(PyObject* obj: _no_gc) obj->~PyObject(), pool64.dealloc(obj);
for(PyObject* obj: gen) obj->~PyObject(), pool64.dealloc(obj);
for(PyObject* obj: _no_gc) { obj->~PyObject(); pool64.dealloc(obj); }
for(PyObject* obj: gen) { obj->~PyObject(); pool64.dealloc(obj); }
#if DEBUG_GC_STATS
for(auto& [type, count]: deleted){
std::cout << "GC: " << obj_type_name(vm, type) << "=" << count << std::endl;