diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-20 15:37:36 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-20 15:41:44 +0200 |
commit | a9f4e5770862f85d058491b59dd9a0527800a613 (patch) | |
tree | 7d3f69d50bbdf39a7f58b55bba97a021fc4b5cfb | |
parent | 0aa8d4e1f131afbe0b9708354b8645695844e719 (diff) |
Simplify.
-rw-r--r-- | sb-eval2.lisp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp index a08b16d..60b145f 100644 --- a/sb-eval2.lisp +++ b/sb-eval2.lisp @@ -510,11 +510,10 @@ (body* (prepare-progn body new-context)) (unbound (gensym))) (setq varspecs (nreverse varspecs)) - (let (*new-env*) - (declare (special *new-env*)) + (let () (flet - ((handle-arguments (&rest args) - (declare (dynamic-extent args)) + ((handle-arguments (new-env &rest args) + ;;(declare (dynamic-extent args)) ;; All this ELT and LENGTH stuff is not as ;; inefficient as it looks. SBCL transforms ;; &rest into &more here. @@ -545,7 +544,7 @@ (let ((varspec (pop my-varspecs))) (if (eq varspec :lexical) (setf - (environment-value *new-env* 0 (incff vari)) + (environment-value new-env 0 (incff vari)) value) (let ((var (cdr varspec))) (assert (eq :special @@ -576,7 +575,7 @@ (go keys)) (let ((val* (pop my-default-values*))) (push-args (funcall (the eval-closure val*) - *new-env*) + new-env) nil)) (go missing-optionals) keys @@ -627,7 +626,7 @@ (go rest)) (let ((val* (pop my-default-values*))) (push-args (funcall (the eval-closure val*) - *new-env*))) + new-env))) (go aux) rest (assert (null my-default-values*) @@ -644,15 +643,13 @@ (lambda (env) (lambda (&rest args) (declare (dynamic-extent args)) - (let ((*new-env* (make-environment env varnum))) - (declare (special *new-env*)) - (apply #'handle-arguments args)))) + (let ((new-env (make-environment env varnum))) + (apply #'handle-arguments new-env args)))) (lambda (env) (lambda (&rest args) (declare (dynamic-extent args)) - (with-dynamic-extent-environment (*new-env* env varnum) - (declare (special *new-env*)) - (apply #'handle-arguments args)))))))))))) + (with-dynamic-extent-environment (new-env env varnum) + (apply #'handle-arguments new-env args)))))))))))) (defun context->native-environment (context) (let ((functions |