sbcl-0.8.14.11:
[sbcl.git] / OPTIMIZATIONS
index 1f8746f..b0c8f47 100644 (file)
@@ -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).