mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-12 16:00:31 -07:00
Avoid using CONSTANTLY before it is defined
This commit is contained in:
parent
ee13dcd388
commit
8d64c2fbad
1 changed files with 19 additions and 15 deletions
|
|
@ -18,21 +18,6 @@ If TEST evaluates to NIL, then evaluates FORMs and returns all values of the
|
|||
last FORM. If not, simply returns NIL."
|
||||
`(IF (NOT ,pred) (PROGN ,@body)))
|
||||
|
||||
(defmacro defun (&whole whole name vl &body body &aux doc-string)
|
||||
;; Documentation in help.lsp
|
||||
(multiple-value-setq (body doc-string) (remove-documentation body))
|
||||
(let* ((function `#'(ext::lambda-block ,name ,vl ,@body))
|
||||
(global-function `#'(ext::lambda-block ,name ,vl
|
||||
(declare (si::c-global))
|
||||
,@body)))
|
||||
(when *dump-defun-definitions*
|
||||
(print function)
|
||||
(setq function `(si::bc-disassemble ,function)))
|
||||
`(progn
|
||||
,(ext:register-with-pde whole `(si::fset ',name ,global-function))
|
||||
,@(si::expand-set-documentation name 'function doc-string)
|
||||
',name)))
|
||||
|
||||
(defmacro defmacro (&whole whole name vl &body body &aux doc-string)
|
||||
;; Documentation in help.lsp
|
||||
(multiple-value-bind (function pprint doc-string)
|
||||
|
|
@ -101,6 +86,25 @@ VARIABLE doc and can be retrieved by (DOCUMENTATION 'SYMBOL 'VARIABLE)."
|
|||
(si::register-global ',var)))
|
||||
',var))
|
||||
|
||||
(defparameter *defun-inline-hook* nil)
|
||||
|
||||
(defmacro defun (&whole whole name vl &body body &environment env &aux doc-string)
|
||||
;; Documentation in help.lsp
|
||||
(multiple-value-setq (body doc-string) (remove-documentation body))
|
||||
(let* ((function `#'(ext::lambda-block ,name ,vl ,@body))
|
||||
(global-function `#'(ext::lambda-block ,name ,vl
|
||||
(declare (si::c-global))
|
||||
,@body)))
|
||||
(when *dump-defun-definitions*
|
||||
(print function)
|
||||
(setq function `(si::bc-disassemble ,function)))
|
||||
`(progn
|
||||
,(ext:register-with-pde whole `(si::fset ',name ,global-function))
|
||||
,@(si::expand-set-documentation name 'function doc-string)
|
||||
,(let ((hook *defun-inline-hook*))
|
||||
(and hook (funcall hook name global-function env)))
|
||||
',name)))
|
||||
|
||||
;;;
|
||||
;;; This is a no-op unless the compiler is installed
|
||||
;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue