diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-19 15:15:57 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-19 15:15:57 +0200 |
commit | 3de8e964c89fdaf2789b608363ccc852480acaf5 (patch) | |
tree | 5e29a81ca5fdc342d13aa2763231eea2ff4e7b44 | |
parent | c6f219ba96b4342ebb1e65ebf7b34b48a749660c (diff) |
LAMBDA: Properly create new context in accordance with the new environment.
-rw-r--r-- | sb-eval2.lisp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp index 57ab5ea..dc128d9 100644 --- a/sb-eval2.lisp +++ b/sb-eval2.lisp @@ -196,6 +196,10 @@ for v in vars collect (make-env-lexical v i)))) new-context)) +(defun make-lexical-context (context) + (let ((new-context (make-context context))) + (setf (context-env-hop new-context) t) + new-context)) (defun context-add-env-lexical! (context var) (with-slots (lexicals) context @@ -454,7 +458,7 @@ (maybe-closes-over-p context `(progn ,@body) argvars) (some (lambda (x) (maybe-closes-over-p context x argvars)) default-values))) - (new-context (make-context context)) + (new-context (make-lexical-context context)) (varspecs (list)) (default-values* (flet ((register-var (var) |