mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
FLET and LABELS functions may now be inlined when they are declared so.
This commit is contained in:
parent
480d1dedfd
commit
d4f3d0d330
3 changed files with 10 additions and 3 deletions
|
|
@ -82,8 +82,10 @@
|
|||
(when fun
|
||||
(when (> (length args) si::c-arguments-limit)
|
||||
(return-from c1call-local (unoptimized-long-call `#',fname args)))
|
||||
(let ((lambda (fun-lambda-expression fun)))
|
||||
(when (and lambda (inline-possible fname))
|
||||
(return-from c1call-local (c1expr `(funcall #',lambda ,@args)))))
|
||||
(let* ((forms (c1args* args))
|
||||
(lambda-form (fun-lambda fun))
|
||||
(return-type (or (get-local-return-type fun) 'T))
|
||||
(arg-types (get-local-arg-types fun)))
|
||||
;; Add type information to the arguments.
|
||||
|
|
|
|||
|
|
@ -77,8 +77,12 @@ The function thus belongs to the type of functions that ecl_make_cfun accepts."
|
|||
|
||||
(defun c1compile-function (lambda-list-and-body &key (fun (make-fun))
|
||||
(name (fun-name fun)) (CB/LB 'CB))
|
||||
(setf (fun-name fun) name
|
||||
(fun-parent fun) *current-function*)
|
||||
(let ((lambda (if name
|
||||
`(ext:lambda-block ,name ,@lambda-list-and-body)
|
||||
`(lambda ,@lambda-list-and-body))))
|
||||
(setf (fun-name fun) name
|
||||
(fun-lambda-expression fun) lambda
|
||||
(fun-parent fun) *current-function*))
|
||||
(when *current-function*
|
||||
(push fun (fun-child-funs *current-function*)))
|
||||
(let* ((*current-function* fun)
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@
|
|||
lambda-list ;;; List of (requireds optionals rest-var keywords-p
|
||||
;;; keywords allow-other-keys-p)
|
||||
lambda ;;; Lambda c1-form for this function.
|
||||
lambda-expression ;;; LAMBDA or LAMBDA-BLOCK expression
|
||||
(minarg 0) ;;; Min. number arguments that the function receives.
|
||||
(maxarg call-arguments-limit)
|
||||
;;; Max. number arguments that the function receives.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue