From ad95cebbdd2193ea97e1419932190c65d2eec1e4 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Fri, 12 Oct 1990 01:17:29 +0000 Subject: [PATCH] Changed the comment in the IR1-ATTRIBUTES definition to reflect a new conception of what UNSAFE means. Also, clarified that functions which are undefined on constant arguments (e.g. DELETE) are not FOLDABLE, even if they have no predictable side-effect. --- compiler/knownfun.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/knownfun.lisp b/compiler/knownfun.lisp index df9b9b5e3..760ba6528 100644 --- a/compiler/knownfun.lisp +++ b/compiler/knownfun.lisp @@ -33,7 +33,9 @@ ;; that may be functions. call ;; - ;; May incorporate arguments in the result or somehow pass them upward. + ;; May incorporate function or number arguments into the result or somehow + ;; pass them upward. Note that this applies to any argument that *might* be + ;; a function or number, not just the arguments that always are. unsafe ;; ;; May fail to return during correct execution. Errors are O.K. @@ -45,7 +47,11 @@ any ;; ;; May be constant-folded. The function has no side effects, but may be - ;; affected by side effects on the arguments. e.g. SVREF, MAPC. + ;; affected by side effects on the arguments. e.g. SVREF, MAPC. Functions + ;; that side-effect their arguments are not considered to be foldable. + ;; Although it would be "legal" to constant fold them (since it "is an error" + ;; to modify a constant), we choose not to mark theses functions as foldable + ;; in this database. foldable ;; ;; May be eliminated if value is unused. The function has no side effects -- GitLab