From 883afc9be02cc90e8644870288ad670a02986669 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 27 Apr 2021 19:13:51 -0700 Subject: lib: diagnostic functions moved out of arith.c. * arith.c (invalid_ops, invalid_op): Static functions removed. * unwind.c (invalid_oips, invalid_op): Functions added here, as external functions. * unwind.h (invalid_oips, invalid_op): Declared. --- unwind.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'unwind.c') diff --git a/unwind.c b/unwind.c index 3e88062a..c0516979 100644 --- a/unwind.c +++ b/unwind.c @@ -848,6 +848,17 @@ val type_mismatch(val fmt, ...) abort(); } +NORETURN void invalid_ops(val self, val obj1, val obj2) +{ + uw_throwf(type_error_s, lit("~a: invalid operands ~s ~s"), self, + obj1, obj2, nao); +} + +NORETURN void invalid_op(val self, val obj) +{ + uw_throwf(type_error_s, lit("~a: invalid operand ~s"), self, obj, nao); +} + val uw_defer_warning(val args) { val msg = car(args); -- cgit v1.2.3