From 3b4aeb6e2bdcd851f3dffc1b73fd0949d5986fc5 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 3 Mar 2024 17:35:19 +0100 Subject: [PATCH] cmp: don't create an unnecessary function object for local calls This prevents further optimizations down the line. By processing `(function ,fname) with C1EXPR we treat the function as having been referenced via a function object. Among other things this will prevent the function from being a lexical closure as the compiler doesn't know that this function object is unused. --- src/cmp/cmppass1-call.lsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmp/cmppass1-call.lsp b/src/cmp/cmppass1-call.lsp index 6d02ed80f..a52157cfc 100644 --- a/src/cmp/cmppass1-call.lsp +++ b/src/cmp/cmppass1-call.lsp @@ -235,7 +235,7 @@ (make-c1form* 'FCALL :sp-change t ; conservative estimate :side-effects t ; conservative estimate - :args (c1expr `(function ,fname)) (c1args* args) fun :local)) + :args nil (c1args* args) fun :local)) (defun c1call-global (fname args) (let ((forms (c1args* args)))