Commit 643651e3 authored by Kris Katterjohn's avatar Kris Katterjohn
Browse files

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.
parent f5b9430c
......@@ -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()
{
......
......@@ -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)
{
......
......@@ -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)) {
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment