X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fbackq.lisp;h=0e7896d87a414ea0e23ab3b6c25d28c46bbdda5f;hb=cd0975b46e46cf6edcbec977616a475df9768bf9;hp=32cbdcf13be92bddc006d989bcb65a615c098f4a;hpb=c53ec09694206092fd3aa933adade5e5d5b343d2;p=sbcl.git diff --git a/src/code/backq.lisp b/src/code/backq.lisp index 32cbdcf..0e7896d 100644 --- a/src/code/backq.lisp +++ b/src/code/backq.lisp @@ -186,13 +186,10 @@ (cons 'backq-list* thing)))) ((eq flag 'vector) (list 'backq-vector thing)) - (t (cons (cdr - (assoc flag - '((cons . backq-cons) - (list . backq-list) - (append . backq-append) - (nconc . backq-nconc)) - :test #'equal)) + (t (cons (ecase flag + ((list) 'backq-list) + ((append) 'backq-append) + ((nconc) 'backq-nconc)) thing)))) ;;;; magic BACKQ- versions of builtin functions @@ -210,6 +207,7 @@ ;; whether there's still an optimizer bug, and fix it if so, and ;; then make these INLINE. `(defun ,b-name (&rest ,args) + (declare (dynamic-extent ,args)) (apply #',name ,args))))) (def backq-list list) (def backq-list* list*) @@ -244,4 +242,17 @@ (set-macro-character #\, #'comma-macro)) #+sb-xc-host (!backq-cold-init) +;;; The pretty-printer needs to know about our special tokens +(defvar *backq-tokens* + '(backq-comma backq-comma-at backq-comma-dot backq-list + backq-list* backq-append backq-nconc backq-cons backq-vector)) + +;;; Since our backquote is installed on the host lisp, and since +;;; developers make mistakes with backquotes and commas too, let's +;;; ensure that we can report errors rather than get an undefined +;;; function condition on %READER-ERROR. +#+sb-xc-host ; proper definition happens for the target +(defun %reader-error (stream format-string &rest format-args) + (bug "READER-ERROR on stream ~S: ~?" stream format-string format-args)) + (/show0 "done with backq.lisp")