Compare commits

..

No commits in common. "054fcba7e4037207aefcc3911222026384166908" and "9a23eb6c9e329b7e6153c7bab2c007738f6cda9b" have entirely different histories.

3 changed files with 4 additions and 18 deletions

View File

@ -3,7 +3,7 @@
void pk_print_stack(VM* self, py_Frame* frame, Bytecode byte) { void pk_print_stack(VM* self, py_Frame* frame, Bytecode byte) {
return; return;
if(frame == NULL || !self->main || py_isnil(self->main)) return; if(frame == NULL || py_isnil(self->main)) return;
py_TValue* sp = self->stack.sp; py_TValue* sp = self->stack.sp;
c11_sbuf buf; c11_sbuf buf;

View File

@ -47,10 +47,7 @@ void py_newellipsis(py_OutRef out) {
out->is_ptr = false; out->is_ptr = false;
} }
void py_newnil(py_OutRef out) { void py_newnil(py_OutRef out) { out->type = 0; }
out->type = tp_nil;
out->is_ptr = false;
}
void py_newnativefunc(py_OutRef out, py_CFunction f) { void py_newnativefunc(py_OutRef out, py_CFunction f) {
out->type = tp_nativefunc; out->type = tp_nativefunc;

View File

@ -16,6 +16,7 @@ d.__path__ = '__main__'
d.a = [] d.a = []
d.gc = 1 d.gc = 1
print('-' * 100)
assert d.gc == 1 assert d.gc == 1
del d.a del d.a
@ -32,15 +33,3 @@ assert d.gc == 1
# 5 nil # 5 nil
# 6 __path__ [2] # 6 __path__ [2]
# 7 a [3] # 7 a [3]
import gc
gc.collect()
a = []
del a
assert gc.collect() == 1
a = []
a.append(a)
del a
assert gc.collect() == 1