mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-27 06:51:44 -08:00
Avoid recursive invocation of C1EXPR by allowing the C1 processors to act like macros, returning new forms to be processed. Remove also the CATCH for compiler errors, since we now rely on conditions for signal handling.
This commit is contained in:
parent
24c0b37d9a
commit
c2e2171dc0
15 changed files with 128 additions and 129 deletions
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
(defun unoptimized-long-call (fun arguments)
|
||||
(let ((frame (gensym)))
|
||||
(c1expr `(with-stack ,frame
|
||||
,@(loop for i in arguments collect `(stack-push ,frame ,i))
|
||||
(si::apply-from-stack-frame ,frame ,fun)))))
|
||||
`(with-stack ,frame
|
||||
,@(loop for i in arguments collect `(stack-push ,frame ,i))
|
||||
(si::apply-from-stack-frame ,frame ,fun))))
|
||||
|
||||
(defun unoptimized-funcall (fun arguments)
|
||||
(let ((l (length arguments)))
|
||||
|
|
@ -36,12 +36,12 @@
|
|||
(cond ;; (FUNCALL (LAMBDA ...) ...)
|
||||
((and (consp fun)
|
||||
(eq (first fun) 'LAMBDA))
|
||||
(c1expr (optimize-funcall/apply-lambda (cdr fun) arguments nil)))
|
||||
(optimize-funcall/apply-lambda (cdr fun) arguments nil))
|
||||
;; (FUNCALL (EXT::LAMBDA-BLOCK ...) ...)
|
||||
((and (consp fun)
|
||||
(eq (first fun) 'EXT::LAMBDA-BLOCK))
|
||||
(setf fun (macroexpand-1 fun))
|
||||
(c1expr (optimize-funcall/apply-lambda (cdr fun) arguments nil)))
|
||||
(optimize-funcall/apply-lambda (cdr fun) arguments nil))
|
||||
;; (FUNCALL atomic-expression ...)
|
||||
((atom fun)
|
||||
(unoptimized-funcall fun arguments))
|
||||
|
|
@ -60,11 +60,11 @@
|
|||
(c1call fun arguments nil))
|
||||
;; (FUNCALL #'(LAMBDA ...) ...)
|
||||
((and (consp fun) (eq (first fun) 'LAMBDA))
|
||||
(c1expr (optimize-funcall/apply-lambda (rest fun) arguments nil)))
|
||||
(optimize-funcall/apply-lambda (rest fun) arguments nil))
|
||||
;; (FUNCALL #'(EXT::LAMBDA-BLOCK ...) ...)
|
||||
((and (consp fun) (eq (first fun) 'EXT::LAMBDA-BLOCK))
|
||||
(setf fun (macroexpand-1 fun))
|
||||
(c1expr (optimize-funcall/apply-lambda (rest fun) arguments nil)))
|
||||
(optimize-funcall/apply-lambda (rest fun) arguments nil))
|
||||
(t
|
||||
(cmperr "Malformed function name: ~A" fun)))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue