add back native »
This commit is contained in:
parent
76c3466c96
commit
b31865b0f4
@ -20,10 +20,12 @@
|
|||||||
// #define TIME // output runtime of every expression
|
// #define TIME // output runtime of every expression
|
||||||
// #define RT_PERF // time runtime primitives
|
// #define RT_PERF // time runtime primitives
|
||||||
|
|
||||||
|
#ifdef CATCH_ERRORS
|
||||||
#ifndef CATCH_ERRORS
|
#define PROPER_FILLS EACH_FILLS
|
||||||
|
#else
|
||||||
#undef EACH_FILLS
|
#undef EACH_FILLS
|
||||||
#define EACH_FILLS false
|
#define EACH_FILLS false
|
||||||
|
#define PROPER_FILLS false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define rtLen 63
|
#define rtLen 63
|
||||||
@ -121,7 +123,7 @@ int main() {
|
|||||||
bool rtComplete[] = {
|
bool rtComplete[] = {
|
||||||
/* +-×÷⋆√⌊⌈|¬ */ 1,1,1,1,1,0,1,1,1,1,
|
/* +-×÷⋆√⌊⌈|¬ */ 1,1,1,1,1,0,1,1,1,1,
|
||||||
/* ∧∨<>≠=≤≥≡≢ */ 1,1,1,1,1,1,1,1,1,1,
|
/* ∧∨<>≠=≤≥≡≢ */ 1,1,1,1,1,1,1,1,1,1,
|
||||||
/* ⊣⊢⥊∾≍↑↓↕«» */ 1,1,0,1,0,0,0,0,0,0,
|
/* ⊣⊢⥊∾≍↑↓↕«» */ 1,1,0,1,0,0,0,0,0,1,
|
||||||
/* ⌽⍉/⍋⍒⊏⊑⊐⊒∊ */ 0,0,1,0,0,1,0,0,0,0,
|
/* ⌽⍉/⍋⍒⊏⊑⊐⊒∊ */ 0,0,1,0,0,1,0,0,0,0,
|
||||||
/* ⍷⊔!˙˜˘¨⌜⁼´ */ 0,0,1,1,1,0,1,1,0,1,
|
/* ⍷⊔!˙˜˘¨⌜⁼´ */ 0,0,1,1,1,0,1,1,0,1,
|
||||||
/* ˝`∘○⊸⟜⌾⊘◶⎉ */ 0,1,1,1,1,1,0,1,0,0,
|
/* ˝`∘○⊸⟜⌾⊘◶⎉ */ 0,1,1,1,1,1,0,1,0,0,
|
||||||
|
|||||||
@ -405,7 +405,10 @@ B shiftb_c1(B t, B x) {
|
|||||||
usz ia = a(x)->ia;
|
usz ia = a(x)->ia;
|
||||||
if (ia==0) return x;
|
if (ia==0) return x;
|
||||||
B xf = getFill(inc(x));
|
B xf = getFill(inc(x));
|
||||||
if (noFill(xf)) thrM("»: Argument didn't have a fill");
|
if (noFill(xf)) {
|
||||||
|
if (PROPER_FILLS) thrM("»: Argument didn't have a fill");
|
||||||
|
else xf = m_f64(0);
|
||||||
|
}
|
||||||
usz csz = arr_csz(x);
|
usz csz = arr_csz(x);
|
||||||
|
|
||||||
MAKE_MUT(r, ia);
|
MAKE_MUT(r, ia);
|
||||||
@ -421,7 +424,6 @@ void shift_check(B w, B x) {
|
|||||||
for (i32 i = 1; i < xr; i++) if (wsh[i+wr-xr] != xsh[i]) thrM("shift: Lengths not matchable");
|
for (i32 i = 1; i < xr; i++) if (wsh[i+wr-xr] != xsh[i]) thrM("shift: Lengths not matchable");
|
||||||
}
|
}
|
||||||
B shiftb_c2(B t, B w, B x) {
|
B shiftb_c2(B t, B w, B x) {
|
||||||
// return c2(rt_shiftb, w, x);
|
|
||||||
if (!isArr(x) || rnk(x)==0) thrM("»: 𝕩 cannot be a scalar");
|
if (!isArr(x) || rnk(x)==0) thrM("»: 𝕩 cannot be a scalar");
|
||||||
if (!isArr(w)) w = m_hunit(w); usz wia = a(w)->ia;
|
if (!isArr(w)) w = m_hunit(w); usz wia = a(w)->ia;
|
||||||
if (!isArr(x)) x = m_hunit(x); usz xia = a(x)->ia;
|
if (!isArr(x)) x = m_hunit(x); usz xia = a(x)->ia;
|
||||||
|
|||||||
@ -35,9 +35,7 @@ B glyph_c1(B t, B x) {
|
|||||||
B fill_c1(B t, B x) {
|
B fill_c1(B t, B x) {
|
||||||
B f = getFill(x);
|
B f = getFill(x);
|
||||||
if (noFill(f)) {
|
if (noFill(f)) {
|
||||||
#if !defined(CATCH_ERRORS) || !EACH_FILLS
|
if (!PROPER_FILLS) return m_f64(0);
|
||||||
return m_f64(0);
|
|
||||||
#endif
|
|
||||||
thrM("No fill found");
|
thrM("No fill found");
|
||||||
}
|
}
|
||||||
return f;
|
return f;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user