summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-19 01:25:39 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2013-07-19 01:25:39 +0200
commit9555b086f94fb9c7ef53bdb8f386c9ac54c092d9 (patch)
tree418761660270d0498a0149ac7115662500d0681a
parent535f62165a525852fbc1c5c001e4726ed4f2cbe0 (diff)
Add special handling for MACROLET, SYMBOL-MACROLET, FLET, LABELS.
-rw-r--r--sb-eval2.lisp20
1 files changed, 15 insertions, 5 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp
index 814f05c..06fbbcf 100644
--- a/sb-eval2.lisp
+++ b/sb-eval2.lisp
@@ -688,10 +688,13 @@
(prepare-lambda (rest form) context))
(cons form (prepare-nil))))
bindings))
- (new-context (context-add-env-functions context (mapcar #'first bindings*)))
+ (new-context
+ (context-add-env-functions context (mapcar #'first bindings*)))
(functions (mapcar #'cdr bindings*))
(n (length functions))
- (body* (prepare-progn body new-context)))
+ (body* (prepare-progn body
+ (context-add-specials new-context
+ specials))))
(lambda (env)
(let ((new-env (make-environment env n)))
(loop for i from 0 to n
@@ -711,7 +714,8 @@
bindings))
(functions (mapcar #'cdr bindings*))
(n (length functions))
- (body* (prepare-progn body new-context)))
+ (body* (prepare-progn body (context-add-specials new-context
+ specials))))
(lambda (env)
(let ((new-env (make-environment env n)))
(loop for i from 0 to n
@@ -940,7 +944,10 @@
(let ((bindings (mapcar (lambda (form)
(cons (first form) (second form)))
bindings)))
- (prepare-progn body (context-add-symbol-macros context bindings))))))
+ (prepare-progn body
+ (context-add-specials
+ (context-add-symbol-macros context bindings)
+ specials))))))
((macrolet)
;; FIXME: This doesn't actually work because we disregard
;; the lambda list when calling the macro.
@@ -954,7 +961,10 @@
context)
(make-null-environment))))
bindings)))
- (prepare-progn body (context-add-macros context bindings))))))
+ (prepare-progn body
+ (context-add-specials
+ (context-add-macros context bindings)
+ specials))))))
((go)
(let* ((go-tag (second form))
(catch-tag (context-find-go-tag context go-tag)))