From fc17cd58e6bd60aa129bb879e3cf7452a944384b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 5 Jul 2013 17:37:28 +0200 Subject: [PATCH] Migrate compile-funcall --- src/compiler.lisp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index a0879b9..40f3924 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1370,29 +1370,26 @@ (values form nil)))) (defun compile-funcall (function args) - (let* ((values-funcs (if *multiple-value-p* "values" "pv")) - (arglist `(code "(" ,@(interleave (list* values-funcs - (integer-to-string (length args)) - (mapcar #'ls-compile args)) - ", ") - ")"))) + (let* ((arglist (list* (if *multiple-value-p* '|values| '|pv|) + (length args) + (mapcar #'ls-compile args)))) (unless (or (symbolp function) (and (consp function) (member (car function) '(lambda oget)))) (error "Bad function designator `~S'" function)) (cond ((translate-function function) - `(code ,(translate-function function) ,arglist)) + `(call ,(make-symbol (translate-function function)) ,@arglist)) ((and (symbolp function) #+jscl (eq (symbol-package function) (find-package "COMMON-LISP")) #-jscl t) - `(code ,(ls-compile `',function) ".fvalue" ,arglist)) + `(call (get ,(ls-compile `',function) "fvalue") ,@arglist)) #+jscl((symbolp function) - `(code ,(ls-compile `#',function) ,arglist)) + `(call ,(ls-compile `#',function) ,@arglist)) ((and (consp function) (eq (car function) 'lambda)) - `(code ,(ls-compile `#',function) ,arglist)) + `(call ,(ls-compile `#',function) ,@arglist)) ((and (consp function) (eq (car function) 'oget)) - `(code ,(ls-compile function) ,arglist)) + `(call ,(ls-compile function) ,@arglist)) (t (error "Bad function descriptor"))))) -- 1.7.10.4