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.
This commit is contained in:
Marius Gerbershagen 2024-03-03 17:35:19 +01:00
parent 9943a7ee21
commit 3b4aeb6e2b

View file

@ -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)))