diff --git a/TODO b/TODO index 47e9c11d..215307e1 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ Working TODO list: - - Cyc_sum, etc: can we pass the actual arg(s) to the error function? - - make *trace-level* a command-line parameter, and by default do not emit scheme code transformations in comments - Reduction in size of generated code is there anything we can do? diff --git a/runtime.h b/runtime.h index 8a884f67..b4af8a90 100644 --- a/runtime.h +++ b/runtime.h @@ -797,7 +797,10 @@ static common_type FUNC_OP(object x, object y) { \ } else if (tx == double_tag && ty == double_tag) { \ s.double_t.value = ((double_type *)x)->value OP ((double_type *)y)->value; \ } else { \ - Cyc_rt_raise_msg("Bad argument type\n"); \ + make_string(s, "Bad argument type"); \ + make_cons(c1, y, nil); \ + make_cons(c0, &s, &c1); \ + Cyc_rt_raise(&c0); \ } \ return s; \ } \ @@ -839,7 +842,10 @@ static common_type Cyc_num_op_va_list(int argc, common_type (fn_op(object, objec sum.double_t.tag = double_tag; sum.double_t.value = ((double_type *)n)->value; } else { - Cyc_rt_raise_msg("Bad argument type"); + make_string(s, "Bad argument type"); + make_cons(c1, n, nil); + make_cons(c0, &s, &c1); + Cyc_rt_raise(&c0); } for (i = 1; i < argc; i++) { @@ -851,7 +857,7 @@ static common_type Cyc_num_op_va_list(int argc, common_type (fn_op(object, objec sum.double_t.tag = double_tag; sum.double_t.value = ((double_type *) &result)->value; } else { - Cyc_rt_raise_msg("Invalid tag in Cyc_num_op_va_list"); + Cyc_rt_raise_msg("Internal error, invalid tag in Cyc_num_op_va_list"); } }