From 054cdac6d9f217c40ba54edf78be62eb99eddaf3 Mon Sep 17 00:00:00 2001 From: dzaima Date: Wed, 28 May 2025 04:29:37 +0300 Subject: [PATCH] use unpack_unit helper --- src/builtins/cells.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/builtins/cells.c b/src/builtins/cells.c index 4cec6758..c225341e 100644 --- a/src/builtins/cells.c +++ b/src/builtins/cells.c @@ -763,18 +763,12 @@ NOINLINE B for_cells_SA(B f, B w, B x, ur xcr, ur xr, u32 chr) { // w⊸F⎉xcr } break; case n_shifta: case n_shiftb: if (xcr!=1) break; - if (isAtm(w)) { - shift_atm:; - if (IA(x)==0) { - dec(w); - return x; - } - return shift_cells(w, x, cam, xsh[xk], el_or(TI(x,elType), selfElType(w)), rtid); - } - if (RNK(w)==0) { - w = TO_GET(w, 0); - goto shift_atm; + if (!unpack_unit(&w)) break; + if (IA(x)==0) { + dec(w); + return x; } + return shift_cells(w, x, cam, xsh[xk], el_or(TI(x,elType), selfElType(w)), rtid); break; case n_take: case n_drop: { bool take = rtid==n_take;