mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-21 03:51:47 -08:00
bytecmp: tagbody: ensure ECL_NIL->ECL_NIL_SYMBOL conversion
Issue comes from the fact that list and symbol types are not disjoint. Fixes #475. My personal opinion (to put some rambling in a commit message) is that having NIL being so many things is a blatant mistake and shouldn't be picked up for Common Lisp (though many programs would probably break and it wouldn't be so Common then).
This commit is contained in:
parent
95dd38abd3
commit
f87d50f053
1 changed files with 9 additions and 0 deletions
|
|
@ -1473,6 +1473,9 @@ asm_function(cl_env_ptr env, cl_object function, int flags) {
|
|||
static int
|
||||
c_go(cl_env_ptr env, cl_object args, int flags) {
|
||||
cl_object tag = pop(&args);
|
||||
if (Null(tag)) {
|
||||
tag = ECL_NIL_SYMBOL;
|
||||
}
|
||||
cl_object info = c_tag_ref(env, tag, @':tag');
|
||||
if (Null(info))
|
||||
FEprogram_error("GO: Unknown tag ~S.", 1, tag);
|
||||
|
|
@ -2060,6 +2063,9 @@ c_tagbody(cl_env_ptr env, cl_object args, int flags)
|
|||
/* count the tags */
|
||||
for (nt = 0, body = args; !Null(body); ) {
|
||||
label = pop(&body);
|
||||
if (Null(label)) {
|
||||
label = ECL_NIL_SYMBOL;
|
||||
}
|
||||
item_type = ecl_t_of(label);
|
||||
if (item_type == t_symbol || item_type == t_fixnum ||
|
||||
item_type == t_bignum) {
|
||||
|
|
@ -2080,6 +2086,9 @@ c_tagbody(cl_env_ptr env, cl_object args, int flags)
|
|||
|
||||
for (body = args; !Null(body); ) {
|
||||
label = pop(&body);
|
||||
if (Null(label)) {
|
||||
label = ECL_NIL_SYMBOL;
|
||||
}
|
||||
item_type = ecl_t_of(label);
|
||||
if (item_type == t_symbol || item_type == t_fixnum ||
|
||||
item_type == t_bignum) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue