mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
65101b4334
commit
4156e6f932
@ -125,7 +125,7 @@ bool pkpy_vm_run(pkpy_vm* vm_handle, const char* source) {
|
|||||||
ERRHANDLER_OPEN
|
ERRHANDLER_OPEN
|
||||||
|
|
||||||
CodeObject_ code = vm->compile(source, "<c-bound>", EXEC_MODE);
|
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);
|
//unpack_return(w, result);
|
||||||
//NOTE: it seems like vm->_exec should return whatever the last command it
|
//NOTE: it seems like vm->_exec should return whatever the last command it
|
||||||
|
4
src/gc.h
4
src/gc.h
@ -101,8 +101,8 @@ struct ManagedHeap{
|
|||||||
void mark();
|
void mark();
|
||||||
|
|
||||||
~ManagedHeap(){
|
~ManagedHeap(){
|
||||||
for(PyObject* obj: _no_gc) obj->~PyObject(), pool64.dealloc(obj);
|
for(PyObject* obj: _no_gc) { obj->~PyObject(); pool64.dealloc(obj); }
|
||||||
for(PyObject* obj: gen) obj->~PyObject(), pool64.dealloc(obj);
|
for(PyObject* obj: gen) { obj->~PyObject(); pool64.dealloc(obj); }
|
||||||
#if DEBUG_GC_STATS
|
#if DEBUG_GC_STATS
|
||||||
for(auto& [type, count]: deleted){
|
for(auto& [type, count]: deleted){
|
||||||
std::cout << "GC: " << obj_type_name(vm, type) << "=" << count << std::endl;
|
std::cout << "GC: " << obj_type_name(vm, type) << "=" << count << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user