Fix SETF semantics at compile-time
[jscl.git] / src / compiler / compiler.lisp
index 5ecc937..cf6bb55 100644 (file)
        (eval (cons 'progn body)))
      ;; `load-toplevel' is given, then just compile the subforms as usual.
      (when (find :load-toplevel situations)
-       (convert `(progn ,@body))))
+       (convert-toplevel `(progn ,@body) *multiple-value-p*)))
     ((find :execute situations)
      (convert `(progn ,@body) *multiple-value-p*))
     (t
     (when expandedp
       (return-from convert-toplevel (convert-toplevel sexp multiple-value-p))))
   ;; Process as toplevel
-  (let ((*toplevel-compilations* nil))
+  (let ((*convert-level* -1)
+        (*toplevel-compilations* nil))
     (cond
       ;; Non-empty toplevel progn
       ((and (consp sexp)