fix leaking in comp.c
This commit is contained in:
parent
5f9aeafec6
commit
f13e82af62
@ -117,7 +117,7 @@ NOINLINE void farr_print(FILE* f, B x) { // should accept refc=0 arguments for d
|
||||
if (!isC32(c) || o2cG(c)<32) goto reg;
|
||||
}
|
||||
fprintf(f, "\"");
|
||||
fprintsB(f, x);
|
||||
fprintsB(f, taga(a(x))); // allow incorrectly tagged input (e.g. by heapverify)
|
||||
fprintf(f, "\"");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -375,10 +375,12 @@ B nc_parseBlock(B tokens, usz i0, u32 end, bool isBlock, B* objs, u32* varCount)
|
||||
B vars0 = emptyHVec();
|
||||
#endif
|
||||
Vars vars = &vars0;
|
||||
B toFree = emptyHVec();
|
||||
if (isBlock) {
|
||||
nc_var(vars, m_c32vec(U"𝕤", 1));
|
||||
nc_var(vars, m_c32vec(U"𝕩", 1));
|
||||
nc_var(vars, m_c32vec(U"𝕨", 1));
|
||||
B t;
|
||||
t=m_c32vec(U"𝕤", 1); nc_var(vars, t); nc_add(&toFree, t);
|
||||
t=m_c32vec(U"𝕩", 1); nc_var(vars, t); nc_add(&toFree, t);
|
||||
t=m_c32vec(U"𝕨", 1); nc_var(vars, t); nc_add(&toFree, t);
|
||||
}
|
||||
B r0 = nc_parseStatements(tokens, i0, &i1, end, objs, vars);
|
||||
#if FAST_NATIVE_COMP
|
||||
@ -392,6 +394,7 @@ B nc_parseBlock(B tokens, usz i0, u32 end, bool isBlock, B* objs, u32* varCount)
|
||||
if (i1 != IA(tokens)) thrM("Native compiler: Code present after block end");
|
||||
B r = IGet(r0, 1);
|
||||
decG(r0);
|
||||
decG(toFree);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user