(declare dynamic-extent)
will optimize these calls so that they allocate in the stack, in all cases:
&rest
lists
flet
functions and
labels
functions
(cons
x
y
)
(list ...)
(list* ...)
(copy-list
x
)
(make-list
x
)
(vector ...)
(declare dynamic-extent)
will also optimize these specific calls:
(make-array
n
)
(make-array
n
:initial-element
x
)
without any other arguments
(make-foo ...)
where
make-foo
is an inline structure constructor. The default constructor is declared inline automatically when none of the
defstruct
slot initforms are calls to functions.
(make-string
n
:element-type 'base-char)