refactor lisp runtime to use vec_t* instead of ivec_t*

bit nicer to look at, should have about the same painful performance
hit anyway.
This commit is contained in:
2025-08-20 22:43:23 +01:00
parent 6e2db6825d
commit 13142dc7f3
4 changed files with 15 additions and 23 deletions

12
tag.c
View File

@@ -27,9 +27,9 @@ lisp_t *tag_sym(sv_t *str)
return TAG((u64)str, SYM);
}
lisp_t *tag_vec(lvec_t *lvec)
lisp_t *tag_vec(vec_t *vec)
{
return TAG((u64)lvec, VEC);
return TAG((u64)vec, VEC);
}
lisp_t *tag_cons(cons_t *cons)
@@ -69,12 +69,8 @@ cons_t *as_cons(lisp_t *obj)
return (cons_t *)UNTAG(obj, CONS);
}
void *as_vec(lisp_t *obj)
vec_t *as_vec(lisp_t *obj)
{
assert(IS_TAG(obj, VEC));
lvec_t *vec = (lvec_t *)UNTAG(obj, VEC);
if (vec)
return vec->data;
else
return NULL;
return (vec_t *)UNTAG(obj, VEC);
}