Fix a bug in dc
Since dc uses map for functions now, I can't remove them in `bc_vm_clean()`.
This commit is contained in:
parent
599cb78478
commit
85ac0e9cbe
9
src/vm.c
9
src/vm.c
|
@ -455,15 +455,14 @@ static void bc_vm_clean(void) {
|
|||
ip->idx == f->code.len)
|
||||
{
|
||||
#if BC_ENABLED
|
||||
if (BC_IS_BC) bc_vec_npop(&f->labels, f->labels.len);
|
||||
if (BC_IS_BC) {
|
||||
bc_vec_npop(&f->labels, f->labels.len);
|
||||
bc_vec_npop(&f->strs, f->strs.len);
|
||||
}
|
||||
#endif // BC_ENABLED
|
||||
bc_vec_npop(&f->strs, f->strs.len);
|
||||
bc_vec_npop(&f->consts, f->consts.len);
|
||||
bc_vec_npop(&f->code, f->code.len);
|
||||
ip->idx = 0;
|
||||
#if DC_ENABLED
|
||||
if (!BC_IS_BC) bc_vec_npop(fns, fns->len - BC_PROG_REQ_FUNCS);
|
||||
#endif // DC_ENABLED
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loadingâ¦
Reference in New Issue