some cleanup
This commit is contained in:
parent
1072a8aa77
commit
363309a218
@ -9,8 +9,10 @@ bool inErr;
|
||||
NORETURN NOINLINE void err(char* s) {
|
||||
if (inErr) {
|
||||
printf("\nCBQN encountered fatal error during information printing of another fatal error. Exiting without printing more info.\n");
|
||||
#ifdef DEBUG
|
||||
__builtin_trap();
|
||||
#endif
|
||||
exit(1);
|
||||
__builtin_abort();
|
||||
}
|
||||
inErr = true;
|
||||
puts(s); fflush(stdout);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
B eachd_fn(BBB2B f, B fo, B w, B x); // consumes w,x; assumes at least one is array
|
||||
B eachm_fn(BB2B f, B fo, B x); // consumes x; x must be array
|
||||
|
||||
static B eachm(B f, B x) { // complete F¨ x without fills
|
||||
static B eachm(B f, B x) { // complete F¨ x without fills; consumes x
|
||||
if (isAtm(x)) return m_hunit(c1(f, x));
|
||||
if (isFun(f)) return eachm_fn(c(Fun,f)->c1, f, x);
|
||||
if (isMd(f)) if (isAtm(x) || a(x)->ia) { decR(x); thrM("Calling a modifier"); }
|
||||
@ -15,7 +15,7 @@ static B eachm(B f, B x) { // complete F¨ x without fills
|
||||
return mut_fcd(r, x);
|
||||
}
|
||||
|
||||
static B eachd(B f, B w, B x) { // complete w F¨ x without fills
|
||||
static B eachd(B f, B w, B x) { // complete w F¨ x without fills; consumes w,x
|
||||
if (isAtm(w) & isAtm(x)) return m_hunit(c2(f, w, x));
|
||||
return eachd_fn(c2fn(f), f, w, x);
|
||||
}
|
||||
|
||||
4
src/vm.c
4
src/vm.c
@ -582,7 +582,7 @@ B evalBC(Block* bl, Body* b, Scope* sc) { // doesn't consume
|
||||
}
|
||||
case FN1C: { P(f)P(x)
|
||||
GS_UPD;POS_UPD;
|
||||
ADD(c1(f, x); dec(f));
|
||||
ADD(c1(f, x)); dec(f);
|
||||
break;
|
||||
}
|
||||
case FN1O: { P(f)P(x)
|
||||
@ -592,7 +592,7 @@ B evalBC(Block* bl, Body* b, Scope* sc) { // doesn't consume
|
||||
}
|
||||
case FN2C: { P(w)P(f)P(x)
|
||||
GS_UPD;POS_UPD;
|
||||
ADD(c2(f, w, x); dec(f));
|
||||
ADD(c2(f, w, x)); dec(f);
|
||||
break;
|
||||
}
|
||||
case FN2O: { P(w)P(f)P(x)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user