fix ⊢¨ {a←𝕩 ⋄ ⥊𝕩} 2‿3⥊<"a"
This commit is contained in:
parent
2259e7b6a9
commit
927814d182
@ -147,13 +147,14 @@ static bool eqShPart(usz* w, usz* x, usz len) {
|
||||
PLAINLOOP for (i32 i = 0; i < len; i++) if (w[i]!=x[i]) return false;
|
||||
return true;
|
||||
}
|
||||
static bool eqShape(B w, B x) { assert(isArr(w)); assert(isArr(x));
|
||||
ur wr = RNK(w); usz* wsh = SH(w);
|
||||
ur xr = RNK(x); usz* xsh = SH(x);
|
||||
static bool ptr_eqShape(Arr* w, Arr* x) {
|
||||
ur wr = PRNK(w); usz* wsh = PSH(w);
|
||||
ur xr = PRNK(x); usz* xsh = PSH(x);
|
||||
if (wr!=xr) return false;
|
||||
if (wsh==xsh) return true;
|
||||
return eqShPart(wsh, xsh, wr);
|
||||
}
|
||||
static bool eqShape(B w, B x) { assert(isArr(w) && isArr(x)); return ptr_eqShape(a(w), a(x)); }
|
||||
|
||||
B bit_sel(B b, B e0, B e1); // consumes b; b must be bitarr; b⊏e0‿e1
|
||||
Arr* allZeroes(usz ia);
|
||||
|
||||
@ -77,7 +77,7 @@ B eachm_fn(B fo, B x, BB2B f) {
|
||||
case t_fillslice: {
|
||||
FillSlice* s = c(FillSlice,x);
|
||||
Arr* p = s->p;
|
||||
if (p->refc==1 && (p->type==t_fillarr || p->type==t_harr) && ((FillArr*)p)->a == s->a && p->ia==ia) {
|
||||
if (p->refc==1 && (p->type==t_fillarr || p->type==t_harr) && ((FillArr*)p)->a == s->a && ptr_eqShape(p, a(x))) {
|
||||
x = taga(ptr_inc(p));
|
||||
value_free((Value*)s);
|
||||
goto re_reuse;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user