diff --git a/src/builtins/fold.c b/src/builtins/fold.c index 7aed07c8..717ecec7 100644 --- a/src/builtins/fold.c +++ b/src/builtins/fold.c @@ -116,7 +116,7 @@ B sum_c1(B t, B x) { if (ia==0) { decG(x); return m_f64(0); } u8 xe = TI(x,elType); if (!elNum(xe)) { - x = any_squeeze(x); xe = TI(x,elType); + x = squeeze_any(x); xe = TI(x,elType); if (!elNum(xe)) thrF("β€’math.Sum 𝕩: 𝕩 elements must be numbers", x); } f64 r; diff --git a/src/builtins/internal.c b/src/builtins/internal.c index 1bc6a7ef..1b0a1f53 100644 --- a/src/builtins/internal.c +++ b/src/builtins/internal.c @@ -33,7 +33,7 @@ B refc_c1(B t, B x) { } B squeeze_c1(B t, B x) { if (!isArr(x)) return x; - return any_squeeze(x); + return squeeze_any(x); } B deepSqueeze_c1(B t, B x) { return squeeze_deep(x); @@ -429,7 +429,7 @@ bool validate_flags(bool crash, B x) { if (isArr(x) && IA(x)!=0) { if (FL_HAS(x, fl_squoze)) { B t = unshare(x); - t = any_squeeze(t); + t = squeeze_any(t); if (TI(t,elType) != TI(x,elType)) validate_fail(crash, "Validate: Wrongly squeezed: array has eltype %S, expected %S", eltype_repr(TI(x,elType)), eltype_repr(TI(t,elType))); decG(t); } diff --git a/src/builtins/md1.c b/src/builtins/md1.c index 05512a18..6553a369 100644 --- a/src/builtins/md1.c +++ b/src/builtins/md1.c @@ -45,7 +45,7 @@ B each_c1(Md1D* d, B x) { B f = d->f; u8 rtid = RTID(f); if (rtid==n_ltack || rtid==n_rtack) { if (EACH_FILLS) dec(xf); - return TI(x,arrD1) || IA(x)==0? x : any_squeeze(EACH_FILLS? x : withFill(x, bi_noFill)); + return TI(x,arrD1) || IA(x)==0? x : squeeze_any(EACH_FILLS? x : withFill(x, bi_noFill)); } r = eachm_fn(f, x, c(Fun,f)->c1); } else { diff --git a/src/builtins/md2.c b/src/builtins/md2.c index eaeb8c9a..c64af514 100644 --- a/src/builtins/md2.c +++ b/src/builtins/md2.c @@ -93,7 +93,7 @@ NOINLINE B repeat_replaceR(B g, B* q) { usz ia = IA(g); M_HARR(r, ia); for (usz i = 0; i < ia; i++) HARR_ADD(r, i, repeat_replace(GetU(g,i), q)); - return any_squeeze(HARR_FC(r, g)); + return squeeze_any(HARR_FC(r, g)); } #define REPEAT_T(CN, END, ...) \ B g = CN(d->g, __VA_ARGS__ inc(x)); \ diff --git a/src/builtins/sfns.c b/src/builtins/sfns.c index 95463fbf..bfe4cd23 100644 --- a/src/builtins/sfns.c +++ b/src/builtins/sfns.c @@ -273,7 +273,7 @@ B shape_c2(B t, B w, B x) { x = TO_GET(x, 0); goto unit; } - if (xia <= nia/2) x = any_squeeze(x); + if (xia <= nia/2) x = squeeze_any(x); u8 xl = arrTypeBitsLog(TY(x)); u8 xt = arrNewType(TY(x)); @@ -414,7 +414,7 @@ static B recPick(B w, B x) { // doesn't consume if (isAtm(c)) thrM("π•¨βŠ‘π•©: 𝕨 contained list with mixed-type elements"); HARR_ADD(r, i, recPick(c, x)); } - return any_squeeze(HARR_FC(r, w)); + return squeeze_any(HARR_FC(r, w)); } } } diff --git a/src/builtins/slash.c b/src/builtins/slash.c index 44e56b21..cebb7b33 100644 --- a/src/builtins/slash.c +++ b/src/builtins/slash.c @@ -651,7 +651,7 @@ B slash_c2(B t, B w, B x) { u64 s; u8 we = TI(w,elType); if (!elInt(we)) { - w=any_squeeze(w); we=TI(w,elType); // TODO move squeeze to before depth(w) + w=squeeze_any(w); we=TI(w,elType); // TODO move squeeze to before depth(w) if (!elInt(we)) { s = usum(w); goto arrW_base; diff --git a/src/builtins/squeeze.c b/src/builtins/squeeze.c index 5c9e1b72..d6fa0545 100644 --- a/src/builtins/squeeze.c +++ b/src/builtins/squeeze.c @@ -256,7 +256,7 @@ NOINLINE B int_squeeze_sorted(B x, Arr* xa, u8 type, ux ia) { u8 xe = TI(x,elType); \ usz ia = IA(x); -NOINLINE B any_squeeze(B x) { +NOINLINE B squeeze_any(B x) { SQ_READ; SQ_FAST_EXT(, return x); if (ia==0) return FL_SET(x, fl_squoze); // TODO return a version of the smallest type? @@ -296,7 +296,7 @@ B squeeze_chrOut(B x) { return squeeze_chrTryImpl(x).r; } B squeeze_deep(B x) { if (!isArr(x)) return x; - x = any_squeeze(x); + x = squeeze_any(x); if (TI(x,elType)!=el_B) return x; usz ia = IA(x); M_HARR(r, ia) @@ -308,5 +308,5 @@ B squeeze_deep(B x) { SGet(x); for (ux i=0; i