1 ;;;; bootstrapping fundamental machinery (e.g. DEFUN, DEFCONSTANT,
2 ;;;; DEFVAR) from special forms and primitive functions
4 ;;;; KLUDGE: The bootstrapping aspect of this is now obsolete. It was
5 ;;;; originally intended that this file file would be loaded into a
6 ;;;; Lisp image which had Common Lisp primitives defined, and DEFMACRO
7 ;;;; defined, and little else. Since then that approach has been
8 ;;;; dropped and this file has been modified somewhat to make it work
9 ;;;; more cleanly when used to predefine macros at
10 ;;;; build-the-cross-compiler time.
12 ;;;; This software is part of the SBCL system. See the README file for
13 ;;;; more information.
15 ;;;; This software is derived from the CMU CL system, which was
16 ;;;; written at Carnegie Mellon University and released into the
17 ;;;; public domain. The software is in the public domain and is
18 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
19 ;;;; files for more information.
21 (in-package "SB!IMPL")
26 (defmacro-mundanely in-package (string-designator)
27 (let ((string (string string-designator)))
28 `(eval-when (:compile-toplevel :load-toplevel :execute)
29 (setq *package* (find-undeleted-package-or-lose ,string)))))
31 ;;;; MULTIPLE-VALUE-FOO
33 (defun list-of-symbols-p (x)
37 (defmacro-mundanely multiple-value-bind (vars value-form &body body)
38 (if (list-of-symbols-p vars)
39 ;; It's unclear why it would be important to special-case the LENGTH=1 case
40 ;; at this level, but the CMU CL code did it, so.. -- WHN 19990411
41 (if (= (length vars) 1)
42 `(let ((,(car vars) ,value-form))
44 (let ((ignore (sb!xc:gensym)))
45 `(multiple-value-call #'(lambda (&optional ,@(mapcar #'list vars)
47 (declare (ignore ,ignore))
50 (error "Vars is not a list of symbols: ~S" vars)))
52 (defmacro-mundanely multiple-value-setq (vars value-form)
53 (unless (list-of-symbols-p vars)
54 (error "Vars is not a list of symbols: ~S" vars))
55 ;; MULTIPLE-VALUE-SETQ is required to always return just the primary
56 ;; value of the value-from, even if there are no vars. (SETF VALUES)
57 ;; in turn is required to return as many values as there are
58 ;; value-places, hence this:
60 `(values (setf (values ,@vars) ,value-form))
61 `(values ,value-form)))
63 (defmacro-mundanely multiple-value-list (value-form)
64 `(multiple-value-call #'list ,value-form))
66 ;;;; various conditional constructs
68 ;;; COND defined in terms of IF
69 (defmacro-mundanely cond (&rest clauses)
72 (let ((clause (first clauses))
73 (more (rest clauses)))
75 (error "COND clause is not a list: ~S" clause)
76 (let ((test (first clause))
77 (forms (rest clause)))
79 (let ((n-result (gensym)))
80 `(let ((,n-result ,test))
85 ;; THE to perserve non-toplevelness for FOO in
87 `(the t (progn ,@forms))
90 ,(when more `(cond ,@more))))))))))
92 (defmacro-mundanely when (test &body forms)
94 "If the first argument is true, the rest of the forms are
95 evaluated as a PROGN."
96 `(if ,test (progn ,@forms) nil))
98 (defmacro-mundanely unless (test &body forms)
100 "If the first argument is not true, the rest of the forms are
101 evaluated as a PROGN."
102 `(if ,test nil (progn ,@forms)))
104 (defmacro-mundanely and (&rest forms)
105 (cond ((endp forms) t)
107 ;; Preserve non-toplevelness of the form!
108 `(the t ,(first forms)))
114 (defmacro-mundanely or (&rest forms)
115 (cond ((endp forms) nil)
117 ;; Preserve non-toplevelness of the form!
118 `(the t ,(first forms)))
120 (let ((n-result (gensym)))
121 `(let ((,n-result ,(first forms)))
124 (or ,@(rest forms))))))))
126 ;;;; various sequencing constructs
128 (flet ((prog-expansion-from-let (varlist body-decls let)
129 (multiple-value-bind (body decls)
130 (parse-body body-decls :doc-string-allowed nil)
134 (tagbody ,@body))))))
135 (defmacro-mundanely prog (varlist &body body-decls)
136 (prog-expansion-from-let varlist body-decls 'let))
137 (defmacro-mundanely prog* (varlist &body body-decls)
138 (prog-expansion-from-let varlist body-decls 'let*)))
140 (defmacro-mundanely prog1 (result &body body)
141 (let ((n-result (gensym)))
142 `(let ((,n-result ,result))
146 (defmacro-mundanely prog2 (form1 result &body body)
147 `(prog1 (progn ,form1 ,result) ,@body))
151 ;;; Should we save the inline expansion of the function named NAME?
152 (defun inline-fun-name-p (name)
154 ;; the normal reason for saving the inline expansion
155 (info :function :inlinep name)
156 ;; another reason for saving the inline expansion: If the
157 ;; ANSI-recommended idiom
158 ;; (DECLAIM (INLINE FOO))
160 ;; (DECLAIM (NOTINLINE FOO))
161 ;; has been used, and then we later do another
163 ;; without a preceding
164 ;; (DECLAIM (INLINE FOO))
165 ;; what should we do with the old inline expansion when we see the
166 ;; new DEFUN? Overwriting it with the new definition seems like
167 ;; the only unsurprising choice.
168 (info :function :inline-expansion-designator name)))
170 (defmacro-mundanely defun (&environment env name args &body body)
171 "Define a function at top level."
173 (unless (symbol-package (fun-name-block-name name))
174 (warn "DEFUN of uninterned function name ~S (tricky for GENESIS)" name))
175 (multiple-value-bind (forms decls doc) (parse-body body)
176 (let* (;; stuff shared between LAMBDA and INLINE-LAMBDA and NAMED-LAMBDA
179 (block ,(fun-name-block-name name)
181 (lambda `(lambda ,@lambda-guts))
183 (named-lambda `(named-lambda ,name ,@lambda-guts))
185 (when (inline-fun-name-p name)
186 ;; we want to attempt to inline, so complain if we can't
187 (or (sb!c:maybe-inline-syntactic-closure lambda env)
190 #-sb-xc-host sb!c:maybe-compiler-notify
191 "lexical environment too hairy, can't inline DEFUN ~S"
195 ;; In cross-compilation of toplevel DEFUNs, we arrange for
196 ;; the LAMBDA to be statically linked by GENESIS.
198 ;; It may seem strangely inconsistent not to use NAMED-LAMBDA
199 ;; here instead of LAMBDA. The reason is historical:
200 ;; COLD-FSET was written before NAMED-LAMBDA, and has special
201 ;; logic of its own to notify the compiler about NAME.
203 (cold-fset ,name ,lambda)
205 (eval-when (:compile-toplevel)
206 (sb!c:%compiler-defun ',name ',inline-lambda t))
207 (eval-when (:load-toplevel :execute)
209 ;; In normal compilation (not for cold load) this is
210 ;; where the compiled LAMBDA first appears. In
211 ;; cross-compilation, we manipulate the
212 ;; previously-statically-linked LAMBDA here.
213 #-sb-xc-host ,named-lambda
214 #+sb-xc-host (fdefinition ',name)
217 (sb!c:source-location)))))))
220 (defun %defun (name def doc inline-lambda source-location)
221 (declare (type function def))
222 (declare (type (or null simple-string) doc))
223 (aver (legal-fun-name-p name)) ; should've been checked by DEFMACRO DEFUN
224 (sb!c:%compiler-defun name inline-lambda nil)
226 (/show0 "redefining NAME in %DEFUN")
227 (style-warn 'sb!kernel::redefinition-with-defun :name name
228 :old (fdefinition name) :new def
229 :new-location source-location))
230 (setf (sb!xc:fdefinition name) def)
232 (sb!c::note-name-defined name :function)
234 ;; FIXME: I want to do this here (and fix bug 137), but until the
235 ;; breathtaking CMU CL function name architecture is converted into
236 ;; something sane, (1) doing so doesn't really fix the bug, and
237 ;; (2) doing probably isn't even really safe.
238 #+nil (setf (%fun-name def) name)
241 (setf (fdocumentation name 'function) doc)
243 (when (typep def 'sb!eval:interpreted-function)
244 (setf (sb!eval:interpreted-function-documentation def)
248 ;;;; DEFVAR and DEFPARAMETER
250 (defmacro-mundanely defvar (var &optional (val nil valp) (doc nil docp))
252 "Define a global variable at top level. Declare the variable
253 SPECIAL and, optionally, initialize it. If the variable already has a
254 value, the old value is not clobbered. The third argument is an optional
255 documentation string for the variable."
257 (eval-when (:compile-toplevel)
258 (%compiler-defvar ',var))
259 (eval-when (:load-toplevel :execute)
260 (%defvar ',var (unless (boundp ',var) ,val)
262 (sb!c:source-location)))))
264 (defmacro-mundanely defparameter (var val &optional (doc nil docp))
266 "Define a parameter that is not normally changed by the program,
267 but that may be changed without causing an error. Declare the
268 variable special and sets its value to VAL, overwriting any
269 previous value. The third argument is an optional documentation
270 string for the parameter."
272 (eval-when (:compile-toplevel)
273 (%compiler-defvar ',var))
274 (eval-when (:load-toplevel :execute)
275 (%defparameter ',var ,val ,doc ',docp (sb!c:source-location)))))
277 (defun %compiler-defvar (var)
278 (sb!xc:proclaim `(special ,var)))
281 (defun %defvar (var val valp doc docp source-location)
282 (%compiler-defvar var)
287 (setf (fdocumentation var 'variable) doc))
288 (sb!c:with-source-location (source-location)
289 (setf (info :source-location :variable var) source-location))
293 (defun %defparameter (var val doc docp source-location)
294 (%compiler-defvar var)
297 (setf (fdocumentation var 'variable) doc))
298 (sb!c:with-source-location (source-location)
299 (setf (info :source-location :variable var) source-location))
302 ;;;; iteration constructs
304 ;;; (These macros are defined in terms of a function FROB-DO-BODY which
305 ;;; is also used by SB!INT:DO-ANONYMOUS. Since these macros should not
306 ;;; be loaded on the cross-compilation host, but SB!INT:DO-ANONYMOUS
307 ;;; and FROB-DO-BODY should be, these macros can't conveniently be in
308 ;;; the same file as FROB-DO-BODY.)
309 (defmacro-mundanely do (varlist endlist &body body)
311 "DO ({(Var [Init] [Step])}*) (Test Exit-Form*) Declaration* Form*
312 Iteration construct. Each Var is initialized in parallel to the value of the
313 specified Init form. On subsequent iterations, the Vars are assigned the
314 value of the Step form (if any) in parallel. The Test is evaluated before
315 each evaluation of the body Forms. When the Test is true, the Exit-Forms
316 are evaluated as a PROGN, with the result being the value of the DO. A block
317 named NIL is established around the entire expansion, allowing RETURN to be
318 used as an alternate exit mechanism."
319 (frob-do-body varlist endlist body 'let 'psetq 'do nil))
320 (defmacro-mundanely do* (varlist endlist &body body)
322 "DO* ({(Var [Init] [Step])}*) (Test Exit-Form*) Declaration* Form*
323 Iteration construct. Each Var is initialized sequentially (like LET*) to the
324 value of the specified Init form. On subsequent iterations, the Vars are
325 sequentially assigned the value of the Step form (if any). The Test is
326 evaluated before each evaluation of the body Forms. When the Test is true,
327 the Exit-Forms are evaluated as a PROGN, with the result being the value
328 of the DO. A block named NIL is established around the entire expansion,
329 allowing RETURN to be used as an laternate exit mechanism."
330 (frob-do-body varlist endlist body 'let* 'setq 'do* nil))
332 ;;; DOTIMES and DOLIST could be defined more concisely using
333 ;;; destructuring macro lambda lists or DESTRUCTURING-BIND, but then
334 ;;; it'd be tricky to use them before those things were defined.
335 ;;; They're used enough times before destructuring mechanisms are
336 ;;; defined that it looks as though it's worth just implementing them
337 ;;; ASAP, at the cost of being unable to use the standard
338 ;;; destructuring mechanisms.
339 (defmacro-mundanely dotimes ((var count &optional (result nil)) &body body)
340 (cond ((numberp count)
341 `(do ((,var 0 (1+ ,var)))
342 ((>= ,var ,count) ,result)
343 (declare (type unsigned-byte ,var))
346 (let ((c (gensym "COUNT")))
347 `(do ((,var 0 (1+ ,var))
349 ((>= ,var ,c) ,result)
350 (declare (type unsigned-byte ,var)
354 (defmacro-mundanely dolist ((var list &optional (result nil)) &body body &environment env)
355 ;; We repeatedly bind the var instead of setting it so that we never
356 ;; have to give the var an arbitrary value such as NIL (which might
357 ;; conflict with a declaration). If there is a result form, we
358 ;; introduce a gratuitous binding of the variable to NIL without the
359 ;; declarations, then evaluate the result form in that
360 ;; environment. We spuriously reference the gratuitous variable,
361 ;; since we don't want to use IGNORABLE on what might be a special
363 (multiple-value-bind (forms decls) (parse-body body :doc-string-allowed nil)
364 (let* ((n-list (gensym "N-LIST"))
365 (start (gensym "START"))
366 (tmp (gensym "TMP")))
367 (multiple-value-bind (clist members clist-ok)
368 (cond ((sb!xc:constantp list env)
369 (let ((value (constant-form-value list env)))
370 (multiple-value-bind (all dot) (list-members value)
372 ;; Full warning is too much: the user may terminate the loop
373 ;; early enough. Contents are still right, though.
374 (style-warn "Dotted list ~S in DOLIST." value))
375 (values value all t))))
376 ((and (consp list) (eq 'list (car list))
377 (every (lambda (arg) (sb!xc:constantp arg env)) (cdr list)))
378 (let ((values (mapcar (lambda (arg) (constant-form-value arg env)) (cdr list))))
379 (values values values t)))
381 (values nil nil nil)))
383 (let ((,n-list ,(if clist-ok (list 'quote clist) list)))
386 (unless (endp ,n-list)
387 (let* (,@(if clist-ok
388 `((,tmp (truly-the (member ,@members) (car ,n-list)))
390 `((,var (car ,n-list)))))
392 (setq ,n-list (cdr ,n-list))
397 ;; Filter out TYPE declarations (VAR gets bound to NIL,
398 ;; and might have a conflicting type declaration) and
399 ;; IGNORE (VAR might be ignored in the loop body, but
400 ;; it's used in the result form).
401 ,@(filter-dolist-declarations decls)
406 ;;;; conditions, handlers, restarts
408 ;;; KLUDGE: we PROCLAIM these special here so that we can use restart
409 ;;; macros in the compiler before the DEFVARs are compiled.
411 '(special *handler-clusters* *restart-clusters* *condition-restarts*))
413 (defmacro-mundanely with-condition-restarts
414 (condition-form restarts-form &body body)
416 "Evaluates the BODY in a dynamic environment where the restarts in the list
417 RESTARTS-FORM are associated with the condition returned by CONDITION-FORM.
418 This allows FIND-RESTART, etc., to recognize restarts that are not related
419 to the error currently being debugged. See also RESTART-CASE."
420 (let ((n-cond (gensym)))
421 `(let ((*condition-restarts*
422 (cons (let ((,n-cond ,condition-form))
424 (append ,restarts-form
425 (cdr (assoc ,n-cond *condition-restarts*)))))
426 *condition-restarts*)))
429 (defmacro-mundanely restart-bind (bindings &body forms)
431 "Executes forms in a dynamic context where the given restart bindings are
432 in effect. Users probably want to use RESTART-CASE. When clauses contain
433 the same restart name, FIND-RESTART will find the first such clause."
434 `(let ((*restart-clusters*
436 ,@(mapcar (lambda (binding)
437 (unless (or (car binding)
438 (member :report-function
441 (warn "Unnamed restart does not have a ~
444 `(make-restart :name ',(car binding)
445 :function ,(cadr binding)
448 *restart-clusters*)))
451 ;;; Wrap the RESTART-CASE expression in a WITH-CONDITION-RESTARTS if
452 ;;; appropriate. Gross, but it's what the book seems to say...
453 (defun munge-restart-case-expression (expression env)
454 (let ((exp (sb!xc:macroexpand expression env)))
456 (let* ((name (car exp))
457 (args (if (eq name 'cerror) (cddr exp) (cdr exp))))
458 (if (member name '(signal error cerror warn))
459 (once-only ((n-cond `(coerce-to-condition
463 (warn 'simple-warning)
464 (signal 'simple-condition)
467 `(with-condition-restarts
469 (car *restart-clusters*)
470 ,(if (eq name 'cerror)
471 `(cerror ,(second exp) ,n-cond)
476 ;;; FIXME: I did a fair amount of rearrangement of this code in order to
477 ;;; get WITH-KEYWORD-PAIRS to work cleanly. This code should be tested..
478 (defmacro-mundanely restart-case (expression &body clauses &environment env)
481 {(case-name arg-list {keyword value}* body)}*)
482 The form is evaluated in a dynamic context where the clauses have special
483 meanings as points to which control may be transferred (see INVOKE-RESTART).
484 When clauses contain the same case-name, FIND-RESTART will find the first
485 such clause. If Expression is a call to SIGNAL, ERROR, CERROR or WARN (or
486 macroexpands into such) then the signalled condition will be associated with
488 (flet ((transform-keywords (&key report interactive test)
491 (setq result (list* (if (stringp report)
493 (write-string ,report stream))
498 (setq result (list* `#',interactive
499 :interactive-function
502 (setq result (list* `#',test :test-function result)))
504 (parse-keyword-pairs (list keys)
505 (do ((l list (cddr l))
506 (k '() (list* (cadr l) (car l) k)))
507 ((or (null l) (not (member (car l) keys)))
508 (values (nreverse k) l)))))
509 (let ((block-tag (sb!xc:gensym "BLOCK"))
512 (macrolet (;; KLUDGE: This started as an old DEFMACRO
513 ;; WITH-KEYWORD-PAIRS general utility, which was used
514 ;; only in this one place in the code. It was translated
515 ;; literally into this MACROLET in order to avoid some
516 ;; cross-compilation bootstrap problems. It would almost
517 ;; certainly be clearer, and it would certainly be more
518 ;; concise, to do a more idiomatic translation, merging
519 ;; this with the TRANSFORM-KEYWORDS logic above.
521 (with-keyword-pairs ((names expression) &body forms)
522 (let ((temp (member '&rest names)))
523 (unless (= (length temp) 2)
524 (error "&REST keyword is ~:[missing~;misplaced~]."
526 (let* ((key-vars (ldiff names temp))
527 (keywords (mapcar #'keywordicate key-vars))
529 (rest-var (cadr temp)))
530 `(multiple-value-bind (,key-var ,rest-var)
531 (parse-keyword-pairs ,expression ',keywords)
532 (let ,(mapcar (lambda (var keyword)
533 `(,var (getf ,key-var
537 (mapcar (lambda (clause)
538 (with-keyword-pairs ((report interactive test
541 (list (car clause) ;name=0
542 (sb!xc:gensym "TAG") ;tag=1
543 (transform-keywords :report report ;keywords=2
544 :interactive interactive
550 (let ((,temp-var nil))
553 ,(mapcar (lambda (datum)
554 (let ((name (nth 0 datum))
556 (keys (nth 2 datum)))
557 `(,name #'(lambda (&rest temp)
558 (setq ,temp-var temp)
562 (return-from ,block-tag
563 ,(munge-restart-case-expression expression env)))
564 ,@(mapcan (lambda (datum)
565 (let ((tag (nth 1 datum))
567 (body (nth 4 datum)))
569 `(return-from ,block-tag
570 (apply (lambda ,bvl ,@body)
574 (defmacro-mundanely with-simple-restart ((restart-name format-string
575 &rest format-arguments)
578 "(WITH-SIMPLE-RESTART (restart-name format-string format-arguments)
580 If restart-name is not invoked, then all values returned by forms are
581 returned. If control is transferred to this restart, it immediately
582 returns the values NIL and T."
584 ;; If there's just one body form, then don't use PROGN. This allows
585 ;; RESTART-CASE to "see" calls to ERROR, etc.
586 ,(if (= (length forms) 1) (car forms) `(progn ,@forms))
588 :report (lambda (stream)
589 (format stream ,format-string ,@format-arguments))
592 (defmacro-mundanely %handler-bind (bindings form)
593 (let ((member-if (member-if (lambda (x)
594 (not (proper-list-of-length-p x 2)))
597 (error "ill-formed handler binding: ~S" (first member-if))))
598 (let* ((local-funs nil)
599 (mapped-bindings (mapcar (lambda (binding)
600 (destructuring-bind (type handler) binding
601 (let ((lambda-form handler))
602 (if (and (consp handler)
603 (or (eq 'lambda (car handler))
604 (and (eq 'function (car handler))
605 (consp (cdr handler))
606 (let ((x (second handler)))
609 (setf lambda-form x))))))
610 (let ((name (sb!xc:gensym "LAMBDA")))
611 (push `(,name ,@(cdr lambda-form)) local-funs)
612 (list type `(function ,name)))
615 `(dx-flet (,@(reverse local-funs))
616 (let ((*handler-clusters*
617 (cons (list ,@(mapcar (lambda (x) `(cons ',(car x) ,(cadr x)))
619 *handler-clusters*)))
620 (declare (truly-dynamic-extent *handler-clusters*))
623 (defmacro-mundanely handler-bind (bindings &body forms)
625 "(HANDLER-BIND ( {(type handler)}* ) body)
627 Executes body in a dynamic context where the given handler bindings are in
628 effect. Each handler must take the condition being signalled as an argument.
629 The bindings are searched first to last in the event of a signalled
631 `(%handler-bind ,bindings
632 #!-x86 (progn ,@forms)
633 ;; Need to catch FP errors here!
634 #!+x86 (multiple-value-prog1 (progn ,@forms) (float-wait))))
636 (defmacro-mundanely handler-case (form &rest cases)
637 "(HANDLER-CASE form { (type ([var]) body) }* )
639 Execute FORM in a context with handlers established for the condition types. A
640 peculiar property allows type to be :NO-ERROR. If such a clause occurs, and
641 form returns normally, all its values are passed to this clause as if by
642 MULTIPLE-VALUE-CALL. The :NO-ERROR clause accepts more than one var
644 (let ((no-error-clause (assoc ':no-error cases)))
646 (let ((normal-return (make-symbol "normal-return"))
647 (error-return (make-symbol "error-return")))
648 `(block ,error-return
649 (multiple-value-call (lambda ,@(cdr no-error-clause))
650 (block ,normal-return
651 (return-from ,error-return
652 (handler-case (return-from ,normal-return ,form)
653 ,@(remove no-error-clause cases)))))))
654 (let* ((local-funs nil)
656 (mapcar (lambda (case)
657 (with-unique-names (tag fun)
658 (destructuring-bind (type ll &body body) case
659 (push `(,fun ,ll ,@body) local-funs)
660 (list tag type ll fun))))
662 (with-unique-names (block var form-fun)
663 `(dx-flet ((,form-fun ()
665 ;; Need to catch FP errors here!
666 #!+x86 (multiple-value-prog1 ,form (float-wait)))
667 ,@(reverse local-funs))
668 (declare (optimize (sb!c::check-tag-existence 0)))
671 (declare (ignorable ,var))
674 ,(mapcar (lambda (annotated-case)
675 (destructuring-bind (tag type ll fun-name) annotated-case
676 (declare (ignore fun-name))
681 '(declare (ignore temp)))
684 (return-from ,block (,form-fun)))
686 (lambda (annotated-case)
687 (destructuring-bind (tag type ll fun-name) annotated-case
688 (declare (ignore type))
694 annotated-cases))))))))))
698 (defmacro-mundanely return (&optional (value nil))
699 `(return-from nil ,value))
701 (defmacro-mundanely psetq (&rest pairs)
704 Set the variables to the values, like SETQ, except that assignments
705 happen in parallel, i.e. no assignments take place until all the
706 forms have been evaluated."
707 ;; Given the possibility of symbol-macros, we delegate to PSETF
708 ;; which knows how to deal with them, after checking that syntax is
709 ;; compatible with PSETQ.
710 (do ((pair pairs (cddr pair)))
711 ((endp pair) `(psetf ,@pairs))
712 (unless (symbolp (car pair))
713 (error 'simple-program-error
714 :format-control "variable ~S in PSETQ is not a SYMBOL"
715 :format-arguments (list (car pair))))))
717 (defmacro-mundanely lambda (&whole whole args &body body)
718 (declare (ignore args body))
721 (defmacro-mundanely named-lambda (&whole whole name args &body body)
722 (declare (ignore name args body))
725 (defmacro-mundanely lambda-with-lexenv (&whole whole
726 declarations macros symbol-macros
728 (declare (ignore declarations macros symbol-macros body))
731 ;;; this eliminates a whole bundle of unknown function STYLE-WARNINGs
732 ;;; when cross-compiling. It's not critical for behaviour, but is
733 ;;; aesthetically pleasing, except inasmuch as there's this list of
734 ;;; magic functions here. -- CSR, 2003-04-01
736 (sb!xc:proclaim '(ftype (function * *)
737 ;; functions appearing in fundamental defining
746 sb!c::%define-symbol-macro
748 sb!c::%define-compiler-macro
750 sb!kernel::%compiler-defstruct
751 sb!kernel::%compiler-define-condition
752 sb!kernel::%defstruct
753 sb!kernel::%define-condition
754 ;; miscellaneous functions commonly appearing
755 ;; as a result of macro expansions or compiler
757 sb!int:find-undeleted-package-or-lose ; IN-PACKAGE
758 sb!kernel::arg-count-error ; PARSE-DEFMACRO