From 3362d46854e202ba375168c31664cb541c76ea2d Mon Sep 17 00:00:00 2001 From: tankorsmash Date: Wed, 5 Feb 2025 20:02:44 -0500 Subject: [PATCH] add best effort guesses for error messages in core/stuff and opt/comp.c --- src/core/stuff.c | 22 +++++++++++----------- src/opt/comp.c | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/core/stuff.c b/src/core/stuff.c index 2f9877dd..5bd4fdca 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -41,11 +41,11 @@ NORETURN NOINLINE void fatal(char* s) { } NOINLINE B c1F(B f, B x) { dec(x); - if (isMd(f)) thrM("Calling a modifier"); + if (isMd(f)) thrM("_Mod𝕩: Calling a modifier"); return inc(VALIDATE(f)); } NOINLINE B c2F(B f, B w, B x) { dec(w); dec(x); - if (isMd(f)) thrM("Calling a modifier"); + if (isMd(f)) thrM("𝕨_Mod_𝕩: Calling a modifier"); return inc(VALIDATE(f)); } NOINLINE void value_freeF(Value* x) { value_free(x); } @@ -54,15 +54,15 @@ void noop_visit(Value* x) { } #if HEAP_VERIFY void arr_visit(Value* x) { VISIT_SHAPE(x); } #endif -NOINLINE B c1_bad(B f, B x) { thrM("This function can't be called monadically"); } -NOINLINE B c2_bad(B f, B w, B x) { thrM("This function can't be called dyadically"); } -NOINLINE B m1c1_bad(Md1D* d, B x) { thrM("This 1-modifier can't be called monadically"); } -NOINLINE B m1c2_bad(Md1D* d, B w, B x) { thrM("This 1-modifier can't be called dyadically"); } -NOINLINE B m2c1_bad(Md2D* d, B x) { thrM("This 2-modifier can't be called monadically"); } -NOINLINE B m2c2_bad(Md2D* d, B w, B x) { thrM("This 2-modifier can't be called dyadically"); } +NOINLINE B c1_bad(B f, B x) { thrM("Fn𝕩: This function can't be called monadically"); } +NOINLINE B c2_bad(B f, B w, B x) { thrM("𝕨Fn𝕩: This function can't be called dyadically"); } +NOINLINE B m1c1_bad(Md1D* d, B x) { thrM("_Mod𝕩: This 1-modifier can't be called monadically"); } +NOINLINE B m1c2_bad(Md1D* d, B w, B x) { thrM("𝕨_Mod𝕩: This 1-modifier can't be called dyadically"); } +NOINLINE B m2c1_bad(Md2D* d, B x) { thrM("_Mod_𝕩: This 2-modifier can't be called monadically"); } +NOINLINE B m2c2_bad(Md2D* d, B w, B x) { thrM("𝕨_Mod_𝕩: This 2-modifier can't be called dyadically"); } -NOINLINE B md_c1(B t, B x) { thrM("Cannot call a modifier"); } -NOINLINE B md_c2(B t, B w, B x) { thrM("Cannot call a modifier"); } +NOINLINE B md_c1(B t, B x) { thrM("_Mod𝕩: Cannot call a modifier"); } +NOINLINE B md_c2(B t, B w, B x) { thrM("𝕨_Mod_𝕩: Cannot call a modifier"); } NOINLINE B arr_c1(B t, B x) { dec(x); return inc(t); } NOINLINE B arr_c2(B t, B w, B x) { dec(w); dec(x); return inc(t); } @@ -452,7 +452,7 @@ B bqn_merge(B x, u32 type) { if (isAtm(xf)) { dec(xf); return x; } i32 xfr = RNK(xf); Arr* r = emptyWithFill(getFillR(xf)); - if (xr+xfr > UR_MAX) thrM(">: Result rank too large"); + if (xr+xfr > UR_MAX) thrM(">𝕩: Result rank too large"); usz* rsh = arr_shAlloc(r, xr+xfr); if (rsh) { shcpy (rsh , SH(x), xr); diff --git a/src/opt/comp.c b/src/opt/comp.c index becc224a..c519e415 100644 --- a/src/opt/comp.c +++ b/src/opt/comp.c @@ -502,4 +502,4 @@ B nativeComp_c2(B t, B w, B x) { void nativeCompiler_init() { native_comp = m_nfn(registerNFn(m_c8vec_0("(native compiler)"), c1_bad, nativeComp_c2), bi_N); gc_add(native_comp); -} \ No newline at end of file +}