Skip to content
Snippets Groups Projects
Commit 5ac014db authored by gerd's avatar gerd
Browse files

Dynamic-extent closures for x86. Use boot15.lisp for

	bootstrapping.

	(defun prn (fn)
	  (print (funcall fn)))

	(defun foo (x)
	  (flet ((bar () x))
	    (declare (dynamic-extent #'bar))
	    (prn #'bar)))

	=> The closure for BAR is allocated from the stack

	* src/compiler/node.lisp (lexenv): Add slot dynamic-extent.

	* src/compiler/ir1util.lisp (make-lexenv): Add keyword
	arg for dynamic-extent.

	* src/code/defstruct.lisp (%redefine-defstruct)
	[#+bootstrap-dynamic-extent]: Definition that corresponds
	to to the clobber-it restart.

	* src/compiler/ir1tran.lisp (process-dynamic-extent-declaration):
	Rewritten.

	* src/compiler/x86/alloc.lisp (make-closure): Add constant
	arg dynamic-extent, and use it for allocation.

	* src/compiler/ir2tran.lisp (ir2-convert-closure) [#+x86]:
	Pass dynamic-extent to the make-closure vop.
parent 289982f2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment