diff --git a/src/core/fillarr.c b/src/core/fillarr.c index 273bf808..e504337c 100644 --- a/src/core/fillarr.c +++ b/src/core/fillarr.c @@ -64,12 +64,7 @@ void validateFill(B x) { } } -bool fillEqual(B w, B x) { // doesn't consume - if (w.u==x.u) return true; - bool wa = isAtm(w); - bool xa = isAtm(x); - if (wa!=xa) return false; - if (wa) return false; +NOINLINE bool fillEqualR(B w, B x) { // doesn't consume; both args must be arrays if (!eqShape(w, x)) return false; usz ia = a(w)->ia; if (ia==0) return true; diff --git a/src/core/fillarr.h b/src/core/fillarr.h index 4b03b22c..a034e469 100644 --- a/src/core/fillarr.h +++ b/src/core/fillarr.h @@ -10,7 +10,7 @@ typedef struct FillSlice { B asFill(B x); // consumes void validateFill(B x); -bool fillEqual(B w, B x); + B withFill(B x, B fill); // consumes both static B qWithFill(B x, B fill) { // consumes both assert(isArr(x)); @@ -18,6 +18,13 @@ static B qWithFill(B x, B fill) { // consumes both return withFill(x, fill); } +NOINLINE bool fillEqualR(B w, B x); +static bool fillEqual(B w, B x) { + if (w.u==x.u) return true; + if (isAtm(w)|isAtm(x)) return false; + return fillEqualR(w, x); +} + static B getFillR(B x) { // doesn't consume; can return bi_noFill if (isArr(x)) { diff --git a/src/h.h b/src/h.h index db0c8954..876a19a9 100644 --- a/src/h.h +++ b/src/h.h @@ -104,7 +104,7 @@ CTR_FOR(F) static const u16 C32_TAG = 0b0111111111110001; // 0111111111110001................00000000000ccccccccccccccccccccc char static const u16 TAG_TAG = 0b0111111111110010; // 0111111111110010................nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn special value (0=nothing, 1=undefined var, 2=bad header; 3=optimized out; 4=error?; 5=no fill) static const u16 VAR_TAG = 0b0111111111110011; // 0111111111110011ddddddddddddddddnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn variable reference -static const u16 EXT_TAG = 0b0111111111110100; // 0111111111110011ddddddddddddddddnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn extended variable reference +static const u16 EXT_TAG = 0b0111111111110100; // 0111111111110100ddddddddddddddddnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn extended variable reference static const u16 I32_TAG = 0b0111111111110111; // 0111111111110111................nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn 32-bit int; unused static const u16 MD1_TAG = 0b1111111111110010; // 1111111111110010ppppppppppppppppppppppppppppppppppppppppppppp000 1-modifier static const u16 MD2_TAG = 0b1111111111110011; // 1111111111110011ppppppppppppppppppppppppppppppppppppppppppppp000 2-modifier