(ls-compile ,form)))
(define-compilation progn (&rest body)
- (js!selfcall (ls-compile-block body t)))
+ (if (null (cdr body))
+ (ls-compile (car body) *multiple-value-p*)
+ (js!selfcall (ls-compile-block body t))))
(defun special-variable-p (x)
(and (claimp x 'variable 'special) t))
"return args;" *newline*))
+
;;; A little backquote implementation without optimizations of any
;;; kind for ecmalisp.
(defun backquote-expand-1 (form)
(defun ls-compile-block (sexps &optional return-last-p)
(if return-last-p
(concat (ls-compile-block (butlast sexps))
- "return "(ls-compile (car (last sexps)) *multiple-value-p*) ";")
+ "return " (ls-compile (car (last sexps)) *multiple-value-p*) ";")
(join-trailing
(remove-if #'null-or-empty-p (mapcar #'ls-compile sexps))
(concat ";" *newline*))))