Move FEillegal_variable_name to error.d and use it where appropriate

This was local to compiler.d, but it should also be used in stacks.d.

This is used in place of the error message introduced in commit 9ff142.
This commit is contained in:
Kris Katterjohn 2017-06-28 14:21:28 -05:00
parent f5b9430c6c
commit 643651e320
4 changed files with 8 additions and 8 deletions

View file

@ -130,7 +130,6 @@ static int c_listA(cl_env_ptr env, cl_object args, int push);
static cl_object ecl_make_lambda(cl_env_ptr env, cl_object name, cl_object lambda);
static void FEillegal_variable_name(cl_object) ecl_attr_noreturn;
static void FEill_formed_input(void) ecl_attr_noreturn;
/* -------------------- SAFE LIST HANDLING -------------------- */
@ -343,12 +342,6 @@ assert_type_symbol(cl_object v)
FEprogram_error_noreturn("Expected a symbol, found ~S.", 1, v);
}
static void
FEillegal_variable_name(cl_object v)
{
FEprogram_error_noreturn("Not a valid variable name ~S.", 1, v);
}
static void
FEill_formed_input()
{

View file

@ -434,6 +434,12 @@ FEinvalid_variable(const char *s, cl_object obj)
FEerror(s, 1, obj);
}
void
FEillegal_variable_name(cl_object v)
{
FEprogram_error("Not a valid variable name ~S.", 1, v);
}
void
FEassignment_to_constant(cl_object v)
{

View file

@ -199,7 +199,7 @@ ecl_progv(cl_env_ptr env, cl_object vars0, cl_object values0)
} else {
cl_object var = ECL_CONS_CAR(vars);
if (!ECL_SYMBOLP(var))
FEerror("Not a valid variable name ~S.", 1, var);
FEillegal_variable_name(var);
if (ecl_symbol_type(var) & ecl_stp_constant)
FEbinding_a_constant(var);
if (Null(values)) {

View file

@ -577,6 +577,7 @@ extern ECL_API void FEwrong_index(cl_object function, cl_object a, int which, cl
extern ECL_API void FEunbound_variable(cl_object sym) ecl_attr_noreturn;
extern ECL_API void FEinvalid_macro_call(cl_object obj) ecl_attr_noreturn;
extern ECL_API void FEinvalid_variable(const char *s, cl_object obj) ecl_attr_noreturn;
extern ECL_API void FEillegal_variable_name(cl_object) ecl_attr_noreturn;
extern ECL_API void FEassignment_to_constant(cl_object v) ecl_attr_noreturn;
extern ECL_API void FEbinding_a_constant(cl_object v) ecl_attr_noreturn;
extern ECL_API void FEundefined_function(cl_object fname) ecl_attr_noreturn;