X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1-translators.lisp;h=c4289ed08d058be3f73c6aa1ef962673f7396c7a;hb=c75cf4e142aaf9a72433ea6db778d8111a0b1c83;hp=83b4ab49b63c2d0e17b4a602b820cefc2eef092b;hpb=a40acb7f6d4b6beb4251c77bc00f73967dcddc77;p=sbcl.git diff --git a/src/compiler/ir1-translators.lisp b/src/compiler/ir1-translators.lisp index 83b4ab4..c4289ed 100644 --- a/src/compiler/ir1-translators.lisp +++ b/src/compiler/ir1-translators.lisp @@ -575,7 +575,7 @@ be a lambda expression." ;;; directly to %FUNCALL, instead of waiting around for type ;;; inference. (define-source-transform funcall (function &rest args) - (if (and (consp function) (eq (car function) 'function)) + (if (and (consp function) (member (car function) '(function lambda))) `(%funcall ,function ,@args) (let ((name (constant-global-fun-name function))) (if name @@ -585,6 +585,11 @@ be a lambda expression." (deftransform %coerce-callable-to-fun ((thing) (function) *) "optimize away possible call to FDEFINITION at runtime" 'thing) + +(define-source-transform %coerce-callable-to-fun (thing) + (if (and (consp thing) (member (car thing) '(function lambda))) + thing + (values nil t))) ;;;; LET and LET* ;;;;