diff --git a/src/builtins/arithd.c b/src/builtins/arithd.c index 4e3f436d..e920fff2 100644 --- a/src/builtins/arithd.c +++ b/src/builtins/arithd.c @@ -337,7 +337,7 @@ AR_I_SCALAR("โŒŠ", floor, w.f>x.f?x.f:w.f, {}) AR_I_SCALAR("โŒˆ", ceil , w.f>x.f?w.f:x.f, {}) #undef AR_I_SCALAR B not_c2(B t, B w, B x) { - return add_c2(m_f64(1), m_f64(1), sub_c2(t, w, x)); + return C2(add, m_f64(1), sub_c2(t, w, x)); } #define AR_F_SCALAR(CHR, NAME, EXPR) B NAME##_c2(B t, B w, B x) { \ diff --git a/src/builtins/arithm.c b/src/builtins/arithm.c index 9a54e033..45aa5143 100644 --- a/src/builtins/arithm.c +++ b/src/builtins/arithm.c @@ -84,7 +84,7 @@ B add_c1(B t, B x) { } B sub_c2(B,B,B); #define SUB_BODY(FEXPR) return sub_c2(t, m_f64(0), x); -#define NOT_BODY(FEXPR) x = num_squeezeChk(x); return TI(x,elType)==el_bit? bit_negate(x) : sub_c2(m_f64(0), m_f64(1), x); +#define NOT_BODY(FEXPR) x = num_squeezeChk(x); return TI(x,elType)==el_bit? bit_negate(x) : C2(sub, m_f64(1), x); GC1i("-", sub, -v, el_bit, bit_sel(x,m_f64(0),m_f64(-1)), SUB_BODY) GC1i("|", stile, fabs(v), el_bit, x, STILE_BODY) diff --git a/src/builtins/md1.c b/src/builtins/md1.c index bf43fd5f..730e6f53 100644 --- a/src/builtins/md1.c +++ b/src/builtins/md1.c @@ -74,7 +74,7 @@ B tbl_c2(Md1D* d, B w, B x) { B f = d->f; if (isFun(f) && isPervasiveDy(f) && TI(w,arrD1)) { if (TI(x,arrD1) && wia>130 && xia<2560>>arrTypeBitsLog(TY(x))) { Arr* wd = arr_shVec(TI(w,slice)(incG(w), 0, wia)); - r = fc2(f, slash_c2(f, m_i32(xia), taga(wd)), shape_c2(f, m_f64(ria), incG(x))); + r = fc2(f, C2(slash, m_i32(xia), taga(wd)), C2(shape, m_f64(ria), incG(x))); } else if (xia>7) { SGet(w) M_HARR(r, wia) diff --git a/src/builtins/md2.c b/src/builtins/md2.c index 5e763f0f..e7a64bdf 100644 --- a/src/builtins/md2.c +++ b/src/builtins/md2.c @@ -148,7 +148,7 @@ B cond_c1(Md2D* d, B x) { B f=d->f; B g=d->g; usz fri = WRAP(o2i64(fr), IA(g), thrM("โ—ถ: ๐”ฝ out of bounds of ๐•˜")); return c1(IGetU(g, fri), x); } else { - B fn = pick_c2(m_f64(0), fr, inc(g)); + B fn = C2(pick, fr, inc(g)); B r = c1(fn, x); dec(fn); return r; @@ -161,7 +161,7 @@ B cond_c2(Md2D* d, B w, B x) { B g=d->g; usz fri = WRAP(o2i64(fr), IA(g), thrM("โ—ถ: ๐”ฝ out of bounds of ๐•˜")); return c2(IGetU(g, fri), w, x); } else { - B fn = pick_c2(m_f64(0), fr, inc(g)); + B fn = C2(pick, fr, inc(g)); B r = c2(fn, w, x); dec(fn); return r; diff --git a/src/builtins/search.c b/src/builtins/search.c index e2315418..0c830751 100644 --- a/src/builtins/search.c +++ b/src/builtins/search.c @@ -297,7 +297,7 @@ B count_c2(B t, B w, B x) { x = t.n; } - if (!isArr(x) || IA(x)<=1) return indexOf_c2(m_f64(0), w, x); + if (!isArr(x) || IA(x)<=1) return C2(indexOf, w, x); u8 we = TI(w,elType); usz wia = IA(w); u8 xe = TI(x,elType); usz xia = IA(x); i32* rp; B r = m_i32arrc(&rp, x); diff --git a/src/builtins/select.c b/src/builtins/select.c index f9dfa8f6..70166e82 100644 --- a/src/builtins/select.c +++ b/src/builtins/select.c @@ -198,7 +198,7 @@ B select_c2(B t, B w, B x) { if (max>=(i64)xn) thrF("โŠ: Indexing out-of-bounds (%iโˆŠ๐•จ, %sโ‰กโ‰ ๐•ฉ)", max, xn); \ W* ip=wp; usz off=xn; \ if (max>=0) { off=0; if (RARE(min<0)) { \ - if (RARE(xn > (1ULL<<(sizeof(W)*8-1)))) { w=taga(NEXT(w)); mm_free((Value*)r); return select_c2(m_f64(0), w, x); } \ + if (RARE(xn > (1ULL<<(sizeof(W)*8-1)))) { w=taga(NEXT(w)); mm_free((Value*)r); return C2(select, w, x); } \ if (!wt) {wt=TALLOCP(W,i1-i0);} ip=wt-i0;\ for (usz i=i0; i=256 : wia>=4) && csz<128) { // test widen/narrow on bitarr input // ShArr* sh = RNK(x)==1? NULL : ptr_inc(shObj(x)); - // B t = select_c2(m_f64(0), w, widenBitArr(x, 1)); + // B t = C2(select, w, widenBitArr(x, 1)); // B r = narrowWidenedBitArr(t, wr, xr-1, sh==NULL? &xn : sh->a+1); // if (sh!=NULL) ptr_dec(sh); // return r; if (csz==1) { - if (wia/4>=xia) return taga(cpyBitArr(select_c2(m_f64(0), w, taga(cpyI8Arr(x))))); + if (wia/4>=xia) return taga(cpyBitArr(C2(select, w, taga(cpyI8Arr(x))))); } else if (csz>64? wia/2>=xn : wia>=xn/2) { ShArr* sh = ptr_inc(shObj(x)); - B t = select_c2(m_f64(0), w, widenBitArr(x, 1)); + B t = C2(select, w, widenBitArr(x, 1)); B r = narrowWidenedBitArr(t, wr, xr-1, sh->a+1); ptr_dec(sh); return r; @@ -263,7 +263,7 @@ B select_c2(B t, B w, B x) { if (xr!=1) { if (xe!=el_B && (csz<