Skip to content
Snippets Groups Projects
Commit ad95cebb authored by ram's avatar ram
Browse files

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.
parent c06d1328
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
;; that may be functions. ;; that may be functions.
call 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 unsafe
;; ;;
;; May fail to return during correct execution. Errors are O.K. ;; May fail to return during correct execution. Errors are O.K.
...@@ -45,7 +47,11 @@ ...@@ -45,7 +47,11 @@
any any
;; ;;
;; May be constant-folded. The function has no side effects, but may be ;; 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 foldable
;; ;;
;; May be eliminated if value is unused. The function has no side effects ;; May be eliminated if value is unused. The function has no side effects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment