summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/txr/stdlib/compiler.tl3
-rw-r--r--share/txr/stdlib/vm-param.tl1
2 files changed, 4 insertions, 0 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index 0fdf77ba..2ddfeac5 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -819,6 +819,9 @@
(need-frame (or (plusp pars.nfix) pars.rest))
(nenv (if need-frame (new env up env co me) env))
lexsyms fvars specials need-dframe)
+ (when (> pars.nfix %max-lambda-fixed-args%)
+ (compile-warning form "~s arguments in a lambda (max is ~s)"
+ pars.nfix %max-lambda-fixed-args%))
(flet ((spec-sub (sym)
(cond
((special-var-p sym)
diff --git a/share/txr/stdlib/vm-param.tl b/share/txr/stdlib/vm-param.tl
index 93ec2363..498c144d 100644
--- a/share/txr/stdlib/vm-param.tl
+++ b/share/txr/stdlib/vm-param.tl
@@ -34,3 +34,4 @@
(defsymacro %max-sm-lev-idx% (macro-time (pred %sm-lev-size%)))
(defsymacro %max-sm-lev% 15)
(defsymacro %sm-lev-bits% 6)
+(defsymacro %max-lambda-fixed-args% 127)