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;
|
if (!isC32(c) || o2cG(c)<32) goto reg;
|
||||||
}
|
}
|
||||||
fprintf(f, "\"");
|
fprintf(f, "\"");
|
||||||
fprintsB(f, x);
|
fprintsB(f, taga(a(x))); // allow incorrectly tagged input (e.g. by heapverify)
|
||||||
fprintf(f, "\"");
|
fprintf(f, "\"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -375,10 +375,12 @@ B nc_parseBlock(B tokens, usz i0, u32 end, bool isBlock, B* objs, u32* varCount)
|
|||||||
B vars0 = emptyHVec();
|
B vars0 = emptyHVec();
|
||||||
#endif
|
#endif
|
||||||
Vars vars = &vars0;
|
Vars vars = &vars0;
|
||||||
|
B toFree = emptyHVec();
|
||||||
if (isBlock) {
|
if (isBlock) {
|
||||||
nc_var(vars, m_c32vec(U"𝕤", 1));
|
B t;
|
||||||
nc_var(vars, m_c32vec(U"𝕩", 1));
|
t=m_c32vec(U"𝕤", 1); nc_var(vars, t); nc_add(&toFree, t);
|
||||||
nc_var(vars, m_c32vec(U"𝕨", 1));
|
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);
|
B r0 = nc_parseStatements(tokens, i0, &i1, end, objs, vars);
|
||||||
#if FAST_NATIVE_COMP
|
#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");
|
if (i1 != IA(tokens)) thrM("Native compiler: Code present after block end");
|
||||||
B r = IGet(r0, 1);
|
B r = IGet(r0, 1);
|
||||||
decG(r0);
|
decG(r0);
|
||||||
|
decG(toFree);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user