1.0.19.9: elide runtime calls to %COERCE-CALLABLE-TO-FUN in more cases
[sbcl.git] / OPTIMIZATIONS
index bc02982..acbd0d0 100644 (file)
@@ -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.)