mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-26 22:43:13 -08:00
Reuse code for long function calls
This commit is contained in:
parent
ca67d37ab4
commit
7e9d1950fa
1 changed files with 3 additions and 11 deletions
|
|
@ -71,13 +71,8 @@
|
|||
(defun c1call-local (fname args)
|
||||
(let ((fun (local-function-ref fname)))
|
||||
(when fun
|
||||
(let ((l (length args)))
|
||||
(when (> l si::c-arguments-limit)
|
||||
(return-from c1call-local
|
||||
(let ((frame (gensym)))
|
||||
(c1expr `(with-stack ,frame
|
||||
,@(loop for i in args collect `(stack-push ,i))
|
||||
(si::apply-from-stack-frame ,frame #',fname)))))))
|
||||
(when (> (length args) si::c-arguments-limit)
|
||||
(return-from c1call-local (unoptimized-long-call `#',fname args)))
|
||||
(let* ((forms (c1args* args))
|
||||
(lambda-form (fun-lambda fun))
|
||||
(return-type (or (get-local-return-type fun) 'T))
|
||||
|
|
@ -100,10 +95,7 @@
|
|||
(let ((l (length args))
|
||||
forms)
|
||||
(cond ((> l si::c-arguments-limit)
|
||||
(c1expr (let ((frame (gensym)))
|
||||
`(with-stack ,frame
|
||||
,@(loop for i in args collect `(stack-push ,frame ,i))
|
||||
(si::apply-from-stack-frame ,frame #',fname)))))
|
||||
(unoptimized-long-call `#',fname args))
|
||||
((maybe-optimize-structure-access fname args))
|
||||
#+clos
|
||||
((maybe-optimize-generic-function fname args))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue