diff --git a/src/core/stuff.c b/src/core/stuff.c index fa8fc6a0..ceeba136 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -565,9 +565,7 @@ bool eequal(B w, B x) { // doesn't consume return true; } -u64 depth(B x) { // doesn't consume - if (isAtm(x)) return 0; - if (TI(x,arrD1)) return 1; +usz depthF(B x) { // doesn't consume u64 r = 0; usz ia = IA(x); SGetU(x) diff --git a/src/core/stuff.h b/src/core/stuff.h index c487e920..2b53734f 100644 --- a/src/core/stuff.h +++ b/src/core/stuff.h @@ -215,6 +215,12 @@ static bool atomEqual(B w, B x) { // doesn't consume return atomEqualF(w, x); } +NOINLINE usz depthF(B x); +static usz depth(B x) { // doesn't consume + if (isAtm(x)) return 0; + if (TI(x,arrD1)) return 1; + return depthF(x); +} diff --git a/src/h.h b/src/h.h index 7ffb24d1..25687256 100644 --- a/src/h.h +++ b/src/h.h @@ -338,7 +338,6 @@ void printRaw(B x); // doesn't consume void arr_print(B x); // doesn't consume bool equal(B w, B x); // doesn't consume bool eequal(B w, B x); // doesn't consume -u64 depth(B x); // doesn't consume B toCells(B x); // consumes B toKCells(B x, ur k); // consumes B withFill(B x, B f); // consumes both