The extensions:maybe-inline declaration is a CMU Common Lisp extension. It is similar to inline, but indicates that inline expansion may sometimes be desirable, rather than saying that inline expansion should almost always be done. When used in a global declaration, extensions:maybe-inline causes the expansion for the named functions to be recorded, but the functions aren't actually inline expanded unless space is 0 or the function is eventually (perhaps locally) declared inline.
Use of the extensions:maybe-inline declaration followed by thedefun is preferable to the standard idiom of:
;;; Any calls to myfun here are not inline expanded.
(defun somefun () (declare (inline myfun)) ;; ;; Calls to myfun here are inline expanded. ...)
The extensions:maybe-inline declaration is used like this:
;;; Any calls to myfun here are not inline expanded.
(defun somefun () (declare (inline myfun)) ;; ;; Calls to myfun here are inline expanded. ...)
(defun someotherfun () (declare (optimize (space 0))) ;; ;; Calls to myfun here are expanded semi-inline. ...)
When the goal is merely to control whether inline expansion is done by default, it is preferable to use extensions:maybe-inline rather than notinline. The notinline declaration should be reserved for those special occasions when a function may be redefined at run-time, so the compiler must be told that the obvious definition of a function is not necessarily the one that will be in effect at the time of the call.