From 3de8e964c89fdaf2789b608363ccc852480acaf5 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 19 Jul 2013 15:15:57 +0200 Subject: LAMBDA: Properly create new context in accordance with the new environment. --- sb-eval2.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3