1.0.29.54.rc5: fix load-time-value regressions
[sbcl.git] / OPTIMIZATIONS
index bc02982..581291c 100644 (file)
@@ -173,15 +173,11 @@ NULL-TN directly.
       (declare (dynamic-extent l))
       (mapc #'print l))))
 
-Result of MAKE is not stack allocated, which means that
-stack-allocation of structures is impossible.
+Result of MAKE is not stack allocated.
 --------------------------------------------------------------------------------
 #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.
@@ -213,6 +209,10 @@ enough to eliminate something like ':initial-element 0'.  Such an optimization
 is valid if the vector is being allocated in the heap, but not if it is being
 allocated on the stack.  You could remove this optimization, but that makes
 the heap-allocated case somewhat slower...)
+
+To do this, extend ALLOCATE-VECTOR with ALLOW-JUNK argument, and when
+stack allocating don't zero if it is true -- and probably ALLOW-JUNK iff
+the vector is a specialized one (cannot have pointers.)
 --------------------------------------------------------------------------------
 #28
 a. Accessing raw slots in structure instances is more inefficient than
@@ -390,3 +390,18 @@ currently compiles to code that ensures the TLS index at runtime, which
 is both a decently large chunk of code and unnecessary, as we could ensure
 the TLS index at load-time as well.
 
+--------------------------------------------------------------------------------
+#40
+
+When FTYPE is declared -- to say (function (t t t t t) t), and
+function has a compiler-macro,
+
+  (apply #'foo 'x1 x2 'x3 more)
+
+can be transformed into
+
+  (apply (lambda (x2 x4 x5) (foo 'x1 x2 'x3 x4 x5)) x2 more)
+
+which allows compiler-macro-expansion for FOO. (Only constant
+arguments can be moved inside the new lambda -- otherwise evaluation
+order is altered.)