From 6385653081ba808f7d6de4c0442ac5bae3392552 Mon Sep 17 00:00:00 2001 From: Robert Dodier Date: Sun, 30 Jun 2024 22:42:04 -0700 Subject: [PATCH] share/tensor/itensor.lisp: make X and D shared lexical variables for the functions which use them ($COVDIFF and COVDIFF). batch("rtest_itensor.mac", test) reports no errors. Tracing COVDIFF after loading itensor shows that it is called several times in rtest_itensor. This commit quiets a message from ECL about declaring X and D as NOT SPECIAL. --- share/tensor/itensor.lisp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/share/tensor/itensor.lisp b/share/tensor/itensor.lisp index f0ab19db8..bfcea2d4b 100644 --- a/share/tensor/itensor.lisp +++ b/share/tensor/itensor.lisp @@ -389,15 +389,13 @@ (let (derivlist) (ideriv args))) -(declare-top (special x d)) - -(let (temp) +(let (temp x d) (defmfun $covdiff nargs (prog - (x e d i) + (e i) (and (< nargs 2) (merror "COVDIFF must have at least 2 args")) - (setq temp nil) + (setq temp nil d nil) (setq i 2 e (arg 1)) again (setq x (arg i) e (covdiff e) i (1+ i)) (and (> i nargs) (return e)) @@ -549,7 +547,7 @@ ) ) -(declare-top (unspecial r d)) +(declare-top (unspecial r)) (defun vecdiff (v i j d) ;Add frame bracket contribution when iframe_flag:true (cond -- 2.11.4.GIT