diff --git a/src/core/stuff.c b/src/core/stuff.c index 72abc33e..0f90121d 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -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; } diff --git a/src/opt/comp.c b/src/opt/comp.c index b2ec206c..deea72c1 100644 --- a/src/opt/comp.c +++ b/src/opt/comp.c @@ -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; }