master: sb-eval: check eval-when syntax

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  fc9c2223bc49b7b6eec4945769d096fe43330df7 (commit)
      from  1a0e4afd51c0d6e5c608ddae7fd154e2b5045619 (commit)

- Log -----------------------------------------------------------------
commit fc9c2223bc49b7b6eec4945769d096fe43330df7
Author: Stas Boukarev <[email protected]>
Date:   Wed Apr 22 23:10:34 2026 +0300

    sb-eval: check eval-when syntax
---
 src/code/full-eval.lisp       | 16 +++++++++++-----
 src/compiler/arm64/float.lisp |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/code/full-eval.lisp b/src/code/full-eval.lisp
index f8fbcc62b..18b39ba1f 100644
--- a/src/code/full-eval.lisp
+++ b/src/code/full-eval.lisp
@@ -850,11 +850,17 @@
       (t (nth-value 0 (get-function name env))))))
 
 (defun eval-eval-when (body env)
-  (program-destructuring-bind ((&rest situation) &body body) body
-    ;; FIXME: check that SITUATION only contains valid situations
-    (if (or (member :execute situation)
-            (member 'eval situation))
-        (eval-progn body env))))
+  (program-destructuring-bind ((&rest situations) &body body) body
+    (let (execute)
+      (loop for situation in situations
+            do (case situation
+                 ((:execute eval)
+                  (setf execute t))
+                 ((:compile-toplevel compile :load-toplevel load))
+                 (t
+                  (ip-error "bad EVAL-WHEN situation list: ~S" situations))))
+      (if execute
+          (eval-progn body env)))))
 
 (defun eval-quote (body env)
   (declare (ignore env))
diff --git a/src/compiler/arm64/float.lisp b/src/compiler/arm64/float.lisp
index acbb7aaa0..7d20ce1f0 100644
--- a/src/compiler/arm64/float.lisp
+++ b/src/compiler/arm64/float.lisp
@@ -704,7 +704,7 @@
       (signed-stack
        (sc-case res
          (single-reg
-          (loadw res (current-nfp-tn vop) (tn-offset bits)))
+          (loadw res (current-nfp-tn vop) (tn-offset res)))
          (single-stack
           (unless (location= bits res)
             (loadw temp (current-nfp-tn vop) (tn-offset bits))

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.