From: David Vazquez Date: Fri, 25 Jan 2013 16:50:12 +0000 (+0000) Subject: FUNCALL and APPLY can return multiple values X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7e98e17ecc3ec0e34af74dfe88a2dc3fc492206e;p=jscl.git FUNCALL and APPLY can return multiple values --- diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 20a17b1..de2dabb 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -1863,7 +1863,8 @@ (define-raw-builtin funcall (func &rest args) (concat "(" (ls-compile func) ")(" - (join (cons "pv" (mapcar #'ls-compile args)) + (join (cons (if *multiple-value-p* "values" "pv") + (mapcar #'ls-compile args)) ", ") ")")) @@ -1874,7 +1875,8 @@ (last (car (last args)))) (js!selfcall "var f = " (ls-compile func) ";" *newline* - "var args = [" (join (cons "pv" (mapcar #'ls-compile args)) + "var args = [" (join (cons (if *multiple-value-p* "values" "pv") + (mapcar #'ls-compile args)) ", ") "];" *newline* "var tail = (" (ls-compile last) ");" *newline*