Macro expansion!
This commit is contained in:
@@ -106,6 +106,10 @@ static ALWAYS_INLINE LispVal *LIST_N(int count, ...) {
|
||||
for (LispVal *_tail = (l), *v = XCAR(_tail); !NILP(_tail); \
|
||||
_tail = XCDR(_tail), v = XCAR(_tail))
|
||||
|
||||
#define DOLIST_SAFE(v, l) \
|
||||
for (LispVal *_tail = (l), *v = Fcar(_tail); !NILP(_tail); \
|
||||
_tail = Fcdr(_tail), v = Fcar(_tail))
|
||||
|
||||
#define DOTAILS(v, l) for (LispVal *v = (l); !NILP(v); v = XCDR_SAFE(v))
|
||||
|
||||
DECLARE_SYMBOL(circular_list_error);
|
||||
@@ -117,6 +121,8 @@ intptr_t list_length(LispVal *list);
|
||||
bool list_length_eq(LispVal *list, intptr_t size);
|
||||
|
||||
DECLARE_FUNCTION(cons, (LispVal * car, LispVal *cdr));
|
||||
DECLARE_FUNCTION(car, (LispVal * list));
|
||||
DECLARE_FUNCTION(cdr, (LispVal * list));
|
||||
DECLARE_FUNCTION(length, (LispVal * list));
|
||||
DECLARE_FUNCTION(length_eq, (LispVal * list, LispVal *length));
|
||||
DECLARE_FUNCTION(nreverse, (LispVal * list));
|
||||
@@ -126,6 +132,7 @@ DECLARE_FUNCTION(proper_list_p, (LispVal * obj));
|
||||
DECLARE_FUNCTION(circular_list_p, (LispVal * obj));
|
||||
DECLARE_FUNCTION(dotted_list_p, (LispVal * obj));
|
||||
DECLARE_FUNCTION(list, (LispVal * args));
|
||||
DECLARE_FUNCTION(copy_list, (LispVal * list));
|
||||
LispVal *nth(size_t n, LispVal *list);
|
||||
DECLARE_FUNCTION(nth, (LispVal * n, LispVal *list));
|
||||
static ALWAYS_INLINE void CHECK_LISTP(LispVal *obj) {
|
||||
@@ -141,4 +148,6 @@ DECLARE_FUNCTION(member_if, (LispVal * pred, LispVal *list));
|
||||
DECLARE_FUNCTION(plist_put, (LispVal * plist, LispVal *prop, LispVal *value));
|
||||
DECLARE_FUNCTION(plist_get, (LispVal * plist, LispVal *prop, LispVal *def));
|
||||
|
||||
DECLARE_FUNCTION(assoc, (LispVal * key, LispVal *alist, LispVal *pred));
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user