From: David Vázquez Date: Fri, 5 Jul 2013 15:37:28 +0000 (+0200) Subject: Migrate compile-funcall X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=fc17cd58e6bd60aa129bb879e3cf7452a944384b;p=jscl.git Migrate compile-funcall --- 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")))))