mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 12:00:18 +00:00
...
This commit is contained in:
parent
0912e88ac7
commit
450b7e1e3c
2
src/vm.h
2
src/vm.h
@ -80,6 +80,7 @@ public:
|
||||
ValueStack s_data;
|
||||
stack< Frame > callstack;
|
||||
std::vector<PyTypeInfo> _all_types;
|
||||
void (*_gc_marker_ex)(VM*) = nullptr;
|
||||
|
||||
NameDict _modules; // loaded modules
|
||||
std::map<StrName, Str> _lazy_modules; // lazy loaded modules
|
||||
@ -1191,6 +1192,7 @@ inline void ManagedHeap::mark() {
|
||||
for(PyObject* obj: _no_gc) OBJ_MARK(obj);
|
||||
for(auto& frame : vm->callstack.data()) frame._gc_mark();
|
||||
for(PyObject* obj: vm->s_data) if(obj!=nullptr) OBJ_MARK(obj);
|
||||
if(vm->_gc_marker_ex != nullptr) vm->_gc_marker_ex(vm);
|
||||
}
|
||||
|
||||
inline Str obj_type_name(VM *vm, Type type){
|
||||
|
Loading…
x
Reference in New Issue
Block a user