X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=OPTIMIZATIONS;h=b0c8f47fe343d475fa73a9392c955dd31969ca9c;hb=8902b8b6bd2e9285749dd39d313b33b6c69c5213;hp=1f8746f14400565d7246281ee0710e2f5721de78;hpb=b1c7011c1f5d50b9821c07db75b1d5c3c6881062;p=sbcl.git diff --git a/OPTIMIZATIONS b/OPTIMIZATIONS index 1f8746f..b0c8f47 100644 --- a/OPTIMIZATIONS +++ b/OPTIMIZATIONS @@ -190,3 +190,44 @@ through TYPEP UNBOXED-ARRAY, within the compiler itself. rather than either constant-folding or manipulating NIL-VALUE or NULL-TN directly. -------------------------------------------------------------------------------- +#19 + (let ((dx (if (foo) + (list x) + (list y z)))) + (declare (dynamic-extent dx)) + ...) + +DX is not allocated on stack. +-------------------------------------------------------------------------------- +#20 +(defun-with-dx foo (x) + (flet ((make (x) + (let ((l (list nil nil))) + (setf (first l) x) + (setf (second l) (1- x)) + l))) + (let ((l (make x))) + (declare (dynamic-extent l)) + (mapc #'print l)))) + +Result of MAKE is not stack allocated, which means that +stack-allocation of structures is impossible. +-------------------------------------------------------------------------------- +#21 +(defun-with-dx foo () + (let ((dx (list (list 1 2) (list 3 4) + (declare (dynamic-extent dx)) + ...))))) + +External list in DX is allocated on stack, but internal are not. +-------------------------------------------------------------------------------- +#22 +IR2 does not perform unused code flushing. +-------------------------------------------------------------------------------- +#23 +Python does not know that &REST lists are LISTs (and cannot derive it). +-------------------------------------------------------------------------------- +#24 +a. Iterations on &REST lists, returning them as VALUES could be + rewritten with &MORE vectors. +b. Implement local unknown-values mv-call (useful for fast type checking).