Skip to content

Commit

Permalink
Silence 'EVAL-WHEN' warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
oldk1331 committed Nov 17, 2023
1 parent a0520dc commit 9e37205
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 31 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-11-16 Qian Yun <[email protected]>

* src/lisp/fricas-lisp.lisp, src/boot/ptyout.boot,
src/interp/foam_l.lisp: Silence 'EVAL-WHEN' warnings

2023-11-16 Qian Yun <[email protected]>

* src/lisp/fricas-lisp.lisp: Simplify 'ecl-foreign-call',
Expand Down
2 changes: 1 addition & 1 deletion src/boot/compiled/btincl2.clisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

; bStreamNil:=["nullstream"]

(EVAL-WHEN (EVAL LOAD) (SETQ |bStreamNil| (LIST '|nullstream|)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |bStreamNil| (LIST '|nullstream|)))

; shoeFileMap(f, fn)==
; a:=shoeInputFile fn
Expand Down
5 changes: 0 additions & 5 deletions src/boot/compiled/ptyout.clisp
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,6 @@
(SETQ |b| (|shoeCompTran| (LIST 'LAMBDA (LIST '|x|) |b|)))
(|bpPush| (LIST (|shoeEVALANDFILEACTQ| (CADDR |b|)))))))))))

; shoeEVALANDFILEACTQ x== ["EVAL-WHEN", ["EVAL","LOAD"], x]

(DEFUN |shoeEVALANDFILEACTQ| (|x|)
(PROG () (RETURN (LIST 'EVAL-WHEN (LIST 'EVAL 'LOAD) |x|))))

; SoftShoeError(posn,key)==
; shoeConsole CONCAT('"ERROR IN LINE ",STRINGIMAGE lineNo posn)
; shoeConsole lineString posn
Expand Down
43 changes: 23 additions & 20 deletions src/boot/compiled/typrops.clisp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
; ['"'", "QUOTE"], _
; ['"|", "BAR"] ]

(EVAL-WHEN (EVAL LOAD)
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(SETQ |shoeKeyWords|
(LIST (LIST "and" 'AND) (LIST "by" 'BY) (LIST "case" 'CASE)
(LIST "cross" 'CROSS) (LIST "else" 'ELSE) (LIST "for" 'FOR)
Expand All @@ -76,59 +76,62 @@

; shoeKeyTable:=shoeKeyTableCons()

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeKeyTable| (|shoeKeyTableCons|)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeKeyTable| (|shoeKeyTableCons|)))

; shoeSPACE := STR_ELT('" ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeSPACE| (STR_ELT " " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeSPACE| (STR_ELT " " 0)))

; shoeESCAPE := STR_ELT('"__ ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeESCAPE| (STR_ELT "_ " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeESCAPE| (STR_ELT "_ " 0)))

; shoeLispESCAPE := STR_ELT('"! ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeLispESCAPE| (STR_ELT "! " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeLispESCAPE| (STR_ELT "! " 0)))

; shoeSTRING_CHAR := STR_ELT('"_" ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeSTRING_CHAR| (STR_ELT "\" " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(SETQ |shoeSTRING_CHAR| (STR_ELT "\" " 0)))

; shoePLUSCOMMENT := STR_ELT('"+ ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoePLUSCOMMENT| (STR_ELT "+ " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(SETQ |shoePLUSCOMMENT| (STR_ELT "+ " 0)))

; shoeMINUSCOMMENT:= STR_ELT('"- ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeMINUSCOMMENT| (STR_ELT "- " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(SETQ |shoeMINUSCOMMENT| (STR_ELT "- " 0)))

; shoeDOT := STR_ELT('". ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeDOT| (STR_ELT ". " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeDOT| (STR_ELT ". " 0)))

; shoeEXPONENT1 := STR_ELT('"E ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeEXPONENT1| (STR_ELT "E " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeEXPONENT1| (STR_ELT "E " 0)))

; shoeEXPONENT2 := STR_ELT('"e ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeEXPONENT2| (STR_ELT "e " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeEXPONENT2| (STR_ELT "e " 0)))

; shoeCLOSEPAREN := STR_ELT('") ", 0)

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeCLOSEPAREN| (STR_ELT ") " 0)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeCLOSEPAREN| (STR_ELT ") " 0)))

; shoeTAB := 9

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeTAB| 9))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeTAB| 9))

; shoeDict:=shoeDictCons()

(EVAL-WHEN (EVAL LOAD) (SETQ |shoeDict| (|shoeDictCons|)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoeDict| (|shoeDictCons|)))

; shoePun:=shoePunCons()

(EVAL-WHEN (EVAL LOAD) (SETQ |shoePun| (|shoePunCons|)))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |shoePun| (|shoePunCons|)))

; for i in [ _
; "NOT", _
Expand All @@ -138,7 +141,7 @@
; ] _
; repeat SETF (GET(i,'SHOEPRE),'T)

(EVAL-WHEN (EVAL LOAD)
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(PROG ()
(RETURN
((LAMBDA (|bfVar#1| |i|)
Expand Down Expand Up @@ -169,7 +172,7 @@
; ]_
; repeat SETF (GET(CAR i,'SHOEINF),CADR i)

(EVAL-WHEN (EVAL LOAD)
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(PROG ()
(RETURN
((LAMBDA (|bfVar#2| |i|)
Expand Down Expand Up @@ -210,7 +213,7 @@
;
; repeat SETF (GET(CAR i,'SHOETHETA),CDR i)

(EVAL-WHEN (EVAL LOAD)
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(PROG ()
(RETURN
((LAMBDA (|bfVar#3| |i|)
Expand Down Expand Up @@ -285,7 +288,7 @@
; ]
; repeat SETF (GET(CAR i,'SHOERENAME),CDR i)

(EVAL-WHEN (EVAL LOAD)
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(PROG ()
(RETURN
((LAMBDA (|bfVar#4| |i|)
Expand Down Expand Up @@ -357,7 +360,7 @@
; ] _
; repeat SETF (GET(CAR i,'SHOESELFUNCTION),CADR i)

(EVAL-WHEN (EVAL LOAD)
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL)
(PROG ()
(RETURN
((LAMBDA (|bfVar#5| |i|)
Expand Down
2 changes: 1 addition & 1 deletion src/boot/compiled/tytree1.clisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

; $inDefIS := false

(EVAL-WHEN (EVAL LOAD) (SETQ |$inDefIS| NIL))
(EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (SETQ |$inDefIS| NIL))

; bfGenSymbol()==
; $GenVarCounter:=$GenVarCounter+1
Expand Down
2 changes: 0 additions & 2 deletions src/boot/ptyout.boot
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ bpOutItem()==
b:=shoeCompTran ["LAMBDA",["x"],b]
bpPush [shoeEVALANDFILEACTQ CADDR b]
shoeEVALANDFILEACTQ x== ["EVAL-WHEN", ["EVAL","LOAD"], x]
SoftShoeError(posn,key)==
shoeConsole CONCAT('"ERROR IN LINE ",STRINGIMAGE lineNo posn)
shoeConsole lineString posn
Expand Down
4 changes: 2 additions & 2 deletions src/interp/foam_l.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -666,13 +666,13 @@

;;; Boot macros
(defmacro file-exports (lst)
`(eval-when (load eval)
`(eval-when (:execute :load-toplevel)
(when (fboundp 'process-export-entry)
(mapcar #'process-export-entry ,lst))
nil))

(defmacro file-imports (lst)
`(eval-when (load eval)
`(eval-when (:execute :load-toplevel)
(when (fboundp 'process-import-entry)
(mapcar #'process-import-entry ,lst))
nil))
Expand Down
4 changes: 4 additions & 0 deletions src/lisp/fricas-lisp.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,3 +1141,7 @@ with this hack and will try to convince the GCL crowd to fix this.
(defmacro |doInBoottranPackage| (expr)
`(let ((*PACKAGE* (find-package "BOOTTRAN")))
,expr))

(defun |shoeEVALANDFILEACTQ| (expr)
`(eval-when (:execute :load-toplevel)
,expr))

0 comments on commit 9e37205

Please sign in to comment.