diff --git a/src/c/compiler.d b/src/c/compiler.d index 552f3a916..9e2ab8220 100644 --- a/src/c/compiler.d +++ b/src/c/compiler.d @@ -322,6 +322,8 @@ static compiler_record database[] = { {@'list', c_list, 1}, {@'list*', c_listA, 1}, {@'endp', c_endp, 1}, + {@'si::cons-car', c_car, 1}, + {@'si::cons-cdr', c_cdr, 1}, {NULL, NULL, 1} }; diff --git a/src/cmp/sysfun.lsp b/src/cmp/sysfun.lsp index 37ba3b5bf..be4a65249 100644 --- a/src/cmp/sysfun.lsp +++ b/src/cmp/sysfun.lsp @@ -275,14 +275,14 @@ (def-inline car :unsafe (cons) t "ECL_CONS_CAR(#0)") (def-inline car :unsafe (t) t "CAR(#0)") -(def-inline cons-car :always (t) t "CAR(#0)") -(def-inline cons-car :unsafe (t) t "ECL_CONS_CAR(#0)") +(def-inline si::cons-car :always (t) t "CAR(#0)") +(def-inline si::cons-car :unsafe (t) t "ECL_CONS_CAR(#0)") (def-inline cdr :unsafe (cons) t "ECL_CONS_CDR(#0)") (def-inline cdr :unsafe (t) t "CDR(#0)") -(def-inline cons-cdr :always (t) t "CDR(#0)") -(def-inline cons-cdr :unsafe (t) t "ECL_CONS_CDR(#0)") +(def-inline si::cons-cdr :always (t) t "CDR(#0)") +(def-inline si::cons-cdr :unsafe (t) t "ECL_CONS_CDR(#0)") (def-inline caar :unsafe (t) t "CAAR(#0)") diff --git a/src/lsp/export.lsp b/src/lsp/export.lsp index 344cdda0c..52e31e6c8 100644 --- a/src/lsp/export.lsp +++ b/src/lsp/export.lsp @@ -75,7 +75,7 @@ (si::while %dolist-var (setq ,var (first %dolist-var)) ,@body - (setq %dolist-var (rest %dolist-var))) + (setq %dolist-var (cons-cdr %dolist-var))) ,(when exit `(setq ,var nil)) ,@exit))))))) (si::fset 'dolist f t)) diff --git a/src/lsp/seqmacros.lsp b/src/lsp/seqmacros.lsp index 02c1bc4f4..814c0f976 100644 --- a/src/lsp/seqmacros.lsp +++ b/src/lsp/seqmacros.lsp @@ -147,9 +147,3 @@ ,%iterators))) ,@(and output (list output))) ,@body))) - -(defmacro cons-car (x) - `(car (the cons ,x))) - -(defmacro cons-cdr (x) - `(cdr (the cons ,x)))