a bit more valgrind debugging stuff

This commit is contained in:
dzaima 2022-07-10 06:07:28 +03:00
parent f16a09309a
commit b43153495a
2 changed files with 5 additions and 2 deletions

View File

@ -771,6 +771,9 @@ NOINLINE void print_allocStats() {
}
return x;
}
void g_def(void* data, u64 len) {
vg_printDump_p(NULL, data, len);
}
#endif
// for gdb

View File

@ -603,11 +603,11 @@ typedef struct Fun {
B c1F(B f, B x);
B c2F(B f, B w, B x);
static B c1(B f, B x) { // BQN-call f monadically; consumes x
if (isFun(f)) return VALIDATE(VRES(c(Fun,f)->c1(f, x)));
if (isFun(f)) return VALIDATE(VRES(c(Fun,f)->c1(f, VRES(x))));
return c1F(f, x);
}
static B c2(B f, B w, B x) { // BQN-call f dyadically; consumes w,x
if (isFun(f)) return VALIDATE(VRES(c(Fun,f)->c2(f, w, x)));
if (isFun(f)) return VALIDATE(VRES(c(Fun,f)->c2(f, VRES(w), VRES(x))));
return c2F(f, w, x);
}
static void errMd(B x) { if(RARE(isMd(x))) thrM("Calling a modifier"); }