diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-19 01:10:00 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-19 01:10:00 +0200 |
commit | 535f62165a525852fbc1c5c001e4726ed4f2cbe0 (patch) | |
tree | e6473b8fe418832262b3b950f91f778d5d7b8fcc | |
parent | 5bbe1a8ebb3e05d03035ab10cb262d050a79f878 (diff) |
LET*, LAMBDA: Fix use of MAYBE-CLOSES-OVER-P to also search references from binding forms.
-rw-r--r-- | sb-eval2.lisp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp index 4aff632..814f05c 100644 --- a/sb-eval2.lisp +++ b/sb-eval2.lisp @@ -443,11 +443,13 @@ (key-num (length keys)) (aux-num (length aux)) (varnum (length argvars)) - (envp (or (> varnum +stack-max+) - (maybe-closes-over-p context `(progn ,@body) argvars))) (default-values (append (mapcar #'lambda-binding-default optional) (mapcar #'lambda-binding-default keys) (mapcar #'lambda-binding-default aux))) + (envp (or (> varnum +stack-max+) + (maybe-closes-over-p context `(progn ,@body) argvars) + (some (lambda (x) (maybe-closes-over-p context x argvars)) + default-values))) (new-context (context-add-env-lexicals context required)) (default-values* (loop for default-value in default-values @@ -789,7 +791,9 @@ (vars (mapcar #'car real-bindings)) (varnum (length vars)) (envp (or (> varnum +stack-max+) - (maybe-closes-over-p context `(progn ,@body) vars))) + (maybe-closes-over-p context `(progn ,@body) vars) + (some (lambda (x) (maybe-closes-over-p context x vars)) + (mapcar #'cdr real-bindings)))) (new-context (context-add-env-lexicals context (list))) lexical-values* |