summaryrefslogtreecommitdiff
path: root/module/language/tree-il/optimize.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/language/tree-il/optimize.scm')
-rw-r--r--module/language/tree-il/optimize.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/language/tree-il/optimize.scm b/module/language/tree-il/optimize.scm
index 15b8ec0c3..4453df3a3 100644
--- a/module/language/tree-il/optimize.scm
+++ b/module/language/tree-il/optimize.scm
@@ -251,9 +251,10 @@ it should be called before `fix-letrec'."
(args (map (cut loop <> env calls) orig-args))
(args* (map maybe-unconst orig-args args))
(app (make-application src proc args*)))
- ;; If ARGS are constants and this call hasn't already been
- ;; expanded before (to avoid infinite recursion), then
- ;; expand it (todo: emit an infinite recursion warning.)
+ ;; If at least one of ARGS is static (to avoid infinite
+ ;; inlining) and this call hasn't already been expanded
+ ;; before (to avoid infinite recursion), then expand it
+ ;; (todo: emit an infinite recursion warning.)
(if (and (any const*? args)
(not (member (cons proc args) calls)))
(match proc